tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-folio-regions head: 2f3fe780e9a44691136170536363c701b527d0e8 commit: 7261c29990677f14498f0aa1749db277a581b9c3 [13/36] netfs: Add a netfs inode context config: i386-randconfig-s031-20210830 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-348-gf0e6938b-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=7261c29990677f14498f0aa1749db277a581b9c3 git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git git fetch --no-tags dhowells-fs netfs-folio-regions git checkout 7261c29990677f14498f0aa1749db277a581b9c3 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): fs/netfs/read_helper.c: In function 'netfs_write_begin': >> fs/netfs/read_helper.c:1260:7: error: implicit declaration of function 'netfs_is_cache_enabled' [-Werror=implicit-function-declaration] 1260 | if (!netfs_is_cache_enabled(ctx) && | ^~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/netfs_is_cache_enabled +1260 fs/netfs/read_helper.c 1187 1188 /** 1189 * netfs_write_begin - Helper to prepare for writing 1190 * @file: The file to read from 1191 * @mapping: The mapping to read from 1192 * @pos: File position at which the write will begin 1193 * @len: The length of the write (may extend beyond the end of the folio chosen) 1194 * @aop_flags: AOP_* flags 1195 * @_folio: Where to put the resultant folio 1196 * @_fsdata: Place for the netfs to store a cookie 1197 * 1198 * Pre-read data for a write-begin request by drawing data from the cache if 1199 * possible, or the netfs if not. Space beyond the EOF is zero-filled. 1200 * Multiple I/O requests from different sources will get munged together. If 1201 * necessary, the readahead window can be expanded in either direction to a 1202 * more convenient alighment for RPC efficiency or to make storage in the cache 1203 * feasible. 1204 * 1205 * The calling netfs must provide a table of operations, only one of which, 1206 * issue_op, is mandatory. 1207 * 1208 * The check_write_begin() operation can be provided to check for and flush 1209 * conflicting writes once the folio is grabbed and locked. It is passed a 1210 * pointer to the fsdata cookie that gets returned to the VM to be passed to 1211 * write_end. It is permitted to sleep. It should return 0 if the request 1212 * should go ahead; unlock the folio and return -EAGAIN to cause the folio to 1213 * be regot; or return an error. 1214 * 1215 * The calling netfs must initialise a netfs context contiguous to the vfs 1216 * inode before calling this. 1217 * 1218 * This is usable whether or not caching is enabled. 1219 */ 1220 int netfs_write_begin(struct file *file, struct address_space *mapping, 1221 loff_t pos, unsigned int len, unsigned int aop_flags, 1222 struct folio **_folio, void **_fsdata) 1223 { 1224 struct netfs_read_request *rreq; 1225 struct netfs_i_context *ctx = netfs_i_context(file_inode(file )); 1226 struct folio *folio; 1227 unsigned int debug_index = 0, fgp_flags; 1228 pgoff_t index = pos >> PAGE_SHIFT; 1229 int ret; 1230 1231 DEFINE_READAHEAD(ractl, file, NULL, mapping, index); 1232 1233 retry: 1234 fgp_flags = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE; 1235 if (aop_flags & AOP_FLAG_NOFS) 1236 fgp_flags |= FGP_NOFS; 1237 folio = __filemap_get_folio(mapping, index, fgp_flags, 1238 mapping_gfp_mask(mapping)); 1239 if (!folio) 1240 return -ENOMEM; 1241 1242 if (ctx->ops->check_write_begin) { 1243 /* Allow the netfs (eg. ceph) to flush conflicts. */ 1244 ret = ctx->ops->check_write_begin(file, pos, len, folio, _fsdata); 1245 if (ret < 0) { 1246 trace_netfs_failure(NULL, NULL, ret, netfs_fail_check_write_begin); 1247 if (ret == -EAGAIN) 1248 goto retry; 1249 goto error; 1250 } 1251 } 1252 1253 if (folio_test_uptodate(folio)) 1254 goto have_folio; 1255 1256 /* If the folio is beyond the EOF, we want to clear it - unless it's 1257 * within the cache granule containing the EOF, in which case we need 1258 * to preload the granule. 1259 */ > 1260 if (!netfs_is_cache_enabled(ctx) && --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org