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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@xxxxxxxxx>

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	





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux