xfs
[Top] [All Lists]

Re: review: propogate return codes from flush routines

To: lachlan@xxxxxxx
Subject: Re: review: propogate return codes from flush routines
From: Stewart Smith <stewart@xxxxxxxxxxxxxxxx>
Date: Tue, 05 Sep 2006 17:54:08 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <44FC0D0F.60403@xxxxxxx>
References: <44FC0D0F.60403@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
On Mon, 2006-09-04 at 12:25 +0100, Lachlan McIlroy wrote:
> Here's a patch to handle error return values in fs_flush_pages and
> fs_flushinval_pages.  It changes the prototype of fs_flushinval_pages
> so we can propogate the errors and handle them at higher layers.  I also 
> modified xfs_itruncate_start so that it could propogate the error further.

IMHO this is always a good idea. Although I guess the only concern can
be getting the right error back (and a useful one). 

> The motivation behind this change was the recent BUG reported due to a
> direct I/O read trying to write to delayed alloc extents.  While the exact
> cause of this problem is not known it is possible that fs_flushinval_pages
> ignored an error while flushing, truncated the pages on the file anyway,
> and failed to convert all delayed alloc extents.

from a quick look the patch seems to do as advertised.

i probably just haven't looked hard enough - but I'm assuming the layers
higher up deal with the error and: report to user, write log message or
something if there's a really catastrophic error?

-- 
Stewart Smith (stewart@xxxxxxxxxxxxxxxx)
http://www.flamingspork.com/

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>