All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-stable:pending-5.15 109/134] fs/ceph/addr.c:193:25: error: invalid use of undefined type 'struct ceph_netfs_request_data'
@ 2023-07-26  5:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-26  5:59 UTC (permalink / raw)
  To: Sasha Levin; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.15
head:   87f4ba57f1150224de9c636607e1c320d21b5f48
commit: 2e7ad1f4bed3c73ced43e438d22dcc563073aee3 [109/134] ceph: fix blindly expanding the readahead windows
config: sh-randconfig-r016-20230725 (https://download.01.org/0day-ci/archive/20230726/202307261330.Ri2WOB43-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261330.Ri2WOB43-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/202307261330.Ri2WOB43-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/ceph/addr.c: In function 'ceph_netfs_expand_readahead':
>> fs/ceph/addr.c:193:25: error: invalid use of undefined type 'struct ceph_netfs_request_data'
     193 |                 if (priv->file_ra_disabled)
         |                         ^~
   fs/ceph/addr.c:196:41: error: invalid use of undefined type 'struct ceph_netfs_request_data'
     196 |                         max_pages = priv->file_ra_pages;
         |                                         ^~


vim +193 fs/ceph/addr.c

   179	
   180	static void ceph_netfs_expand_readahead(struct netfs_read_request *rreq)
   181	{
   182		struct inode *inode = rreq->inode;
   183		struct ceph_inode_info *ci = ceph_inode(inode);
   184		struct ceph_file_layout *lo = &ci->i_layout;
   185		unsigned long max_pages = inode->i_sb->s_bdi->ra_pages;
   186		loff_t end = rreq->start + rreq->len, new_end;
   187		struct ceph_netfs_request_data *priv = rreq->netfs_priv;
   188		unsigned long max_len;
   189		u32 blockoff;
   190	
   191		if (priv) {
   192			/* Readahead is disabled by posix_fadvise POSIX_FADV_RANDOM */
 > 193			if (priv->file_ra_disabled)
   194				max_pages = 0;
   195			else
   196				max_pages = priv->file_ra_pages;
   197	
   198		}
   199	
   200		/* Readahead is disabled */
   201		if (!max_pages)
   202			return;
   203	
   204		max_len = max_pages << PAGE_SHIFT;
   205	
   206		/*
   207		 * Try to expand the length forward by rounding up it to the next
   208		 * block, but do not exceed the file size, unless the original
   209		 * request already exceeds it.
   210		 */
   211		new_end = min(round_up(end, lo->stripe_unit), rreq->i_size);
   212		if (new_end > end && new_end <= rreq->start + max_len)
   213			rreq->len = new_end - rreq->start;
   214	
   215		/* Try to expand the start downward */
   216		div_u64_rem(rreq->start, lo->stripe_unit, &blockoff);
   217		if (rreq->len + blockoff <= max_len) {
   218			rreq->start -= blockoff;
   219			rreq->len += blockoff;
   220		}
   221	}
   222	

-- 
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:[~2023-07-26  6:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26  5:59 [sashal-stable:pending-5.15 109/134] fs/ceph/addr.c:193:25: error: invalid use of undefined type 'struct ceph_netfs_request_data' 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.