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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -659,6 +659,9 @@ int ceph_flags_to_mode(int flags); · 658 unmodified lines | |||
| 659 | #define CEPH_CAP_ANY (CEPH_CAP_ANY_RD | CEPH_CAP_ANY_EXCL | \ | 659 | #define CEPH_CAP_ANY (CEPH_CAP_ANY_RD | CEPH_CAP_ANY_EXCL | \ |
| 660 | CEPH_CAP_ANY_FILE_WR | CEPH_CAP_FILE_LAZYIO | \ | 660 | CEPH_CAP_ANY_FILE_WR | CEPH_CAP_FILE_LAZYIO | \ |
| 661 | CEPH_CAP_PIN) | 661 | 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) | ||
| 662 | 665 | ||
| 663 | #define CEPH_CAP_LOCKS (CEPH_LOCK_IFILE | CEPH_LOCK_IAUTH | CEPH_LOCK_ILINK | \ | 666 | #define CEPH_CAP_LOCKS (CEPH_LOCK_IFILE | CEPH_LOCK_IAUTH | CEPH_LOCK_ILINK | \ |
| 664 | CEPH_LOCK_IXATTR) | 667 | CEPH_LOCK_IXATTR) |