From: Chandan Rajendra <chandan@linux.ibm.com>
To: Chao Yu <chao@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org, hch@infradead.org, tytso@mit.edu,
ebiggers@kernel.org, adilger.kernel@dilger.ca,
chandanrmail@gmail.com, jaegeuk@kernel.org
Subject: Re: [f2fs-dev] [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data
Date: Mon, 19 Aug 2019 19:03:23 +0530 [thread overview]
Message-ID: <20104514.oSSJcvNEEM@localhost.localdomain> (raw)
In-Reply-To: <bb3dc624-1249-2418-f9da-93da8c11e7f5@kernel.org>
On Sunday, August 18, 2019 7:15:42 PM IST Chao Yu wrote:
> Hi Chandan,
>
> On 2019-8-16 14:18, Chandan Rajendra wrote:
> > F2FS has a copy of "post read processing" code using which encrypted
> > file data is decrypted. This commit replaces it to make use of the
> > generic read_callbacks facility.
>
> I remember that previously Jaegeuk had mentioned f2fs will support compression
> later, and it needs to reuse 'post read processing' fwk.
>
> There is very initial version of compression feature in below link:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=compression
>
> So my concern is how can we uplift the most common parts of this fwk into vfs,
> and meanwhile keeping the ability and flexibility when introducing private
> feature/step in specified filesytem(now f2fs)?
>
> According to current f2fs compression's requirement, maybe we can expand to
>
> - support callback to let filesystem set the function for the flow in
> decompression/verity/decryption step.
> - support to use individual/common workqueue according the parameter.
>
> Any thoughts?
>
Hi,
F2FS can be made to use fscrypt's queue for decryption and hence can reuse
"read callbacks" code for decrypting data.
For decompression, we could have a STEP_MISC where we invoke a FS provided
callback function for FS specific post read processing?
Something like the following can be implemented in read_callbacks(),
case STEP_MISC:
if (ctx->enabled_steps & (1 << STEP_MISC)) {
/*
ctx->fs_misc() must process bio in a workqueue
and later invoke read_callbacks() with
bio->bi_private's value as an argument.
*/
ctx->fs_misc(ctx->bio);
return;
}
ctx->cur_step++;
The fs_misc() callback can be passed in by the filesystem when invoking
read_callbacks_setup_bio().
--
chandan
WARNING: multiple messages have this Message-ID (diff)
From: Chandan Rajendra <chandan@linux.ibm.com>
To: Chao Yu <chao@kernel.org>
Cc: ebiggers@kernel.org, tytso@mit.edu,
linux-f2fs-devel@lists.sourceforge.net, hch@infradead.org,
linux-fscrypt@vger.kernel.org, adilger.kernel@dilger.ca,
chandanrmail@gmail.com, linux-fsdevel@vger.kernel.org,
jaegeuk@kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data
Date: Mon, 19 Aug 2019 19:03:23 +0530 [thread overview]
Message-ID: <20104514.oSSJcvNEEM@localhost.localdomain> (raw)
In-Reply-To: <bb3dc624-1249-2418-f9da-93da8c11e7f5@kernel.org>
On Sunday, August 18, 2019 7:15:42 PM IST Chao Yu wrote:
> Hi Chandan,
>
> On 2019-8-16 14:18, Chandan Rajendra wrote:
> > F2FS has a copy of "post read processing" code using which encrypted
> > file data is decrypted. This commit replaces it to make use of the
> > generic read_callbacks facility.
>
> I remember that previously Jaegeuk had mentioned f2fs will support compression
> later, and it needs to reuse 'post read processing' fwk.
>
> There is very initial version of compression feature in below link:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=compression
>
> So my concern is how can we uplift the most common parts of this fwk into vfs,
> and meanwhile keeping the ability and flexibility when introducing private
> feature/step in specified filesytem(now f2fs)?
>
> According to current f2fs compression's requirement, maybe we can expand to
>
> - support callback to let filesystem set the function for the flow in
> decompression/verity/decryption step.
> - support to use individual/common workqueue according the parameter.
>
> Any thoughts?
>
Hi,
F2FS can be made to use fscrypt's queue for decryption and hence can reuse
"read callbacks" code for decrypting data.
For decompression, we could have a STEP_MISC where we invoke a FS provided
callback function for FS specific post read processing?
Something like the following can be implemented in read_callbacks(),
case STEP_MISC:
if (ctx->enabled_steps & (1 << STEP_MISC)) {
/*
ctx->fs_misc() must process bio in a workqueue
and later invoke read_callbacks() with
bio->bi_private's value as an argument.
*/
ctx->fs_misc(ctx->bio);
return;
}
ctx->cur_step++;
The fs_misc() callback can be passed in by the filesystem when invoking
read_callbacks_setup_bio().
--
chandan
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2019-08-19 13:31 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 6:17 [PATCH V4 0/8] Consolidate FS read I/O callbacks code Chandan Rajendra
2019-08-16 6:17 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:17 ` [PATCH V4 1/8] buffer_head: Introduce BH_Read_Cb flag Chandan Rajendra
2019-08-16 6:17 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:17 ` [PATCH V4 2/8] FS: Introduce read callbacks Chandan Rajendra
2019-08-16 6:17 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:17 ` [PATCH V4 3/8] fs/mpage.c: Integrate " Chandan Rajendra
2019-08-16 6:17 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:18 ` [PATCH V4 4/8] fs/buffer.c: add decryption support via read_callbacks Chandan Rajendra
2019-08-16 6:18 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:18 ` [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data Chandan Rajendra
2019-08-16 6:18 ` [f2fs-dev] " Chandan Rajendra
2019-08-18 13:45 ` Chao Yu
2019-08-18 13:45 ` Chao Yu
2019-08-19 13:33 ` Chandan Rajendra [this message]
2019-08-19 13:33 ` Chandan Rajendra
2019-08-20 7:43 ` Chao Yu
2019-08-20 7:43 ` Chao Yu
2019-08-20 7:43 ` Chao Yu
2019-08-20 5:05 ` Chandan Rajendra
2019-08-20 5:05 ` [f2fs-dev] " Chandan Rajendra
2019-08-20 5:12 ` Gao Xiang
2019-08-20 5:12 ` Gao Xiang
2019-08-20 5:12 ` [f2fs-dev] " Gao Xiang
2019-08-20 5:16 ` Gao Xiang
2019-08-20 5:16 ` Gao Xiang
2019-08-20 5:16 ` [f2fs-dev] " Gao Xiang
2019-08-20 16:25 ` Theodore Y. Ts'o
2019-08-20 16:25 ` [f2fs-dev] " Theodore Y. Ts'o
2019-08-20 17:07 ` Gao Xiang
2019-08-20 17:07 ` [f2fs-dev] " Gao Xiang via Linux-f2fs-devel
2019-08-20 16:38 ` Theodore Y. Ts'o
2019-08-20 16:38 ` [f2fs-dev] " Theodore Y. Ts'o
2019-08-20 17:31 ` Jaegeuk Kim
2019-08-20 17:31 ` [f2fs-dev] " Jaegeuk Kim
2019-08-21 2:04 ` Chandan Rajendra
2019-08-21 2:04 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:18 ` [PATCH V4 6/8] ext4: Wire up ext4_readpage[s] to use mpage_readpage[s] Chandan Rajendra
2019-08-16 6:18 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:18 ` [PATCH V4 7/8] ext4: Enable encryption for subpage-sized blocks Chandan Rajendra
2019-08-16 6:18 ` [f2fs-dev] " Chandan Rajendra
2019-08-16 6:18 ` [PATCH V4 8/8] fscrypt: remove struct fscrypt_ctx Chandan Rajendra
2019-08-16 6:18 ` [f2fs-dev] " Chandan Rajendra
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=20104514.oSSJcvNEEM@localhost.localdomain \
--to=chandan@linux.ibm.com \
--cc=adilger.kernel@dilger.ca \
--cc=chandanrmail@gmail.com \
--cc=chao@kernel.org \
--cc=ebiggers@kernel.org \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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 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.