Skip to content

RFC ceph: asynchronous file create support

Jeff Layton ceph-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest10 patches 9 repliesIn review
  2. v2 RFC10 patches 22 repliesSuperseded

Changes in v3 from the cover letter

- move some cephfs-specific code into ceph.ko
- present and track inode numbers as u64 values
- fix up check for dentry and cap eligibility checks
- set O_CEPH_EXCL on async creates
- attempt to handle errors better on async create (invalidate dentries and dir completeness).
- ensure that fsync waits for async create to complete

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10ceph: move net/ceph/ceph_fs.c to fs/ceph/util.cfs/ceph/Makefile fs/ceph/util.c net/ceph/Makefile+2 -62 replies
2/10ceph: make ceph_fill_inode non-staticfs/ceph/inode.c fs/ceph/super.h+32 -230 replies
3/10ceph: make dentry_lease_is_valid non-staticfs/ceph/dir.c fs/ceph/super.h+6 -52 replies
4/10ceph: make __take_cap_refs non-staticfs/ceph/caps.c fs/ceph/super.h+8 -60 replies
5/10ceph: decode interval_sets for delegated inosfs/ceph/mds_client.c fs/ceph/mds_client.h+106 -100 replies
6/10ceph: add flag to designate that a request is asynchronousfs/ceph/dir.c fs/ceph/inode.c fs/ceph/mds_client.c +2 more+8 -20 replies
7/10ceph: add infrastructure for waiting for async create to completefs/ceph/caps.c fs/ceph/dir.c fs/ceph/mds_client.c +2 more+33 -30 replies
8/10ceph: add new MDS req field to hold delegated inode numberfs/ceph/mds_client.c fs/ceph/mds_client.h+2 -20 replies
9/10ceph: cache layout in parent dir on first sync createfs/ceph/caps.c fs/ceph/file.c fs/ceph/inode.c +1 more+34 -40 replies
10/10ceph: attempt to do async create when possiblefs/ceph/file.c include/linux/ceph/ceph_fs.h+212 -90 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYan, Zheng
SeriesR-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [RFC PATCH v3 00/10] ceph: asynchronous file create support

v3:
- move some cephfs-specific code into ceph.ko
- present and track inode numbers as u64 values
- fix up check for dentry and cap eligibility checks
- set O_CEPH_EXCL on async creates
- attempt to handle errors better on async create (invalidate dentries and dir completeness).
- ensure that fsync waits for async create to complete

v2:
- move cached layout to dedicated field in inode
- protect cached layout with i_ceph_lock
- wipe cached layout in __check_cap_issue
- set max_size of file to layout.stripe_unit
- set truncate_size to (u64)-1
- use dedicated CephFS feature bit instead of CEPHFS_FEATURE_OCTOPUS
- set cap_id to 1 in async created inode
- allocate inode number before submitting request
- rework the prep for an async create to be more efficient
- don't allow MDS or cap messages involving an inode until we get async create reply

Still not quite ready for merge, but I've cleaned up a number of warts in the v2 set. Performance numbers still look about the same.

There is definitely still a race of some sort that causes the client to try to asynchronously create a dentry that already exists. I'm still working on tracking that down.

Jeff Layton (10):
ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c
ceph: make ceph_fill_inode non-static
ceph: make dentry_lease_is_valid non-static
ceph: make __take_cap_refs non-static
ceph: decode interval_sets for delegated inos
ceph: add flag to designate that a request is asynchronous
ceph: add infrastructure for waiting for async create to complete
ceph: add new MDS req field to hold delegated inode number
ceph: cache layout in parent dir on first sync create
ceph: attempt to do async create when possible

 fs/ceph/Makefile                     |   2 +-
 fs/ceph/caps.c                       |  38 +++--
 fs/ceph/dir.c                        |  13 +-
 fs/ceph/file.c                       | 240 +++++++++++++++++++++++++--
 fs/ceph/inode.c                      |  50 +++---
 fs/ceph/mds_client.c                 | 123 ++++++++++++--
 fs/ceph/mds_client.h                 |  17 +-
 fs/ceph/super.h                      |  16 +-
 net/ceph/ceph_fs.c => fs/ceph/util.c |   4 -
 include/linux/ceph/ceph_fs.h         |   8 +-
 net/ceph/Makefile                    |   2 +-
 11 files changed, 443 insertions(+), 70 deletions(-)
 rename net/ceph/ceph_fs.c => fs/ceph/util.c (94%)
Signature · 1 line
2.24.1