From: kernel test robot <lkp@intel.com>
To: Milind Changire <milindchangire@gmail.com>,
Jeff Layton <jlayton@kernel.org>,
Ilya Dryomov <idryomov@gmail.com>,
ceph-devel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Milind Changire <mchangir@redhat.com>
Subject: Re: [PATCH 1/1] ceph: add getvxattr op
Date: Thu, 13 Jan 2022 03:23:57 +0800 [thread overview]
Message-ID: <202201130325.UBjYGkoh-lkp@intel.com> (raw)
In-Reply-To: <20220111122431.93683-2-mchangir@redhat.com>
Hi Milind,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ceph-client/for-linus]
[also build test WARNING on v5.16 next-20220112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Milind-Changire/ceph-add-getvxattr-support/20220111-202533
base: https://github.com/ceph/ceph-client.git for-linus
config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20220113/202201130325.UBjYGkoh-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 244dd2913a43a200f5a6544d424cdc37b771028b)
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/0day-ci/linux/commit/9e670d02ce9f9d6e1ac3e234a89d305c85302338
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Milind-Changire/ceph-add-getvxattr-support/20220111-202533
git checkout 9e670d02ce9f9d6e1ac3e234a89d305c85302338
# 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=i386 SHELL=/bin/bash fs/ceph/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/ceph/inode.c:2326:55: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
dout("do_getvxattr xattr_value_len:%lu, size:%lu\n", xattr_value_len, size);
~~~ ^~~~~~~~~~~~~~~
%u
include/linux/ceph/ceph_debug.h:35:45: note: expanded from macro 'dout'
# define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:580:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
fs/ceph/inode.c:2326:72: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
dout("do_getvxattr xattr_value_len:%lu, size:%lu\n", xattr_value_len, size);
~~~ ^~~~
%u
include/linux/ceph/ceph_debug.h:35:45: note: expanded from macro 'dout'
# define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:580:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
2 warnings generated.
vim +2326 fs/ceph/inode.c
2293
2294 int ceph_do_getvxattr(struct inode *inode, const char *name, void *value,
2295 size_t size)
2296 {
2297 struct ceph_fs_client *fsc = ceph_sb_to_client(inode->i_sb);
2298 struct ceph_mds_client *mdsc = fsc->mdsc;
2299 struct ceph_mds_request *req;
2300 int mode = USE_AUTH_MDS;
2301 int err;
2302 char *xattr_value;
2303 size_t xattr_value_len;
2304
2305 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETVXATTR, mode);
2306 if (IS_ERR(req)) {
2307 err = -ENOMEM;
2308 goto out;
2309 }
2310
2311 req->r_path2 = kstrdup(name, GFP_NOFS);
2312 if (!req->r_path2) {
2313 err = -ENOMEM;
2314 goto put;
2315 }
2316
2317 ihold(inode);
2318 req->r_inode = inode;
2319 err = ceph_mdsc_do_request(mdsc, NULL, req);
2320 if (err < 0)
2321 goto put;
2322
2323 xattr_value = req->r_reply_info.xattr_info.xattr_value;
2324 xattr_value_len = req->r_reply_info.xattr_info.xattr_value_len;
2325
> 2326 dout("do_getvxattr xattr_value_len:%lu, size:%lu\n", xattr_value_len, size);
2327
2328 err = xattr_value_len;
2329 if (size == 0)
2330 goto put;
2331
2332 if (xattr_value_len > size) {
2333 err = -ERANGE;
2334 goto put;
2335 }
2336
2337 memcpy(value, xattr_value, xattr_value_len);
2338 put:
2339 ceph_mdsc_put_request(req);
2340 out:
2341 dout("do_getvxattr result=%d\n", err);
2342 return err;
2343 }
2344
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/1] ceph: add getvxattr op
Date: Thu, 13 Jan 2022 03:23:57 +0800 [thread overview]
Message-ID: <202201130325.UBjYGkoh-lkp@intel.com> (raw)
In-Reply-To: <20220111122431.93683-2-mchangir@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 6064 bytes --]
Hi Milind,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ceph-client/for-linus]
[also build test WARNING on v5.16 next-20220112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Milind-Changire/ceph-add-getvxattr-support/20220111-202533
base: https://github.com/ceph/ceph-client.git for-linus
config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20220113/202201130325.UBjYGkoh-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 244dd2913a43a200f5a6544d424cdc37b771028b)
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/0day-ci/linux/commit/9e670d02ce9f9d6e1ac3e234a89d305c85302338
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Milind-Changire/ceph-add-getvxattr-support/20220111-202533
git checkout 9e670d02ce9f9d6e1ac3e234a89d305c85302338
# 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=i386 SHELL=/bin/bash fs/ceph/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/ceph/inode.c:2326:55: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
dout("do_getvxattr xattr_value_len:%lu, size:%lu\n", xattr_value_len, size);
~~~ ^~~~~~~~~~~~~~~
%u
include/linux/ceph/ceph_debug.h:35:45: note: expanded from macro 'dout'
# define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:580:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
fs/ceph/inode.c:2326:72: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
dout("do_getvxattr xattr_value_len:%lu, size:%lu\n", xattr_value_len, size);
~~~ ^~~~
%u
include/linux/ceph/ceph_debug.h:35:45: note: expanded from macro 'dout'
# define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:580:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
2 warnings generated.
vim +2326 fs/ceph/inode.c
2293
2294 int ceph_do_getvxattr(struct inode *inode, const char *name, void *value,
2295 size_t size)
2296 {
2297 struct ceph_fs_client *fsc = ceph_sb_to_client(inode->i_sb);
2298 struct ceph_mds_client *mdsc = fsc->mdsc;
2299 struct ceph_mds_request *req;
2300 int mode = USE_AUTH_MDS;
2301 int err;
2302 char *xattr_value;
2303 size_t xattr_value_len;
2304
2305 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETVXATTR, mode);
2306 if (IS_ERR(req)) {
2307 err = -ENOMEM;
2308 goto out;
2309 }
2310
2311 req->r_path2 = kstrdup(name, GFP_NOFS);
2312 if (!req->r_path2) {
2313 err = -ENOMEM;
2314 goto put;
2315 }
2316
2317 ihold(inode);
2318 req->r_inode = inode;
2319 err = ceph_mdsc_do_request(mdsc, NULL, req);
2320 if (err < 0)
2321 goto put;
2322
2323 xattr_value = req->r_reply_info.xattr_info.xattr_value;
2324 xattr_value_len = req->r_reply_info.xattr_info.xattr_value_len;
2325
> 2326 dout("do_getvxattr xattr_value_len:%lu, size:%lu\n", xattr_value_len, size);
2327
2328 err = xattr_value_len;
2329 if (size == 0)
2330 goto put;
2331
2332 if (xattr_value_len > size) {
2333 err = -ERANGE;
2334 goto put;
2335 }
2336
2337 memcpy(value, xattr_value, xattr_value_len);
2338 put:
2339 ceph_mdsc_put_request(req);
2340 out:
2341 dout("do_getvxattr result=%d\n", err);
2342 return err;
2343 }
2344
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2022-01-12 19:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 12:24 [PATCH 0/1] ceph: add getvxattr support Milind Changire
2022-01-11 12:24 ` [PATCH 1/1] ceph: add getvxattr op Milind Changire
2022-01-11 12:49 ` Jeff Layton
2022-01-11 13:42 ` Milind Changire
[not found] ` <CANmksPRpzAEB70xGVmwKCgwv55bXYwuAruDcdu7ovc4suQqUZA@mail.gmail.com>
2022-01-11 13:48 ` Jeff Layton
2022-01-12 12:30 ` Milind Changire
2022-01-12 12:54 ` Jeff Layton
2022-01-12 13:07 ` Milind Changire
2022-01-12 15:08 ` kernel test robot
2022-01-12 15:08 ` kernel test robot
2022-01-12 19:23 ` kernel test robot [this message]
2022-01-12 19:23 ` kernel test robot
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=202201130325.UBjYGkoh-lkp@intel.com \
--to=lkp@intel.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
--cc=mchangir@redhat.com \
--cc=milindchangire@gmail.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 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.