CEPH filesystem development
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: kernel test robot <lkp@intel.com>, Jeff Layton <jlayton@kernel.org>
Cc: kbuild-all@lists.01.org, ceph-devel@vger.kernel.org
Subject: Re: [ceph-client:testing 1/21] fs/ceph/super.c:1101:46: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
Date: Wed, 13 Jul 2022 22:43:20 +0800	[thread overview]
Message-ID: <14c59411-487c-1702-e09d-3a846ccffced@redhat.com> (raw)
In-Reply-To: <202207132003.QSn2r1BX-lkp@intel.com>

Thanks for this report.

Fixed it by:

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 4ac4a90755a2..0a60821db2c9 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1086,6 +1086,7 @@ static struct dentry *open_root_dentry(struct 
ceph_fs_client *fsc,
         return root;
  }

+#ifdef CONFIG_FS_ENCRYPTION
  static int ceph_apply_test_dummy_encryption(struct super_block *sb,
                                             struct fs_context *fc,
                                             struct ceph_mount_options 
*fsopt)
@@ -1127,6 +1128,14 @@ static int 
ceph_apply_test_dummy_encryption(struct super_block *sb,
         warnfc(fc, "test_dummy_encryption mode enabled");
         return 0;
  }
+#else
+static int ceph_apply_test_dummy_encryption(struct super_block *sb,
+                                           struct fs_context *fc,
+                                           struct ceph_mount_options 
*fsopt)
+{
+       return 0;
+}
+#endif

  /*
   * mount: join the ceph cluster, and open root directory.


On 7/13/22 9:06 PM, kernel test robot wrote:
> tree:   https://github.com/ceph/ceph-client.git testing
> head:   6720fad7ad85215b45fa7899478311d22ba5331a
> commit: f450dd288f2774012e8a4928c696192ed877a5c2 [1/21] ceph: implement -o test_dummy_encryption mount option
> config: sparc64-randconfig-r015-20220712 (https://download.01.org/0day-ci/archive/20220713/202207132003.QSn2r1BX-lkp@intel.com/config)
> compiler: sparc64-linux-gcc (GCC) 11.3.0
> reproduce (this is a W=1 build):
>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>          chmod +x ~/bin/make.cross
>          # https://github.com/ceph/ceph-client/commit/f450dd288f2774012e8a4928c696192ed877a5c2
>          git remote add ceph-client https://github.com/ceph/ceph-client.git
>          git fetch --no-tags ceph-client testing
>          git checkout f450dd288f2774012e8a4928c696192ed877a5c2
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sparc64 SHELL=/bin/bash fs/ceph/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>     fs/ceph/super.c: In function 'ceph_apply_test_dummy_encryption':
>>> fs/ceph/super.c:1101:46: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
>      1101 |             !fscrypt_is_dummy_policy_set(&fsc->fsc_dummy_enc_policy)) {
>           |                                              ^~
>     fs/ceph/super.c:1103:54: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
>      1103 |                                                  &fsc->fsc_dummy_enc_policy))
>           |                                                      ^~
>     fs/ceph/super.c:1110:45: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
>      1110 |         if (fscrypt_is_dummy_policy_set(&fsc->fsc_dummy_enc_policy)) {
>           |                                             ^~
>     fs/ceph/super.c:1112:54: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
>      1112 |                                                  &fsc->fsc_dummy_enc_policy))
>           |                                                      ^~
>     fs/ceph/super.c:1118:12: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
>      1118 |         fsc->fsc_dummy_enc_policy = fsopt->dummy_enc_policy;
>           |            ^~
>     fs/ceph/super.c:1121:50: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy'
>      1121 |         err = fscrypt_add_test_dummy_key(sb, &fsc->fsc_dummy_enc_policy);
>           |                                                  ^~
>
>
> vim +1101 fs/ceph/super.c
>
>    1088	
>    1089	static int ceph_apply_test_dummy_encryption(struct super_block *sb,
>    1090						    struct fs_context *fc,
>    1091						    struct ceph_mount_options *fsopt)
>    1092	{
>    1093		struct ceph_fs_client *fsc = sb->s_fs_info;
>    1094		int err;
>    1095	
>    1096		if (!fscrypt_is_dummy_policy_set(&fsopt->dummy_enc_policy))
>    1097			return 0;
>    1098	
>    1099		/* No changing encryption context on remount. */
>    1100		if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE &&
>> 1101		    !fscrypt_is_dummy_policy_set(&fsc->fsc_dummy_enc_policy)) {
>    1102			if (fscrypt_dummy_policies_equal(&fsopt->dummy_enc_policy,
>    1103							 &fsc->fsc_dummy_enc_policy))
>    1104				return 0;
>    1105			errorfc(fc, "Can't set test_dummy_encryption on remount");
>    1106			return -EINVAL;
>    1107		}
>    1108	
>    1109		/* Also make sure fsopt doesn't contain a conflicting value. */
>    1110		if (fscrypt_is_dummy_policy_set(&fsc->fsc_dummy_enc_policy)) {
>    1111			if (fscrypt_dummy_policies_equal(&fsopt->dummy_enc_policy,
>    1112							 &fsc->fsc_dummy_enc_policy))
>    1113				return 0;
>    1114			errorfc(fc, "Conflicting test_dummy_encryption options");
>    1115			return -EINVAL;
>    1116		}
>    1117	
>    1118		fsc->fsc_dummy_enc_policy = fsopt->dummy_enc_policy;
>    1119		memset(&fsopt->dummy_enc_policy, 0, sizeof(fsopt->dummy_enc_policy));
>    1120	
>    1121		err = fscrypt_add_test_dummy_key(sb, &fsc->fsc_dummy_enc_policy);
>    1122		if (err) {
>    1123			errorfc(fc, "Error adding test dummy encryption key, %d", err);
>    1124			return err;
>    1125		}
>    1126	
>    1127		warnfc(fc, "test_dummy_encryption mode enabled");
>    1128		return 0;
>    1129	}
>    1130	
>


      reply	other threads:[~2022-07-13 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 13:06 [ceph-client:testing 1/21] fs/ceph/super.c:1101:46: error: 'struct ceph_fs_client' has no member named 'fsc_dummy_enc_policy' kernel test robot
2022-07-13 14:43 ` Xiubo Li [this message]

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=14c59411-487c-1702-e09d-3a846ccffced@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=jlayton@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lkp@intel.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