History

ceph: attempt to do async create when possible

With the Octopus release, the MDS will hand out directory create caps. If we have Fxc caps on the directory, and complete directory information or a known negative dentry, then we can return without waiting on the reply, allowing the open() call to return very quickly to userland. We use the normal ceph_fill_inode() routine to fill in the inode, so we have to gin up some reply inode information with what we'd expect the newly-created inode to have. The client assumes that it has a full set of caps on the new inode, and that the MDS will revoke them when there is conflicting access. This functionality is gated on the wsync/nowsync mount options.

Jeff Layton committed 6 years ago

Commit 9a8d03c1 parent 785892f2 files · +243 −7Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/ceph/ceph_fs.h+3−0
@@ -659,6 +659,9 @@ int ceph_flags_to_mode(int flags); · 658 unmodified lines
659659 #define CEPH_CAP_ANY (CEPH_CAP_ANY_RD | CEPH_CAP_ANY_EXCL | \
660660 CEPH_CAP_ANY_FILE_WR | CEPH_CAP_FILE_LAZYIO | \
661661 CEPH_CAP_PIN)
662+#define CEPH_CAP_ALL_FILE (CEPH_CAP_PIN | CEPH_CAP_ANY_SHARED | \
663+ CEPH_CAP_AUTH_EXCL | CEPH_CAP_XATTR_EXCL | \
664+ CEPH_CAP_ANY_FILE_RD | CEPH_CAP_ANY_FILE_WR)
662665
663666 #define CEPH_CAP_LOCKS (CEPH_LOCK_IFILE | CEPH_LOCK_IAUTH | CEPH_LOCK_ILINK | \
664667 CEPH_LOCK_IXATTR)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t