Skip to content

ceph+fscrypt: full support

[email protected] ceph-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v20 Latest71 patches 2 repliesIn review
  2. v1970 patches 6 repliesSuperseded
  3. v1871 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v1771 patches5 repliesSuperseded
v1668 patches15 repliesSuperseded

Patches in v20 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/71libceph: add spinlock around osd->o_requestsinclude/linux/ceph/osd_client.h net/ceph/osd_client.c+12 -10 replies
2/71libceph: define struct ceph_sparse_extent and add some helpersinclude/linux/ceph/osd_client.h net/ceph/osd_client.c+55 -10 replies
3/71libceph: add sparse read support to msgr2 crc state machineinclude/linux/ceph/messenger.h net/ceph/messenger.c net/ceph/messenger_v2.c+187 -90 replies
4/71libceph: add sparse read support to OSD clientinclude/linux/ceph/osd_client.h net/ceph/osd_client.c+283 -40 replies
5/71libceph: support sparse reads on msgr2 secure codepathnet/ceph/messenger_v2.c+109 -100 replies
6/71libceph: add sparse read support to msgr1include/linux/ceph/messenger.h net/ceph/messenger_v1.c+94 -80 replies
7/71ceph: add new mount option to enable sparse readsfs/ceph/addr.c fs/ceph/file.c fs/ceph/super.c +1 more+72 -110 replies
8/71ceph: preallocate inode for ops that may create onefs/ceph/dir.c fs/ceph/file.c fs/ceph/inode.c +3 more+167 -650 replies
9/71ceph: make ceph_msdc_build_path use ref-walkfs/ceph/mds_client.c+19 -160 replies
10/71libceph: add new iov_iter-based ceph_msg_data_type and ceph_osd_data_typeinclude/linux/ceph/messenger.h include/linux/ceph/osd_client.h net/ceph/messenger.c +1 more+117 -00 replies
11/71ceph: use osd_req_op_extent_osd_iter for netfs readsfs/ceph/addr.c+1 -180 replies
12/71ceph: fscrypt_auth handling for cephfs/ceph/Makefile fs/ceph/acl.c fs/ceph/crypto.c +7 more+313 -220 replies
13/71ceph: ensure that we accept a new context from MDS for new inodesfs/ceph/inode.c+11 -100 replies
14/71ceph: add support for fscrypt_auth/fscrypt_file to cap messagesfs/ceph/caps.c+63 -130 replies
15/71ceph: implement -o test_dummy_encryption mount optionfs/ceph/crypto.c fs/ceph/crypto.h fs/ceph/inode.c +3 more+180 -60 replies
16/71ceph: decode alternate_name in lease infofs/ceph/mds_client.c fs/ceph/mds_client.h+38 -100 replies
17/71ceph: add fscrypt ioctlsfs/ceph/ioctl.c+83 -00 replies
18/71ceph: make the ioctl cmd more readable in debug logfs/ceph/ioctl.c+38 -10 replies
19/71ceph: add base64 endcoding routines for encrypted namesfs/ceph/crypto.c fs/ceph/crypto.h+92 -00 replies
20/71ceph: add encrypted fname handling to ceph_mdsc_build_pathfs/ceph/crypto.c fs/ceph/crypto.h fs/ceph/mds_client.c+117 -180 replies
21/71ceph: send altname in MClientRequestfs/ceph/mds_client.c fs/ceph/mds_client.h+73 -50 replies
22/71ceph: encode encrypted name in dentry releasefs/ceph/caps.c fs/ceph/mds_client.c+44 -80 replies
23/71ceph: properly set DCACHE_NOKEY_NAME flag in lookupfs/ceph/dir.c+11 -00 replies
24/71ceph: set DCACHE_NOKEY_NAME in atomic openfs/ceph/file.c+7 -00 replies
25/71ceph: make d_revalidate call fscrypt revalidator for encrypted dentriesfs/ceph/dir.c+6 -20 replies
26/71ceph: add helpers for converting names for userland presentationfs/ceph/crypto.c fs/ceph/crypto.h+117 -00 replies
27/71ceph: fix base64 encoded name's length check in ceph_fname_to_usr()fs/ceph/crypto.c+1 -10 replies
28/71ceph: add fscrypt support to ceph_fill_tracefs/ceph/inode.c+28 -20 replies
29/71ceph: pass the request to parse_reply_info_readdir()fs/ceph/mds_client.c+12 -100 replies
30/71ceph: add ceph_encode_encrypted_dname() helperfs/ceph/crypto.c fs/ceph/crypto.h+16 -30 replies
31/71ceph: add support to readdir for encrypted filenamesfs/ceph/crypto.c fs/ceph/crypto.h fs/ceph/dir.c +3 more+124 -210 replies
32/71ceph: create symlinks with encrypted and base64-encoded targetsfs/ceph/crypto.c fs/ceph/dir.c fs/ceph/inode.c+142 -180 replies
33/71ceph: make ceph_get_name decrypt filenamesfs/ceph/export.c+32 -120 replies
34/71ceph: add a new ceph.fscrypt.auth vxattrfs/ceph/xattr.c+26 -00 replies
35/71ceph: add some fscrypt guardrailsfs/ceph/dir.c fs/ceph/file.c fs/ceph/inode.c+25 -10 replies
36/71ceph: allow encrypting a directory while not having Ax capsfs/ceph/inode.c+2 -10 replies
37/71ceph: mark directory as non-complete after loading keyfs/ceph/crypto.c fs/ceph/crypto.h fs/ceph/dir.c +1 more+46 -90 replies
38/71ceph: don't allow changing layout on encrypted files/directoriesfs/ceph/ioctl.c+4 -00 replies
39/71libceph: add CEPH_OSD_OP_ASSERT_VER supportinclude/linux/ceph/osd_client.h include/linux/ceph/rados.h net/ceph/osd_client.c+14 -10 replies
40/71ceph: size handling for encrypted inodes in cap updatesfs/ceph/caps.c fs/ceph/crypto.h+29 -180 replies
41/71ceph: fscrypt_file field handling in MClientRequest messagesfs/ceph/dir.c fs/ceph/file.c fs/ceph/inode.c +2 more+30 -30 replies
42/71ceph: get file size from fscrypt_file when present in inode tracesfs/ceph/inode.c+13 -10 replies
43/71ceph: handle fscrypt fields in cap messages from MDSfs/ceph/caps.c+76 -20 replies
44/71ceph: update WARN_ON message to pr_warnfs/ceph/caps.c+7 -40 replies
45/71ceph: add __ceph_get_caps helper supportfs/ceph/caps.c fs/ceph/super.h+14 -50 replies
46/71ceph: add __ceph_sync_read helper supportfs/ceph/file.c fs/ceph/super.h+26 -120 replies
47/71ceph: add object version support for sync readfs/ceph/file.c fs/ceph/super.h+12 -30 replies
48/71ceph: add infrastructure for file encryption and decryptionfs/ceph/crypto.c fs/ceph/crypto.h+238 -00 replies
49/71ceph: add truncate size handling support for fscryptfs/ceph/crypto.h fs/ceph/inode.c fs/ceph/super.h+217 -70 replies
50/71libceph: allow ceph_osdc_new_request to accept a multi-op readnet/ceph/osd_client.c+21 -60 replies
51/71ceph: disable fallocate for encrypted inodesfs/ceph/file.c+3 -00 replies
52/71ceph: disable copy offload on encrypted inodesfs/ceph/file.c+4 -00 replies
53/71ceph: don't use special DIO path for encrypted inodesfs/ceph/file.c+4 -20 replies
54/71ceph: align data in pages in ceph_sync_writefs/ceph/file.c+10 -100 replies
55/71ceph: add read/modify/write to ceph_sync_writefs/ceph/file.c+288 -280 replies
56/71ceph: plumb in decryption during sync readsfs/ceph/file.c+65 -240 replies
57/71ceph: add fscrypt decryption support to ceph_netfs_issue_opfs/ceph/addr.c+55 -90 replies
58/71ceph: set i_blkbits to crypto block size for encrypted inodesfs/ceph/inode.c+9 -70 replies
59/71ceph: add encryption support to writepagefs/ceph/addr.c+29 -80 replies
60/71ceph: fscrypt support for writepagesfs/ceph/addr.c fs/ceph/crypto.h+68 -130 replies
61/71ceph: invalidate pages when doing direct/sync writesfs/ceph/file.c+14 -50 replies
62/71ceph: add support for encrypted snapshot namesfs/ceph/inode.c+29 -40 replies
63/71ceph: add support for handling encrypted snapshot namesfs/ceph/crypto.c fs/ceph/crypto.h+166 -300 replies
64/71ceph: update documentation regarding snapshot naming limitationsDocumentation/filesystems/ceph.rst+10 -00 replies
65/71ceph: prevent snapshots to be created in encrypted locked directoriesfs/ceph/dir.c+5 -00 replies
66/71ceph: report STATX_ATTR_ENCRYPTED on encrypted inodesfs/ceph/inode.c+5 -10 replies
67/71ceph: drop the messages from MDS when unmountingfs/ceph/caps.c fs/ceph/mds_client.c fs/ceph/mds_client.h +4 more+117 -170 replies
68/71ceph: just wait the osd requests' callbacks to finish when unmountingfs/ceph/addr.c fs/ceph/super.c fs/ceph/super.h+23 -00 replies
69/71ceph: fix updating the i_truncate_pagecache_size for fscryptfs/ceph/caps.c fs/ceph/inode.c+26 -130 replies
70/71ceph: switch ceph_lookup() to use new fscrypt helperfs/ceph/dir.c+7 -60 replies
71/71ceph: switch ceph_open_atomic() to use the new fscrypt helperfs/ceph/file.c+3 -50 replies

