ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: xiubli@redhat.com
To: jlayton@kernel.org
Cc: idryomov@gmail.com, ukernel@gmail.com, pdonnell@redhat.com,
	ceph-devel@vger.kernel.org, Xiubo Li <xiubli@redhat.com>
Subject: [PATCH RFC 0/2] ceph: size handling for the fscrypt
Date: Fri,  3 Sep 2021 16:15:08 +0800	[thread overview]
Message-ID: <20210903081510.982827-1-xiubli@redhat.com> (raw)

From: Xiubo Li <xiubli@redhat.com>

This patch series is based Jeff's ceph-fscrypt-size-experimental
branch in https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git.

This is just a draft patch and need to rebase or recode after Jeff
finished his huge patch set.

Post the patch out for advices and ideas. Thanks.

====

This approach will not do the rmw immediately after the file is
truncated. If the truncate size is aligned to the BLOCK SIZE, so
there no need to do the rmw and only in unaligned case will the
rmw is needed.

And the 'fscrypt_file' field will be cleared after the rmw is done.
If the 'fscrypt_file' is none zero that means after the kclient
reading that block to local buffer or pagecache it needs to do the
zeroing of that block in range of [fscrypt_file, round_up(fscrypt_file,
BLOCK SIZE)).

Once any kclient has dirty that block and write it back to ceph, the
'fscrypt_file' field will be cleared and set to 0. More detail please
see the commit comments in the second patch.

There also need on small work in Jeff's MDS PR in cap flushing code
to clear the 'fscrypt_file'.


Xiubo Li (2):
  Revert "ceph: make client zero partial trailing block on truncate"
  ceph: truncate the file contents when needed when file scrypted

 fs/ceph/addr.c  | 19 ++++++++++++++-
 fs/ceph/caps.c  | 24 ++++++++++++++++++
 fs/ceph/file.c  | 65 ++++++++++++++++++++++++++++++++++++++++++++++---
 fs/ceph/inode.c | 48 +++++++++++++++++++-----------------
 fs/ceph/super.h | 13 +++++++---
 5 files changed, 138 insertions(+), 31 deletions(-)

-- 
2.27.0


             reply	other threads:[~2021-09-03  8:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  8:15 xiubli [this message]
2021-09-03  8:15 ` [PATCH RFC 1/2] Revert "ceph: make client zero partial trailing block on truncate" xiubli
2021-09-03  8:15 ` [PATCH RFC 2/2] ceph: truncate the file contents when needed when file scrypted xiubli
2021-09-07 16:26   ` Jeff Layton
2021-09-08  9:37     ` Xiubo Li
2021-09-08 13:57       ` Jeff Layton
2021-09-09  3:38         ` Xiubo Li
2021-09-09 12:48           ` Jeff Layton
2021-09-10  2:30             ` Xiubo Li
2021-09-10 11:46               ` Jeff Layton
2021-09-13  5:42                 ` Xiubo Li
2021-09-13 14:05                   ` Jeff Layton
2021-09-14  5:43                     ` Xiubo Li
2021-09-13 19:34                   ` Jeff Layton
2021-09-14  5:40                     ` Xiubo Li
2021-09-14 14:24                       ` Jeff Layton
2021-09-16 10:02                         ` Xiubo Li
2021-09-17 17:19                           ` Jeff Layton
2021-09-20 14:32                             ` Xiubo Li
2021-09-20 19:24                               ` Jeff Layton
2021-09-22  2:23                                 ` Xiubo Li
2021-09-24 18:52                                   ` Jeff Layton
2021-09-25  1:02                                     ` Xiubo Li
2021-09-24 15:01                     ` Xiubo Li
2021-09-25  9:56                     ` Xiubo Li
2021-10-11 13:29                       ` Jeff Layton
2021-10-11 15:16                         ` Xiubo Li
2021-09-07 12:35 ` [PATCH RFC 0/2] ceph: size handling for the fscrypt Jeff Layton
2021-09-07 13:19   ` Xiubo Li
2021-09-07 20:58     ` Jeff Layton
2021-09-08 11:16       ` Xiubo Li
2021-09-08 14:12         ` Jeff Layton
2021-09-09  8:12           ` Xiubo Li
2021-09-08 11:17       ` Xiubo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210903081510.982827-1-xiubli@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=pdonnell@redhat.com \
    --cc=ukernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).