Skip to content

ceph: dencrypt the dentry names early and once for readdir

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesIn review
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Fix the WARN issue reported by Luis, thanks.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ceph: pass the request to parse_reply_info_readdir()fs/ceph/mds_client.c+12 -100 replies
2/4ceph: add ceph_encode_encrypted_dname() helperfs/ceph/crypto.c fs/ceph/crypto.h+10 -40 replies
3/4ceph: dencrypt the dentry names early and once for readdirfs/ceph/crypto.c fs/ceph/crypto.h fs/ceph/dir.c +3 more+102 -720 replies
4/4ceph: clean up the ceph_readdir() codefs/ceph/dir.c+10 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] ceph: dencrypt the dentry names early and once for readdir

From: Xiubo Li <[email protected]>

This is a new approach to improve the readdir and based the previous discussion in another thread:

https://patchwork.kernel.org/project/ceph-devel/list/?series=621901

Just start a new thread for this.

As Jeff suggested, this patch series will dentrypt the dentry name during parsing the readdir data in handle_reply(). And then in both ceph_readdir_prepopulate() and ceph_readdir() we will use the dencrypted name directly.

NOTE: we will base64_dencode and dencrypt the names in-place instead of allocating tmp buffers. For base64_dencode it's safe because the dencoded string buffer will always be shorter.

V2:
- Fix the WARN issue reported by Luis, thanks.

Xiubo Li (4):
ceph: pass the request to parse_reply_info_readdir()
ceph: add ceph_encode_encrypted_dname() helper
ceph: dencrypt the dentry names early and once for readdir
ceph: clean up the ceph_readdir() code

 fs/ceph/crypto.c     |  25 ++++++++---
 fs/ceph/crypto.h     |   2 +
 fs/ceph/dir.c        |  64 +++++++++------------------
 fs/ceph/inode.c      |  37 ++--------------
 fs/ceph/mds_client.c | 101 ++++++++++++++++++++++++++++++++++++-------
 fs/ceph/mds_client.h |   4 +-
 6 files changed, 133 insertions(+), 100 deletions(-)
Signature · 1 line
2.27.0