[Bug 207729] Mounting EXT4 with data_err=abort does not abort journal on data block write failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=207729

--- Comment #4 from Jan Kara (jack@xxxxxxx) ---
Thanks for the reproducer! Good spotting! This is indeed broken. The problem is
that the write to the second file block happens, data is written to page cache.
Then fsync(2) happens. It starts writeback of the second file block - allocates
block, extends file size, submits write of the second file block, and waits for
this write to complete. Because the write fails with EIO, waiting for the write
to complete returns EIO which then bubbles up to userspace. But this also
"consumes" the IO error and so the journalling layer which commits transaction
later does not know there was IO error before and so it happily commits the
transaction. As I've verified, this scenario indeed leads to stale data
exposure that data_err=abort mount option is meant to prevent.

I have to think how to fix this properly...

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux