[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <34410c5d-6bfd-77cf-bbe3-4d9d66dc0a43@redhat.com>
Date: Thu, 14 Jul 2022 08:41:07 +0800
From: Xiubo Li <xiubli@...hat.com>
To: Jeff Layton <jlayton@...nel.org>, ceph-devel@...r.kernel.org,
idryomov@...il.com
Cc: vshankar@...hat.com, linux-kernel@...r.kernel.org,
Eric Biggers <ebiggers@...nel.org>
Subject: Re: [PATCH] ceph: fix up test_dummy_encryption handling for new mount
API
On 7/14/22 2:56 AM, Jeff Layton wrote:
> On Wed, 2022-07-13 at 20:55 +0800, Xiubo Li wrote:
>> Hi Jeff,
>>
>> I am rebasing the 'wip-fscrypt' branch to the 'testing', and there is
>> one commit conflicts:
>>
>> commit 81faddddbef409bcaa1aa3d89e59606cde94dab7
>> Author: Jeff Layton <jlayton@...nel.org>
>> Date: Wed Dec 1 09:21:39 2021 -0500
>>
>> ceph: add infrastructure for file encryption and decryption
>>
>> ...and allow test_dummy_encryption to bypass content encryption
>> if mounted with test_dummy_encryption=clear.
>>
>> Reviewed-by: Xiubo Li <xiubli@...hat.com>
>> Signed-off-by: Jeff Layton <jlayton@...nel.org>
>>
>> And the conflicts are:
>>
>> [xiubli@...ora ]$ cat fs/ceph/super.h.rej
>> --- fs/ceph/super.h
>> +++ fs/ceph/super.h
>> @@ -45,6 +45,7 @@
>> #define CEPH_MOUNT_OPT_NOPAGECACHE (1<<16) /* bypass pagecache
>> altogether */
>> #define CEPH_MOUNT_OPT_SPARSEREAD (1<<17) /* always do sparse
>> reads */
>> #define CEPH_MOUNT_OPT_TEST_DUMMY_ENC (1<<18) /* enable dummy
>> encryption (for testing) */
>> +#define CEPH_MOUNT_OPT_DUMMY_ENC_CLEAR (1<<19) /* don't actually
>> encrypt content */
>>
>> #define CEPH_MOUNT_OPT_DEFAULT \
>> (CEPH_MOUNT_OPT_DCACHE | \
>>
>> [xiubli@...ora ]$ cat fs/ceph/super.c.rej
>> --- fs/ceph/super.c
>> +++ fs/ceph/super.c
>> @@ -1098,6 +1098,14 @@ static int ceph_set_test_dummy_encryption(struct
>> super_block *sb, struct fs_cont
>> return -EEXIST;
>> }
>>
>> + /* HACK: allow for cleartext "encryption" in files for testing */
>> + if (fsc->mount_options->test_dummy_encryption &&
>> + !strcmp(fsc->mount_options->test_dummy_encryption, "clear")) {
>> + fsopt->flags |= CEPH_MOUNT_OPT_DUMMY_ENC_CLEAR;
>> + kfree(fsc->mount_options->test_dummy_encryption);
>> + fsc->mount_options->test_dummy_encryption = NULL;
>> + }
>> +
>> err = fscrypt_set_test_dummy_encryption(sb,
>> fsc->mount_options->test_dummy_encryption,
>> &fsc->dummy_enc_policy);
>>
>> And I have pushed the tmp patches to
>> https://github.com/lxbsz/ceph-client/commits/lxb-wip-fscrypt3.
>>
>> Please take a look is that okay ?
>>
>> Thanks
>>
>> -- Xiubo
>>
>>
> The result looks good to me. Thanks for fixing this up.
Cool. Thanks Jeff!
>
Powered by blists - more mailing lists