Re: [PATCH v3] direct-io: fix direct write stale data exposure from concurrent buffered read

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

 



Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

> On Sat, 14 May 2016 00:25:28 +0800 Eryu Guan <guaneryu@xxxxxxxxx> wrote:
>
>> Currently direct writes inside i_size on a DIO_SKIP_HOLES filesystem are
>> not allowed to allocate blocks(get_more_blocks() sets 'create' to 0
>> before calling get_block() callback), if it's a sparse file, direct
>> writes fall back to buffered writes to avoid stale data exposure from
>> concurrent buffered read. But there're two cases that can result in
>> stale data exposure are not correctly detected.
>> 
>> 1. The detection for "writing inside i_size" is not sufficient, writes
>> can be treated as "extending writes" wrongly. For example, direct write
>> 1FSB to a 1FSB sparse file on ext2/3/4, starting from offset 0, in this
>> case it's writing inside i_size, but 'create' is non-zero, because
>> 'block_in_file' and '(i_size_read(inode) >> blkbits' are both zero.
>
> um, what is an "FSB"?

File System Block, as opposed to a block device block.  :)

-Jeff
--
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