Re: [PATCH] ext3: prevent reread after write IO error

From: Hidehiro Kawai
Date: Thu Jan 14 2010 - 04:05:52 EST


Hi,

Hidehiro Kawai wrote:

> This patch fixes the similar bug fixed by commit 95450f5a.
>
> If a directory is modified, its data block is journaled as metadata
> and finally written back to the right place. Now, we assume a
> transient write erorr happens on that writeback. Uptodate flag of
> the buffer is cleared by write error, so next access on the buffer
> causes a reread from disk. This means it breaks the filesystems
> consistency.

After sending this patch, I noticed that I have to deal with
the bh_uptodate_or_lock() case as well. Actually, I confirmed
a data block sharing happens between two inodes. Allocate a new
block, then modified bitmap goes to the fs, but it fails due to
a transient IO error. Next access on the bitmap buffer cause a
reread from disk. As a result, the allocated block becomes
a FREE block! So this block can be shared by different two inodes.

I'll send the revised version later.

Thanks,
--
Hidehiro Kawai
Hitachi, Systems Development Laboratory
Linux Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/