Reviews trailers per patch

69 of 71 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLuís HenriquesVenky ShankarXiubo LiMilind Changire
SeriesT-b R-b
1/71T-b R-b T-b R-b
2/71T-b R-b T-b R-b
3/71T-b R-b T-b R-b
4/71T-b R-b T-b R-b
5/71T-b R-b T-b R-b
6/71T-b R-b T-b R-b
7/71T-b R-b T-b R-b
8/71T-b R-b T-b R-b
9/71T-b R-b T-b R-b
10/71T-b R-b T-b
11/71T-b R-b T-b
12/71T-b R-b T-b R-b
13/71T-b R-b T-b R-b
14/71T-b R-b T-b R-b
15/71T-b R-b T-b R-b
16/71T-b R-b T-b
17/71T-b R-b T-b R-b
18/71T-b R-b T-b
19/71T-b T-b R-b
20/71T-b R-b T-b R-b
21/71T-b R-b T-b R-b
22/71T-b R-b T-b R-b
23/71T-b R-b T-b R-b
24/71T-b R-b T-b R-b
25/71T-b R-b T-b R-b
26/71T-b R-b T-b R-b
27/71T-b R-b T-b
28/71T-b R-b T-b R-b
29/71T-b R-b T-b
30/71T-b R-b T-b
31/71T-b R-b T-b
32/71T-b R-b T-b R-b
33/71T-b R-b T-b R-b
34/71T-b R-b T-b R-b
35/71T-b R-b T-b R-b
36/71T-b T-b
37/71T-b T-b
38/71T-b T-b R-b
39/71T-b R-b T-b R-b
40/71T-b R-b T-b R-b
41/71T-b R-b T-b R-b
42/71T-b R-b T-b R-b
43/71T-b R-b T-b R-b
44/71T-b R-b T-b R-b
45/71T-b R-b T-b
46/71T-b R-b T-b
47/71T-b R-b T-b
48/71T-b R-b T-b R-b
49/71T-b R-b T-b
50/71T-b R-b T-b R-b
51/71T-b R-b T-b R-b
52/71T-b R-b T-b R-b
53/71T-b R-b T-b R-b
54/71T-b R-b T-b R-b
55/71T-b R-b T-b R-b
56/71T-b R-b T-b R-b
57/71T-b R-b T-b R-b
58/71T-b R-b T-b R-b
59/71T-b R-b T-b R-b
60/71T-b R-b T-b R-b
61/71T-b T-b R-b
62/71T-b T-b R-b
63/71T-b T-b R-b
64/71T-b T-b R-b
65/71T-b T-b R-b
66/71T-b R-b T-b R-b
67/71T-b R-b R-b
68/71T-b R-b R-b
69/71T-b R-b T-b R-b
70/71T-b T-b R-b R-b
71/71T-b T-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v20 thread

