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