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: <jack@...>, <hidehiro.kawai.ez@...>, <sct@...>, <adilger@...>, <linux-kernel@...>, <linux-ext4@...>, <jbacik@...>, <cmm@...>, <yumiko.sugita.yf@...>, <satoshi.oshima.fk@...>
Date: Wednesday, June 4, 2008 - 6:51 pm

On Wed, Jun 04, 2008 at 02:58:48PM -0700, Andrew Morton wrote:

For failures to write to data blocks, I don't think any other
filesystems turn the filesystem read-only.  Not that many other
filesystems do the remount on read-only thing in general; remounting
read/only is something that might be unique to ext2/3/4.


No, but I think it's insane to put any of this into the filesystem.  I
don't want to put words in other people's mouths, but Mingming and I
were chatting with Chris Mason the last two days at a BTRFS workshop
(which is why we've been a bit slow on responding), and when discussed
this thread informally, he agreed that it was really bad idea to try
to put this kind of retry logic in an individual filesystem.


I agree it's a bad idea.  OTOH, we really need a good way of notifying
a system daemon or administrator, and not just rely on the application
to DTRT when it receives an -EIO.  Probably what we should do is (1)
return -EIO, (2) send a uevent that includes as much information as
possible.  At the minimum, the block that had the write (or read)
error, and if available the file name involved, and application and/or
pid involved.  That way, the policy of what should happen in case of a
data I/O error can be informed by what write just failed.  It might be
that if the failure is to some critical application data, the right
thing to do is to kill of the application server and let the HA system
bring up the hotbackup.  Or if the failure is writing to a log file,
some other recovery procedure is the right thing.   

But forcing the entire filesystem read-only just because of a write
failure to a data block is probably not the best way to go.


Agreed, and it's not appropriate.  I could imagine that for some
setups it is the right policy, but the kernel should not be setting
policy like this.  Maybe as a new tunable in the superblock, or maybe
via a round-trip to userspace via a uevent, but certainly not as the
new default behavior.

Apologies, I'm still catching up on patches sent in the past few days,
so I haven't had a chance to do a detailed review on Kawai-san's
patches yet.  I do agree that if this patch is forcing the entire
filesystem read-only on a write-failure to a data block, it's probably
not appropriate.

							- Ted
--
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..., Theodore Tso, (Wed Jun 4, 6:51 pm)