Cover letter [PATCH v20 00/71] ceph+fscrypt: full support

From: Xiubo Li <[email protected]>

This patch series is based on Jeff Layton's previous great work and effort on this and all the patches have been in the testing branch and well tested:

The qa teuthology tests results:
https://pulpito.ceph.com/xiubli-2023-06-09_03:59:14-fs:fscrypt-wip-lxb-fscrypt-20230607-0901-distro-default-smithi/

Since v15 we have added the ceph qa teuthology test cases for this [1][2], which will test both the file name and contents encryption features and at the same time they will also test the IO benchmarks.

To support the fscrypt we also have some other work in ceph [3][4][5][6][7][8][9]:

[1] https://github.com/ceph/ceph/pull/48628
[2] https://github.com/ceph/ceph/pull/49934
[3] https://github.com/ceph/ceph/pull/43588
[4] https://github.com/ceph/ceph/pull/37297
[5] https://github.com/ceph/ceph/pull/45192
[6] https://github.com/ceph/ceph/pull/45312
[7] https://github.com/ceph/ceph/pull/40828
[8] https://github.com/ceph/ceph/pull/45224
[9] https://github.com/ceph/ceph/pull/45073

The [9] is still undering testing and will soon be merged after that. All the others had been merged.

The main changes since v19:

- s/ceph_open/ceph_lookup/ for [PATCH v20 70/71].
- Updated the patches to fix use-after-free bug for fscrypt_destroy_keyring, the link https://patchwork.kernel.org/project/ceph-devel/list/?series=755131.
These new changes have been

Jeff Layton (47):
libceph: add spinlock around osd->o_requests
libceph: define struct ceph_sparse_extent and add some helpers
libceph: add sparse read support to msgr2 crc state machine
libceph: add sparse read support to OSD client
libceph: support sparse reads on msgr2 secure codepath
libceph: add sparse read support to msgr1
ceph: add new mount option to enable sparse reads
ceph: preallocate inode for ops that may create one
ceph: make ceph_msdc_build_path use ref-walk
libceph: add new iov_iter-based ceph_msg_data_type and
ceph_osd_data_type
ceph: use osd_req_op_extent_osd_iter for netfs reads
ceph: fscrypt_auth handling for ceph
ceph: ensure that we accept a new context from MDS for new inodes
ceph: add support for fscrypt_auth/fscrypt_file to cap messages
ceph: implement -o test_dummy_encryption mount option
ceph: decode alternate_name in lease info
ceph: add fscrypt ioctls
ceph: add encrypted fname handling to ceph_mdsc_build_path
ceph: send altname in MClientRequest
ceph: encode encrypted name in dentry release
ceph: properly set DCACHE_NOKEY_NAME flag in lookup
ceph: set DCACHE_NOKEY_NAME in atomic open
ceph: make d_revalidate call fscrypt revalidator for encrypted
dentries
ceph: add helpers for converting names for userland presentation
ceph: add fscrypt support to ceph_fill_trace
ceph: create symlinks with encrypted and base64-encoded targets
ceph: make ceph_get_name decrypt filenames
ceph: add a new ceph.fscrypt.auth vxattr
ceph: add some fscrypt guardrails
libceph: add CEPH_OSD_OP_ASSERT_VER support
ceph: size handling for encrypted inodes in cap updates
ceph: fscrypt_file field handling in MClientRequest messages
ceph: handle fscrypt fields in cap messages from MDS
ceph: update WARN_ON message to pr_warn
ceph: add infrastructure for file encryption and decryption
libceph: allow ceph_osdc_new_request to accept a multi-op read
ceph: disable fallocate for encrypted inodes
ceph: disable copy offload on encrypted inodes
ceph: don't use special DIO path for encrypted inodes
ceph: align data in pages in ceph_sync_write
ceph: add read/modify/write to ceph_sync_write
ceph: plumb in decryption during sync reads
ceph: add fscrypt decryption support to ceph_netfs_issue_op
ceph: set i_blkbits to crypto block size for encrypted inodes
ceph: add encryption support to writepage
ceph: fscrypt support for writepages
ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes

