All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:ceph-iter 101/105] fs/ceph/file.c:1095:47: warning: variable 'pages' is uninitialized when used here
@ 2024-01-16 19:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-16 19:51 UTC (permalink / raw)
  To: David Howells; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git ceph-iter
head:   2cf82c6e7baf6d3a2adc0692707028da395f1553
commit: 965a1375ea469bee4bbe77c7a60e7e351148a8b4 [101/105] ceph: Don't use data_pages
config: i386-buildonly-randconfig-002-20240116 (https://download.01.org/0day-ci/archive/20240117/202401170319.8ukfAzek-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240117/202401170319.8ukfAzek-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401170319.8ukfAzek-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/ceph/file.c:1095:47: warning: variable 'pages' is uninitialized when used here [-Wuninitialized]
    1095 |                         fret = ceph_fscrypt_decrypt_extents(inode, pages,
         |                                                                    ^~~~~
   fs/ceph/file.c:1018:22: note: initialize the variable 'pages' to silence this warning
    1018 |                 struct page **pages;
         |                                    ^
         |                                     = NULL
   fs/ceph/file.c:1778:9: error: use of undeclared identifier 'pages'
    1778 |                                                         &pages[num_pages - 1],
         |                                                          ^
   fs/ceph/file.c:1808:24: error: use of undeclared identifier 'pages'
    1808 |                                         zero_user_segment(pages[0], 0,
         |                                                           ^
   fs/ceph/file.c:1811:24: error: use of undeclared identifier 'pages'
    1811 |                                         zero_user_segment(pages[num_pages - 1],
         |                                                           ^
   fs/ceph/file.c:1817:31: error: use of undeclared identifier 'pages'
    1817 |                                         ceph_release_page_vector(pages, num_pages);
         |                                                                  ^
   fs/ceph/file.c:1824:25: error: use of undeclared identifier 'pages'
    1824 |                                                 zero_user_segment(pages[0], 0,
         |                                                                   ^
   fs/ceph/file.c:1827:25: error: use of undeclared identifier 'pages'
    1827 |                                                 zero_user_segment(pages[num_pages - 1],
         |                                                                   ^
   fs/ceph/file.c:1835:31: error: use of undeclared identifier 'pages'
    1835 |                                         ceph_release_page_vector(pages, num_pages);
         |                                                                  ^
   fs/ceph/file.c:1842:25: error: use of undeclared identifier 'pages'
    1842 |                                                 zero_user_segment(pages[num_pages - 1],
         |                                                                   ^
   fs/ceph/file.c:1850:32: error: use of undeclared identifier 'pages'
    1850 |                                                 ceph_release_page_vector(pages, num_pages);
         |                                                                          ^
   fs/ceph/file.c:1862:8: error: use of undeclared identifier 'pages'
    1862 |                                                         pages[0], CEPH_FSCRYPT_BLOCK_SIZE,
         |                                                         ^
   fs/ceph/file.c:1866:32: error: use of undeclared identifier 'pages'
    1866 |                                                 ceph_release_page_vector(pages, num_pages);
         |                                                                          ^
   fs/ceph/file.c:1872:8: error: use of undeclared identifier 'pages'
    1872 |                                                         pages[num_pages - 1],
         |                                                         ^
   fs/ceph/file.c:1877:32: error: use of undeclared identifier 'pages'
    1877 |                                                 ceph_release_page_vector(pages, num_pages);
         |                                                                          ^
   fs/ceph/file.c:1890:30: error: use of undeclared identifier 'pages'
    1890 |                         ret = copy_page_from_iter(pages[n], off, plen, from);
         |                                                   ^
   fs/ceph/file.c:1900:29: error: use of undeclared identifier 'pages'
    1900 |                         ceph_release_page_vector(pages, num_pages);
         |                                                  ^
   fs/ceph/file.c:1905:44: error: use of undeclared identifier 'pages'
    1905 |                         ret = ceph_fscrypt_encrypt_pages(inode, pages,
         |                                                                 ^
   fs/ceph/file.c:1910:30: error: use of undeclared identifier 'pages'
    1910 |                                 ceph_release_page_vector(pages, num_pages);
         |                                                          ^
   fs/ceph/file.c:1924:29: error: use of undeclared identifier 'pages'
    1924 |                         ceph_release_page_vector(pages, num_pages);
         |                                                  ^
   fs/ceph/file.c:1929:54: error: use of undeclared identifier 'pages'
    1929 |                 osd_req_op_extent_osd_data_pages(req, rmw ? 1 : 0, pages, write_len,
         |                                                                    ^
   1 warning and 19 errors generated.


vim +/pages +1095 fs/ceph/file.c

83701246aee8f8 Yan, Zheng    2014-11-14   969  
124e68e7409909 Sage Weil     2009-10-06   970  /*
124e68e7409909 Sage Weil     2009-10-06   971   * Completely synchronous read and write methods.  Direct from __user
124e68e7409909 Sage Weil     2009-10-06   972   * buffer to osd, or directly to user pages (if O_DIRECT).
124e68e7409909 Sage Weil     2009-10-06   973   *
fce7a9744bdf3b Yan, Zheng    2018-09-29   974   * If the read spans object boundary, just do multiple reads.  (That's not
fce7a9744bdf3b Yan, Zheng    2018-09-29   975   * atomic, but good enough for now.)
fce7a9744bdf3b Yan, Zheng    2018-09-29   976   *
fce7a9744bdf3b Yan, Zheng    2018-09-29   977   * If we get a short result from the OSD, check against i_size; we need to
fce7a9744bdf3b Yan, Zheng    2018-09-29   978   * only return a short read to the caller if we hit EOF.
124e68e7409909 Sage Weil     2009-10-06   979   */
d4d518871574eb Xiubo Li      2022-08-25   980  ssize_t __ceph_sync_read(struct inode *inode, loff_t *ki_pos,
d4d518871574eb Xiubo Li      2022-08-25   981  			 struct iov_iter *to, int *retry_op,
d4d518871574eb Xiubo Li      2022-08-25   982  			 u64 *last_objver)
124e68e7409909 Sage Weil     2009-10-06   983  {
fce7a9744bdf3b Yan, Zheng    2018-09-29   984  	struct ceph_inode_info *ci = ceph_inode(inode);
5995d90d2d19f3 Xiubo Li      2023-06-12   985  	struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
38d46409c4639a Xiubo Li      2023-06-12   986  	struct ceph_client *cl = fsc->client;
fce7a9744bdf3b Yan, Zheng    2018-09-29   987  	struct ceph_osd_client *osdc = &fsc->client->osdc;
965a1375ea469b David Howells 2023-07-31   988  	struct ceph_databuf *dbuf;
7ce469a53e7106 Yan, Zheng    2016-11-08   989  	ssize_t ret;
d4d518871574eb Xiubo Li      2022-08-25   990  	u64 off = *ki_pos;
fce7a9744bdf3b Yan, Zheng    2018-09-29   991  	u64 len = iov_iter_count(to);
e485d028bb1075 Jeff Layton   2021-11-23   992  	u64 i_size = i_size_read(inode);
f0fe1e54cfcf52 Jeff Layton   2022-08-25   993  	bool sparse = IS_ENCRYPTED(inode) || ceph_test_mount_opt(fsc, SPARSEREAD);
d4d518871574eb Xiubo Li      2022-08-25   994  	u64 objver = 0;
124e68e7409909 Sage Weil     2009-10-06   995  
38d46409c4639a Xiubo Li      2023-06-12   996  	doutc(cl, "on inode %p %llx.%llx %llx~%llx\n", inode,
38d46409c4639a Xiubo Li      2023-06-12   997  	      ceph_vinop(inode), *ki_pos, len);
d4d518871574eb Xiubo Li      2022-08-25   998  
d4d518871574eb Xiubo Li      2022-08-25   999  	if (ceph_inode_is_shutdown(inode))
d4d518871574eb Xiubo Li      2022-08-25  1000  		return -EIO;
d0d0db2268cc34 Yan, Zheng    2014-07-21  1001  
d0d0db2268cc34 Yan, Zheng    2014-07-21  1002  	if (!len)
d0d0db2268cc34 Yan, Zheng    2014-07-21  1003  		return 0;
124e68e7409909 Sage Weil     2009-10-06  1004  	/*
124e68e7409909 Sage Weil     2009-10-06  1005  	 * flush any page cache pages in this range.  this
e98b6fed84d0f0 Sage Weil     2010-11-09  1006  	 * will make concurrent normal and sync io slow,
124e68e7409909 Sage Weil     2009-10-06  1007  	 * but it will at least behave sensibly when they are
124e68e7409909 Sage Weil     2009-10-06  1008  	 * in sequence.
124e68e7409909 Sage Weil     2009-10-06  1009  	 */
e450f4d1a5d633 zhengbin      2019-02-01  1010  	ret = filemap_write_and_wait_range(inode->i_mapping,
e450f4d1a5d633 zhengbin      2019-02-01  1011  					   off, off + len - 1);
29065a513aa4c7 Yehuda Sadeh  2010-02-09  1012  	if (ret < 0)
8eb4efb091c8d8 majianpeng    2013-09-26  1013  		return ret;
29065a513aa4c7 Yehuda Sadeh  2010-02-09  1014  
fce7a9744bdf3b Yan, Zheng    2018-09-29  1015  	ret = 0;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1016  	while ((len = iov_iter_count(to)) > 0) {
fce7a9744bdf3b Yan, Zheng    2018-09-29  1017  		struct ceph_osd_request *req;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1018  		struct page **pages;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1019  		int num_pages;
7ce469a53e7106 Yan, Zheng    2016-11-08  1020  		size_t page_off;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1021  		bool more;
c5f575ed08c38d Jeff Layton   2020-08-21  1022  		int idx;
c5f575ed08c38d Jeff Layton   2020-08-21  1023  		size_t left;
03bc06c7b0bd8d Jeff Layton   2022-02-26  1024  		struct ceph_osd_req_op *op;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1025  		u64 read_off = off;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1026  		u64 read_len = len;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1027  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1028  		/* determine new offset/length if encrypted */
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1029  		ceph_fscrypt_adjust_off_and_len(inode, &read_off, &read_len);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1030  
38d46409c4639a Xiubo Li      2023-06-12  1031  		doutc(cl, "orig %llu~%llu reading %llu~%llu", off, len,
38d46409c4639a Xiubo Li      2023-06-12  1032  		      read_off, read_len);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1033  
fce7a9744bdf3b Yan, Zheng    2018-09-29  1034  		req = ceph_osdc_new_request(osdc, &ci->i_layout,
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1035  					ci->i_vino, read_off, &read_len, 0, 1,
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1036  					sparse ? CEPH_OSD_OP_SPARSE_READ :
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1037  						 CEPH_OSD_OP_READ,
03bc06c7b0bd8d Jeff Layton   2022-02-26  1038  					CEPH_OSD_FLAG_READ,
fce7a9744bdf3b Yan, Zheng    2018-09-29  1039  					NULL, ci->i_truncate_seq,
fce7a9744bdf3b Yan, Zheng    2018-09-29  1040  					ci->i_truncate_size, false);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1041  		if (IS_ERR(req)) {
fce7a9744bdf3b Yan, Zheng    2018-09-29  1042  			ret = PTR_ERR(req);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1043  			break;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1044  		}
fce7a9744bdf3b Yan, Zheng    2018-09-29  1045  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1046  		/* adjust len downward if the request truncated the len */
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1047  		if (off + len > read_off + read_len)
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1048  			len = read_off + read_len - off;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1049  		more = len < iov_iter_count(to);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1050  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1051  		num_pages = calc_pages_for(read_off, read_len);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1052  		page_off = offset_in_page(off);
965a1375ea469b David Howells 2023-07-31  1053  		dbuf = ceph_databuf_req_alloc(num_pages, read_len, GFP_KERNEL);
965a1375ea469b David Howells 2023-07-31  1054  		if (!dbuf) {
fce7a9744bdf3b Yan, Zheng    2018-09-29  1055  			ceph_osdc_put_request(req);
965a1375ea469b David Howells 2023-07-31  1056  			ret = -ENOMEM;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1057  			break;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1058  		}
7ce469a53e7106 Yan, Zheng    2016-11-08  1059  
965a1375ea469b David Howells 2023-07-31  1060  		osd_req_op_extent_osd_databuf(req, 0, dbuf);
03bc06c7b0bd8d Jeff Layton   2022-02-26  1061  
03bc06c7b0bd8d Jeff Layton   2022-02-26  1062  		op = &req->r_ops[0];
03bc06c7b0bd8d Jeff Layton   2022-02-26  1063  		if (sparse) {
03bc06c7b0bd8d Jeff Layton   2022-02-26  1064  			ret = ceph_alloc_sparse_ext_map(op);
03bc06c7b0bd8d Jeff Layton   2022-02-26  1065  			if (ret) {
03bc06c7b0bd8d Jeff Layton   2022-02-26  1066  				ceph_osdc_put_request(req);
03bc06c7b0bd8d Jeff Layton   2022-02-26  1067  				break;
03bc06c7b0bd8d Jeff Layton   2022-02-26  1068  			}
03bc06c7b0bd8d Jeff Layton   2022-02-26  1069  		}
03bc06c7b0bd8d Jeff Layton   2022-02-26  1070  
a8af0d682ae0c9 Jeff Layton   2022-06-30  1071  		ceph_osdc_start_request(osdc, req);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1072  		ret = ceph_osdc_wait_request(osdc, req);
97e27aaa9a2cbd Xiubo Li      2020-03-19  1073  
8ae99ae2b40766 Xiubo Li      2021-03-22  1074  		ceph_update_read_metrics(&fsc->mdsc->metric,
97e27aaa9a2cbd Xiubo Li      2020-03-19  1075  					 req->r_start_latency,
97e27aaa9a2cbd Xiubo Li      2020-03-19  1076  					 req->r_end_latency,
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1077  					 read_len, ret);
97e27aaa9a2cbd Xiubo Li      2020-03-19  1078  
d4d518871574eb Xiubo Li      2022-08-25  1079  		if (ret > 0)
d4d518871574eb Xiubo Li      2022-08-25  1080  			objver = req->r_version;
d4d518871574eb Xiubo Li      2022-08-25  1081  
fce7a9744bdf3b Yan, Zheng    2018-09-29  1082  		i_size = i_size_read(inode);
38d46409c4639a Xiubo Li      2023-06-12  1083  		doutc(cl, "%llu~%llu got %zd i_size %llu%s\n", off, len,
38d46409c4639a Xiubo Li      2023-06-12  1084  		      ret, i_size, (more ? " MORE" : ""));
fce7a9744bdf3b Yan, Zheng    2018-09-29  1085  
03bc06c7b0bd8d Jeff Layton   2022-02-26  1086  		/* Fix it to go to end of extent map */
03bc06c7b0bd8d Jeff Layton   2022-02-26  1087  		if (sparse && ret >= 0)
03bc06c7b0bd8d Jeff Layton   2022-02-26  1088  			ret = ceph_sparse_ext_map_end(op);
03bc06c7b0bd8d Jeff Layton   2022-02-26  1089  		else if (ret == -ENOENT)
fce7a9744bdf3b Yan, Zheng    2018-09-29  1090  			ret = 0;
03bc06c7b0bd8d Jeff Layton   2022-02-26  1091  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1092  		if (ret > 0 && IS_ENCRYPTED(inode)) {
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1093  			int fret;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1094  
f0fe1e54cfcf52 Jeff Layton   2022-08-25 @1095  			fret = ceph_fscrypt_decrypt_extents(inode, pages,
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1096  					read_off, op->extent.sparse_ext,
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1097  					op->extent.sparse_ext_cnt);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1098  			if (fret < 0) {
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1099  				ret = fret;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1100  				ceph_osdc_put_request(req);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1101  				break;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1102  			}
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1103  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1104  			/* account for any partial block at the beginning */
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1105  			fret -= (off - read_off);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1106  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1107  			/*
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1108  			 * Short read after big offset adjustment?
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1109  			 * Nothing is usable, just call it a zero
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1110  			 * len read.
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1111  			 */
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1112  			fret = max(fret, 0);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1113  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1114  			/* account for partial block at the end */
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1115  			ret = min_t(ssize_t, fret, len);
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1116  		}
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1117  
03bc06c7b0bd8d Jeff Layton   2022-02-26  1118  		ceph_osdc_put_request(req);
03bc06c7b0bd8d Jeff Layton   2022-02-26  1119  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1120  		/* Short read but not EOF? Zero out the remainder. */
fce7a9744bdf3b Yan, Zheng    2018-09-29  1121  		if (ret >= 0 && ret < len && (off + ret < i_size)) {
fce7a9744bdf3b Yan, Zheng    2018-09-29  1122  			int zlen = min(len - ret, i_size - off - ret);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1123  			int zoff = page_off + ret;
03bc06c7b0bd8d Jeff Layton   2022-02-26  1124  
38d46409c4639a Xiubo Li      2023-06-12  1125  			doutc(cl, "zero gap %llu~%llu\n", off + ret,
38d46409c4639a Xiubo Li      2023-06-12  1126  			      off + ret + zlen);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1127  			ceph_zero_page_vector_range(zoff, zlen, pages);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1128  			ret += zlen;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1129  		}
fce7a9744bdf3b Yan, Zheng    2018-09-29  1130  
c5f575ed08c38d Jeff Layton   2020-08-21  1131  		idx = 0;
c5f575ed08c38d Jeff Layton   2020-08-21  1132  		left = ret > 0 ? ret : 0;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1133  		while (left > 0) {
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1134  			size_t plen, copied;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1135  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1136  			plen = min_t(size_t, left, PAGE_SIZE - page_off);
c5f575ed08c38d Jeff Layton   2020-08-21  1137  			SetPageUptodate(pages[idx]);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1138  			copied = copy_page_to_iter(pages[idx++],
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1139  						   page_off, plen, to);
fce7a9744bdf3b Yan, Zheng    2018-09-29  1140  			off += copied;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1141  			left -= copied;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1142  			page_off = 0;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1143  			if (copied < plen) {
fce7a9744bdf3b Yan, Zheng    2018-09-29  1144  				ret = -EFAULT;
8eb4efb091c8d8 majianpeng    2013-09-26  1145  				break;
8eb4efb091c8d8 majianpeng    2013-09-26  1146  			}
8eb4efb091c8d8 majianpeng    2013-09-26  1147  		}
965a1375ea469b David Howells 2023-07-31  1148  		ceph_databuf_release(dbuf);
8eb4efb091c8d8 majianpeng    2013-09-26  1149  
131d7eb4faa1fc Yan, Zheng    2019-07-25  1150  		if (ret < 0) {
0b98acd6188309 Ilya Dryomov  2020-09-14  1151  			if (ret == -EBLOCKLISTED)
0b98acd6188309 Ilya Dryomov  2020-09-14  1152  				fsc->blocklisted = true;
131d7eb4faa1fc Yan, Zheng    2019-07-25  1153  			break;
131d7eb4faa1fc Yan, Zheng    2019-07-25  1154  		}
131d7eb4faa1fc Yan, Zheng    2019-07-25  1155  
131d7eb4faa1fc Yan, Zheng    2019-07-25  1156  		if (off >= i_size || !more)
fce7a9744bdf3b Yan, Zheng    2018-09-29  1157  			break;
fce7a9744bdf3b Yan, Zheng    2018-09-29  1158  	}
fce7a9744bdf3b Yan, Zheng    2018-09-29  1159  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1160  	if (ret > 0) {
d4d518871574eb Xiubo Li      2022-08-25  1161  		if (off > *ki_pos) {
c3d8e0b5de487a Xiubo Li      2021-10-30  1162  			if (off >= i_size) {
fce7a9744bdf3b Yan, Zheng    2018-09-29  1163  				*retry_op = CHECK_EOF;
d4d518871574eb Xiubo Li      2022-08-25  1164  				ret = i_size - *ki_pos;
d4d518871574eb Xiubo Li      2022-08-25  1165  				*ki_pos = i_size;
c3d8e0b5de487a Xiubo Li      2021-10-30  1166  			} else {
d4d518871574eb Xiubo Li      2022-08-25  1167  				ret = off - *ki_pos;
d4d518871574eb Xiubo Li      2022-08-25  1168  				*ki_pos = off;
8eb4efb091c8d8 majianpeng    2013-09-26  1169  			}
c3d8e0b5de487a Xiubo Li      2021-10-30  1170  		}
8eb4efb091c8d8 majianpeng    2013-09-26  1171  
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1172  		if (last_objver)
d4d518871574eb Xiubo Li      2022-08-25  1173  			*last_objver = objver;
f0fe1e54cfcf52 Jeff Layton   2022-08-25  1174  	}
38d46409c4639a Xiubo Li      2023-06-12  1175  	doutc(cl, "result %zd retry_op %d\n", ret, *retry_op);
124e68e7409909 Sage Weil     2009-10-06  1176  	return ret;
124e68e7409909 Sage Weil     2009-10-06  1177  }
124e68e7409909 Sage Weil     2009-10-06  1178  

:::::: The code at line 1095 was first introduced by commit
:::::: f0fe1e54cfcf5209a88d720671dc6637774b8757 ceph: plumb in decryption during reads

:::::: TO: Jeff Layton <jlayton@kernel.org>
:::::: CC: Ilya Dryomov <idryomov@gmail.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 19:51 [dhowells-fs:ceph-iter 101/105] fs/ceph/file.c:1095:47: warning: variable 'pages' is uninitialized when used here kernel test robot

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.