[PATCHSET 0/2] fs: Support for LOOKUP_NONBLOCK / RESOLVE_NONBLOCK

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

 



Hi,

This adds support for just doing the RCU based (and non-blocking) part
of path resolution. The main motivation is for io_uring to be able to
do saner/faster open, so we don't always have to go async, particularly
for the fast path of the data already being cached.

Internally that is presented as LOOKUP_NONBLOCK, which depends on
LOOKUP_RCU for doing the right thing. If we terminate the RCU part of the
lookup, then we return -EAGAIN if LOOKUP_NONBLOCK is also set.

The second patch is enabling this through openat2() as well, by adding
a RESOLVE_NONBLOCK that can be passed in struct open_how ->resolve as
well. Basic test case:

[root@archlinux liburing]# echo 3 > /proc/sys/vm/drop_caches 
[root@archlinux liburing]# test/do-open2 /etc/nanorc
open: -1
openat2: Resource temporarily unavailable
[root@archlinux liburing]# touch /etc/nanorc
[root@archlinux liburing]# test/do-open2 /etc/nanorc
open: 3

-- 
Jens Axboe





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

  Powered by Linux