[RFC PATCH 0 of 8] O_DIRECT locking rework

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

 



Hello everyone,

Here's a respin of the O_DIRECT locking changes.  There are some minor
updates, mostly cleanups based on suggestions from Zach Brown and Dave
Chinner.

Linus found a deadlock between the placeholders and the page fault handler
when userland uses an mmap of the file as the O_DIRECT buffer.  I'm
getting around that by capping placeholder extents at DIO_PAGES (64)
intervals when the file has mappings.  This matches the interval used by
get_user_pages and makes sure get_user_pages has been called on a given
range in the address space before placeholders are added.

I also hit a stale data exposure when get_block returns data past the
end of the placeholder extent.  A concurrent readpage could come in and
find metadata before the data had gotten to disk.  The fix is to
only ask get_block for data up to the end of the placeholder.

Generally, this isn't a problem because the common case is for
a single placeholder to cover the entire DIO.  So the suboptimal
allocation result wouldn't happen very often.

-chris

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux