[ceph-client:wip-fscrypt 62/69] fs/ceph/inode.c:196:7: error: no member named 'fscrypt_auth' in 'struct ceph_inode_info'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://github.com/ceph/ceph-client.git wip-fscrypt
head:   4ff01fe87e581e76289ec6d1b0c03fc9c4f2f851
commit: fd1aab0d215fa1b9a84a42ec93f09f0283bb8071 [62/69] ceph: add support for encrypted snapshot names
config: hexagon-randconfig-r041-20220417 (https://download.01.org/0day-ci/archive/20220419/202204191205.iIZ9bszj-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
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/fd1aab0d215fa1b9a84a42ec93f09f0283bb8071
        git remote add ceph-client https://github.com/ceph/ceph-client.git
        git fetch --no-tags ceph-client wip-fscrypt
        git checkout fd1aab0d215fa1b9a84a42ec93f09f0283bb8071
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> fs/ceph/inode.c:196:7: error: no member named 'fscrypt_auth' in 'struct ceph_inode_info'
                   ci->fscrypt_auth = kmemdup(pci->fscrypt_auth,
                   ~~  ^
   fs/ceph/inode.c:196:35: error: no member named 'fscrypt_auth' in 'struct ceph_inode_info'
                   ci->fscrypt_auth = kmemdup(pci->fscrypt_auth,
                                              ~~~  ^
>> fs/ceph/inode.c:197:14: error: no member named 'fscrypt_auth_len' in 'struct ceph_inode_info'
                                              pci->fscrypt_auth_len,
                                              ~~~  ^
   fs/ceph/inode.c:199:11: error: no member named 'fscrypt_auth' in 'struct ceph_inode_info'
                   if (ci->fscrypt_auth) {
                       ~~  ^
   fs/ceph/inode.c:201:8: error: no member named 'fscrypt_auth_len' in 'struct ceph_inode_info'
                           ci->fscrypt_auth_len = pci->fscrypt_auth_len;
                           ~~  ^
   fs/ceph/inode.c:201:32: error: no member named 'fscrypt_auth_len' in 'struct ceph_inode_info'
                           ci->fscrypt_auth_len = pci->fscrypt_auth_len;
                                                  ~~~  ^
   6 errors generated.


vim +196 fs/ceph/inode.c

   154	
   155	/*
   156	 * get/constuct snapdir inode for a given directory
   157	 */
   158	struct inode *ceph_get_snapdir(struct inode *parent)
   159	{
   160		struct ceph_vino vino = {
   161			.ino = ceph_ino(parent),
   162			.snap = CEPH_SNAPDIR,
   163		};
   164		struct inode *inode = ceph_get_inode(parent->i_sb, vino, NULL);
   165		struct ceph_inode_info *ci = ceph_inode(inode);
   166		int ret = -ENOTDIR;
   167	
   168		if (IS_ERR(inode))
   169			return inode;
   170	
   171		if (!S_ISDIR(parent->i_mode)) {
   172			pr_warn_once("bad snapdir parent type (mode=0%o)\n",
   173				     parent->i_mode);
   174			goto err;
   175		}
   176	
   177		if (!(inode->i_state & I_NEW) && !S_ISDIR(inode->i_mode)) {
   178			pr_warn_once("bad snapdir inode type (mode=0%o)\n",
   179				     inode->i_mode);
   180			goto err;
   181		}
   182	
   183		inode->i_mode = parent->i_mode;
   184		inode->i_uid = parent->i_uid;
   185		inode->i_gid = parent->i_gid;
   186		inode->i_mtime = parent->i_mtime;
   187		inode->i_ctime = parent->i_ctime;
   188		inode->i_atime = parent->i_atime;
   189		ci->i_rbytes = 0;
   190		ci->i_btime = ceph_inode(parent)->i_btime;
   191	
   192		/* if encrypted, just borrow fscrypt_auth from parent */
   193		if (IS_ENCRYPTED(parent)) {
   194			struct ceph_inode_info *pci = ceph_inode(parent);
   195	
 > 196			ci->fscrypt_auth = kmemdup(pci->fscrypt_auth,
 > 197						   pci->fscrypt_auth_len,
   198						   GFP_KERNEL);
   199			if (ci->fscrypt_auth) {
   200				inode->i_flags |= S_ENCRYPTED;
   201				ci->fscrypt_auth_len = pci->fscrypt_auth_len;
   202			} else {
   203				dout("Failed to alloc snapdir fscrypt_auth\n");
   204				ret = -ENOMEM;
   205				goto err;
   206			}
   207		}
   208		if (inode->i_state & I_NEW) {
   209			inode->i_op = &ceph_snapdir_iops;
   210			inode->i_fop = &ceph_snapdir_fops;
   211			ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */
   212			unlock_new_inode(inode);
   213		}
   214	
   215		return inode;
   216	err:
   217		if ((inode->i_state & I_NEW))
   218			discard_new_inode(inode);
   219		else
   220			iput(inode);
   221		return ERR_PTR(ret);
   222	}
   223	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[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