CC: kbuild-...@lists.01.org
TO: "Jeff, Layton," <jlay...@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git 
ceph-fscache-iter
head:   ce11bedb85675dee88f70d28fc09cb5bca59c73e
commit: abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb [76/77] ceph: convert 
writepage over to new helper
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <l...@intel.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>

New smatch warnings:
fs/ceph/addr.c:225 ceph_fsreq_issue_op() error: uninitialized symbol 'err'.
fs/ceph/addr.c:1356 writeback_older_snapc() error: potentially dereferencing 
uninitialized 'oldest'.

Old smatch warnings:
fs/ceph/addr.c:432 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:468 start_read() warn: should 'nr_pages << 12' be a 64 bit type?
fs/ceph/addr.c:2044 __ceph_pool_perm_get() error: we previously assumed 
'pool_ns' could be null (see line 2033)
include/linux/ceph/string_table.h:46 ceph_compare_string() error: we previously 
assumed 'cs' could be null (see line 41)

# 
https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/?id=abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb
git remote add jlayton 
https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git remote update jlayton
git checkout abd9e1c4c6c6d86ef46c1782a886b52f09d87ebb
vim +/err +225 fs/ceph/addr.c

1d3576fd10f0d7 Sage Weil   2009-10-06  187  
e4de9a35b08dcf Jeff Layton 2020-05-21  188  static void 
ceph_fsreq_issue_op(struct fscache_io_request *fsreq)
e4de9a35b08dcf Jeff Layton 2020-05-21  189  {
e4de9a35b08dcf Jeff Layton 2020-05-21  190      struct ceph_fsc_request *cfreq 
= container_of(fsreq,
e4de9a35b08dcf Jeff Layton 2020-05-21  191                                      
              struct ceph_fsc_request,
e4de9a35b08dcf Jeff Layton 2020-05-21  192                                      
              fsc_req);
e4de9a35b08dcf Jeff Layton 2020-05-21  193      struct ceph_osd_request *req = 
&cfreq->osd_req;
e4de9a35b08dcf Jeff Layton 2020-05-21  194      struct ceph_fs_client *fsc = 
req->r_priv;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  195      struct ceph_inode_info *ci = 
ceph_inode(fsreq->mapping->host);
e4de9a35b08dcf Jeff Layton 2020-05-21  196      int err;
e4de9a35b08dcf Jeff Layton 2020-05-21  197  
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  198      if (ci->i_inline_version != 
CEPH_INLINE_NONE) {
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  199              /*
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  200               * Uptodate inline data 
should have been added
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  201               * into page cache 
while getting Fcr caps.
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  202               */
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  203              if (fsreq->pos == 0)
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  204                      err = -EINVAL;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  205              goto out;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  206      }
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  207  
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  208      /* FIXME: in read-for-write 
case, don't issue a read if the write will
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  209       *        cover the whole page.
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  210       */
e4de9a35b08dcf Jeff Layton 2020-05-21  211      err = 
ceph_osdc_start_request(req->r_osdc, req, false);
e4de9a35b08dcf Jeff Layton 2020-05-21  212      if (!err)
e4de9a35b08dcf Jeff Layton 2020-05-21  213              err = 
ceph_osdc_wait_request(req->r_osdc, req);
e4de9a35b08dcf Jeff Layton 2020-05-21  214  
e4de9a35b08dcf Jeff Layton 2020-05-21  215      
ceph_update_read_latency(&fsc->mdsc->metric, req->r_start_latency,
e4de9a35b08dcf Jeff Layton 2020-05-21  216                               
req->r_end_latency, err);
e4de9a35b08dcf Jeff Layton 2020-05-21  217  
e4de9a35b08dcf Jeff Layton 2020-05-21  218      /* no object means success but 
no data */
e4de9a35b08dcf Jeff Layton 2020-05-21  219      if (err == -ENOENT)
e4de9a35b08dcf Jeff Layton 2020-05-21  220              err = 0;
e4de9a35b08dcf Jeff Layton 2020-05-21  221      else if (err == -EBLACKLISTED)
e4de9a35b08dcf Jeff Layton 2020-05-21  222              fsc->blacklisted = true;
abd9e1c4c6c6d8 Jeff Layton 2020-05-26  223  out:
e4de9a35b08dcf Jeff Layton 2020-05-21  224      dout("readpage result %d\n", 
err);
e4de9a35b08dcf Jeff Layton 2020-05-21 @225      fsreq->error = err;
e4de9a35b08dcf Jeff Layton 2020-05-21  226      if (fsreq->io_done)
e4de9a35b08dcf Jeff Layton 2020-05-21  227              fsreq->io_done(fsreq);
e4de9a35b08dcf Jeff Layton 2020-05-21  228  }
e4de9a35b08dcf Jeff Layton 2020-05-21  229  

:::::: The code at line 225 was first introduced by commit
:::::: e4de9a35b08dcfef40ba17f087c6a4a984407445 ceph: convert to using 
fscache_read_helper

:::::: TO: Jeff Layton <jlay...@kernel.org>
:::::: CC: Jeff Layton <jlay...@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to