[Bug 50981] ext4 : DATA CORRUPTION read and write on same 4096 page range

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

 



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


Zheng Liu <gnehzuil.liu@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gnehzuil.liu@xxxxxxxxx




--- Comment #3 from Zheng Liu <gnehzuil.liu@xxxxxxxxx>  2012-11-26 10:16:19 ---
IMHO, the reason seems to be that no any locking is taken by
generic_file_aio_read().  When ext4 does a buffered write, it will take i_mutex
to ensure that there is no other writer.  But ext4 (ext3, btrfs, and vfat) uses
generic_file_aio_read() to do a buffered read, and it doesn't take i_mutex.  So
it is easy to read a inconsistent data while doing a write.  I am not very
familiar with xfs, but a rwlock will be taken when a read and/or a write is
being done.  So that is why xfs hasn't this problem.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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