All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/9]  ceph: size handling for the fscrypt
@ 2021-12-08 12:45 xiubli
  2021-12-08 12:45 ` [PATCH v7 8/9] ceph: add object version support for sync read xiubli
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: xiubli @ 2021-12-08 12:45 UTC (permalink / raw)
  To: jlayton; +Cc: idryomov, vshankar, khiremat, ceph-devel, Xiubo Li

From: Xiubo Li <xiubli@redhat.com>

Changed in V7:
- Use the u64 instead of object version struct.


Changed in V6:
- Fixed the file hole bug, also have updated the MDS side PR.
- Add add object version support for sync read in #8.


Xiubo Li (2):
  ceph: add object version support for sync read
  ceph: add truncate size handling support for fscrypt

 fs/ceph/crypto.h |  21 +++++
 fs/ceph/file.c   |   8 +-
 fs/ceph/inode.c  | 223 +++++++++++++++++++++++++++++++++++++++++++----
 fs/ceph/super.h  |   8 +-
 4 files changed, 242 insertions(+), 18 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH v7 0/9] ceph: size handling for the fscrypt
@ 2021-11-05 14:22 xiubli
  2021-11-05 18:36 ` Jeff Layton
  0 siblings, 1 reply; 17+ messages in thread
From: xiubli @ 2021-11-05 14:22 UTC (permalink / raw)
  To: jlayton; +Cc: idryomov, vshankar, pdonnell, khiremat, ceph-devel, Xiubo Li

From: Xiubo Li <xiubli@redhat.com>

This patch series is based on the "wip-fscrypt-fnames" branch in
repo https://github.com/ceph/ceph-client.git.

And I have picked up 5 patches from the "ceph-fscrypt-size-experimental"
branch in repo
https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git.

====

This approach is based on the discussion from V1 and V2, which will
pass the encrypted last block contents to MDS along with the truncate
request.

This will send the encrypted last block contents to MDS along with
the truncate request when truncating to a smaller size and at the
same time new size does not align to BLOCK SIZE.

The MDS side patch is raised in PR
https://github.com/ceph/ceph/pull/43588, which is also based Jeff's
previous great work in PR https://github.com/ceph/ceph/pull/41284.

The MDS will use the filer.write_trunc(), which could update and
truncate the file in one shot, instead of filer.truncate().

This just assume kclient won't support the inline data feature, which
will be remove soon, more detail please see:
https://tracker.ceph.com/issues/52916

Changed in V7:
- Fixed the sparse check warnings.
- Removed the include/linux/ceph/crypto.h header file.

Changed in V6:
- Fixed the file hole bug, also have updated the MDS side PR.
- Add add object version support for sync read in #8.


Changed in V5:
- Rebase to "wip-fscrypt-fnames" branch in ceph-client.git repo.
- Pick up 5 patches from Jeff's "ceph-fscrypt-size-experimental" branch
  in linux.git repo.
- Add "i_truncate_pagecache_size" member support in ceph_inode_info
  struct, this will be used to truncate the pagecache only in kclient
  side, because the "i_truncate_size" will always be aligned to BLOCK
  SIZE. In fscrypt case we need to use the real size to truncate the
  pagecache.


Changed in V4:
- Retry the truncate request by 20 times before fail it with -EAGAIN.
- Remove the "fill_last_block" label and move the code to else branch.
- Remove the #3 patch, which has already been sent out separately, in
  V3 series.
- Improve some comments in the code.


Changed in V3:
- Fix possibly corrupting the file just before the MDS acquires the
  xlock for FILE lock, another client has updated it.
- Flush the pagecache buffer before reading the last block for the
  when filling the truncate request.
- Some other minore fixes.



Jeff Layton (5):
  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: get file size from fscrypt_file when present in inode traces
  ceph: handle fscrypt fields in cap messages from MDS

Xiubo Li (4):
  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

 fs/ceph/caps.c                  | 136 ++++++++++++++----
 fs/ceph/crypto.h                |  25 ++++
 fs/ceph/dir.c                   |   3 +
 fs/ceph/file.c                  |  76 ++++++++--
 fs/ceph/inode.c                 | 244 +++++++++++++++++++++++++++++---
 fs/ceph/mds_client.c            |   9 +-
 fs/ceph/mds_client.h            |   2 +
 fs/ceph/super.h                 |  25 ++++
 include/linux/ceph/osd_client.h |   6 +-
 include/linux/ceph/rados.h      |   4 +
 net/ceph/osd_client.c           |   5 +
 11 files changed, 475 insertions(+), 60 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-12-09  0:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 12:45 [PATCH v7 0/9] ceph: size handling for the fscrypt xiubli
2021-12-08 12:45 ` [PATCH v7 8/9] ceph: add object version support for sync read xiubli
2021-12-08 15:33   ` Jeff Layton
2021-12-08 18:22     ` Jeff Layton
2021-12-09  0:56       ` Xiubo Li
2021-12-08 12:45 ` [PATCH v7 9/9] ceph: add truncate size handling support for fscrypt xiubli
2021-12-08 12:49 ` [PATCH v7 0/9] ceph: size handling for the fscrypt Xiubo Li
  -- strict thread matches above, loose matches on Subject: below --
2021-11-05 14:22 xiubli
2021-11-05 18:36 ` Jeff Layton
2021-11-05 20:46   ` Jeff Layton
2021-11-06  1:35     ` Xiubo Li
2021-11-06 10:50       ` Jeff Layton
2021-11-06 10:51         ` Jeff Layton
2021-11-07  9:44           ` Xiubo Li
2021-11-08  3:22           ` Xiubo Li
2021-11-08  6:04             ` Xiubo Li
2021-11-08  8:24               ` Xiubo Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.