Re: [PATCH 1/5] jbd: strictly check for write errors on data buffers

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Jan Kara <jack@...>, Hidehiro Kawai <hidehiro.kawai.ez@...>, <sct@...>, <linux-kernel@...>, <linux-ext4@...>, <jbacik@...>, <cmm@...>, <tytso@...>, <yumiko.sugita.yf@...>, <satoshi.oshima.fk@...>
Date: Wednesday, June 4, 2008 - 5:58 pm

On Jun 04, 2008  11:19 -0700, Andrew Morton wrote:

I agree with Andrew.  The historical policy of ext2/3/4 is that write
errors for FILE DATA propagate to the application via EIO, regardless
of whether ordered mode is active or not.  If filesystem METADATA is
involved, yes this should cause an ext3_error() to be called and the
policy for what to do next is controlled by the administrator.

If the journal is aborted for a file data write error, the node maybe
panics (errors=panic) or is rebooted by the administrator, then e2fsck
is run and no problem is found (which it will not because e2fsck does
not check file data), then all that has been accomplished is to reboot
the node.

Applications should check the error return codes from their writes,
and call fsync on the file before closing it if they are really worried
about whether the data made it to disk safely, otherwise even a read-only
filesystem will not cause the application to notice anything.

Now, if we have a problem where the write error from the journal checkpoint
is not being propagated back to the original buffer, that is a different
issue.  For ordered-mode data I don't _think_ that the data buffers are
mirrored when a transaction is closed, so as long as the !buffer_uptodate()
error is propagated back to the caller on fsync() that is enough.

We might also consider having a separate mechanism to handle write failures,
but I don't think that that should be intermixed with the ext3 error handling
for metadata errors.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 5/5] ext3: abort ext3 if the journal has aborted, Hidehiro Kawai, (Mon Jun 2, 6:48 am)
[PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Mon Jun 2, 6:47 am)
[PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Tue Jun 3, 12:40 am)
Re: [PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Mon Jun 23, 7:14 am)
Re: [PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Tue Jun 24, 7:52 am)
Re: [PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Fri Jun 27, 4:06 am)
Re: [PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Mon Jun 30, 1:09 am)
Re: [PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Tue Jun 3, 1:11 am)
Re: [PATCH 4/5] jbd: fix error handling for checkpoint io, Hidehiro Kawai, (Tue Jun 3, 12:31 am)
[PATCH 2/5] jbd: ordered data integrity fix, Hidehiro Kawai, (Mon Jun 2, 6:45 am)
Re: [PATCH 2/5] jbd: ordered data integrity fix, Andrew Morton, (Tue Jun 3, 6:33 pm)
Re: [PATCH 2/5] jbd: ordered data integrity fix, Hidehiro Kawai, (Wed Jun 4, 6:55 am)
Re: [PATCH 2/5] jbd: ordered data integrity fix, Jan Kara, (Mon Jun 2, 7:59 am)
Re: [PATCH 1/5] jbd: strictly check for write errors on data..., Andreas Dilger, (Wed Jun 4, 5:58 pm)