Luís Henriques (11):
ceph: add base64 endcoding routines for encrypted names
ceph: allow encrypting a directory while not having Ax caps
ceph: mark directory as non-complete after loading key
ceph: don't allow changing layout on encrypted files/directories
ceph: invalidate pages when doing direct/sync writes
ceph: add support for encrypted snapshot names
ceph: add support for handling encrypted snapshot names
ceph: update documentation regarding snapshot naming limitations
ceph: prevent snapshots to be created in encrypted locked directories
ceph: switch ceph_lookup() to use new fscrypt helper
ceph: switch ceph_open_atomic() to use the new fscrypt helper

Xiubo Li (13):
ceph: make the ioctl cmd more readable in debug log
ceph: fix base64 encoded name's length check in ceph_fname_to_usr()
ceph: pass the request to parse_reply_info_readdir()
ceph: add ceph_encode_encrypted_dname() helper
ceph: add support to readdir for encrypted filenames
ceph: get file size from fscrypt_file when present in inode traces
ceph: add __ceph_get_caps helper support
ceph: add __ceph_sync_read helper support
ceph: add object version support for sync read
ceph: add truncate size handling support for fscrypt
ceph: drop the messages from MDS when unmounting
ceph: just wait the osd requests' callbacks to finish when unmounting
ceph: fix updating the i_truncate_pagecache_size for fscrypt

 Documentation/filesystems/ceph.rst |  10 +
 fs/ceph/Makefile                   |   1 +
 fs/ceph/acl.c                      |   4 +-
 fs/ceph/addr.c                     | 192 +++++++--
 fs/ceph/caps.c                     | 227 ++++++++--
 fs/ceph/crypto.c                   | 659 +++++++++++++++++++++++++++++
 fs/ceph/crypto.h                   | 270 ++++++++++++
 fs/ceph/dir.c                      | 188 ++++++--
 fs/ceph/export.c                   |  44 +-
 fs/ceph/file.c                     | 593 ++++++++++++++++++++++----
 fs/ceph/inode.c                    | 613 ++++++++++++++++++++++++---
 fs/ceph/ioctl.c                    | 126 +++++-
 fs/ceph/mds_client.c               | 479 +++++++++++++++++----
 fs/ceph/mds_client.h               |  29 +-
 fs/ceph/quota.c                    |  14 +-
 fs/ceph/snap.c                     |  10 +-
 fs/ceph/super.c                    | 191 ++++++++-
 fs/ceph/super.h                    |  46 +-
 fs/ceph/xattr.c                    |  29 ++
 include/linux/ceph/ceph_fs.h       |  21 +-
 include/linux/ceph/messenger.h     |  40 ++
 include/linux/ceph/osd_client.h    |  93 +++-
 include/linux/ceph/rados.h         |   4 +
 net/ceph/messenger.c               |  79 ++++
 net/ceph/messenger_v1.c            |  98 ++++-
 net/ceph/messenger_v2.c            | 286 ++++++++++++-
 net/ceph/osd_client.c              | 332 ++++++++++++++-
 27 files changed, 4261 insertions(+), 417 deletions(-)
 create mode 100644 fs/ceph/crypto.c
 create mode 100644 fs/ceph/crypto.h
Signature · 1 line
2.40.1