Messages in this thread | | | Date | Fri, 15 Oct 2021 14:20:54 +0800 | From | kernel test robot <> | Subject | [dhowells-fs:fscache-rewrite-indexing 71/75] include/linux/fscache.h:386: undefined reference to `__fscache_resize_cookie' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing head: 96d4e1af98c26988d3c1b3cf688974c24de90fa9 commit: 8a43aeca4686a1f00f184392066f00da252797d0 [71/75] 9p: Use fscache indexing rewrite and reenable caching config: i386-debian-10.3 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=8a43aeca4686a1f00f184392066f00da252797d0 git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git git fetch --no-tags dhowells-fs fscache-rewrite-indexing git checkout 8a43aeca4686a1f00f184392066f00da252797d0 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: fs/9p/vfs_inode.o: in function `fscache_resize_cookie': >> include/linux/fscache.h:386: undefined reference to `__fscache_resize_cookie' ld: fs/9p/vfs_inode.o: in function `fscache_relinquish_cookie': >> include/linux/fscache.h:305: undefined reference to `__fscache_relinquish_cookie' ld: fs/9p/vfs_inode.o: in function `fscache_use_cookie': >> include/linux/fscache.h:269: undefined reference to `__fscache_use_cookie' ld: fs/9p/vfs_inode_dotl.o: in function `fscache_use_cookie': >> include/linux/fscache.h:269: undefined reference to `__fscache_use_cookie' ld: fs/9p/vfs_addr.o: in function `fscache_begin_read_operation': >> include/linux/fscache.h:483: undefined reference to `__fscache_begin_read_operation' ld: fs/9p/vfs_file.o: in function `fscache_use_cookie': >> include/linux/fscache.h:269: undefined reference to `__fscache_use_cookie' ld: fs/9p/vfs_dir.o: in function `fscache_unuse_cookie': >> include/linux/fscache.h:286: undefined reference to `__fscache_unuse_cookie' >> ld: include/linux/fscache.h:286: undefined reference to `__fscache_unuse_cookie' ld: fs/9p/v9fs.o: in function `fscache_relinquish_volume': >> include/linux/fscache.h:221: undefined reference to `__fscache_relinquish_volume' ld: fs/9p/cache.o: in function `fscache_acquire_volume': >> include/linux/fscache.h:202: undefined reference to `__fscache_acquire_volume' ld: fs/9p/cache.o: in function `fscache_acquire_cookie': >> include/linux/fscache.h:250: undefined reference to `__fscache_acquire_cookie'
vim +386 include/linux/fscache.h
7f9fc1ee74adf2 David Howells 2020-09-22 183 2d6fff63703739 David Howells 2009-04-03 184 /** 056daf803e87af David Howells 2020-02-06 185 * fscache_acquire_volume - Register a volume as desiring caching services 056daf803e87af David Howells 2020-02-06 186 * @volume_key: An identification string for the volume 056daf803e87af David Howells 2020-02-06 187 * @cache_name: The name of the cache to use (or NULL for the default) 056daf803e87af David Howells 2020-02-06 188 * @coherency_data: Piece of arbitrary coherency data to check 056daf803e87af David Howells 2020-02-06 189 * 056daf803e87af David Howells 2020-02-06 190 * Register a volume as desiring caching services if they're available. The 056daf803e87af David Howells 2020-02-06 191 * caller must provide an identifier for the volume and may also indicate which 056daf803e87af David Howells 2020-02-06 192 * cache it should be in. If a preexisting volume entry is found in the cache, 056daf803e87af David Howells 2020-02-06 193 * the coherency data must match otherwise the entry will be invalidated. 2d6fff63703739 David Howells 2009-04-03 194 */ 2d6fff63703739 David Howells 2009-04-03 195 static inline 056daf803e87af David Howells 2020-02-06 196 struct fscache_volume *fscache_acquire_volume(const char *volume_key, 056daf803e87af David Howells 2020-02-06 197 const char *cache_name, 056daf803e87af David Howells 2020-02-06 198 u64 coherency_data) 2d6fff63703739 David Howells 2009-04-03 199 { 056daf803e87af David Howells 2020-02-06 200 if (!fscache_available()) 2d6fff63703739 David Howells 2009-04-03 201 return NULL; 056daf803e87af David Howells 2020-02-06 @202 return __fscache_acquire_volume(volume_key, cache_name, coherency_data); 2d6fff63703739 David Howells 2009-04-03 203 } 2d6fff63703739 David Howells 2009-04-03 204 2d6fff63703739 David Howells 2009-04-03 205 /** 056daf803e87af David Howells 2020-02-06 206 * fscache_relinquish_volume - Cease caching a volume 056daf803e87af David Howells 2020-02-06 207 * @volume: The volume cookie 056daf803e87af David Howells 2020-02-06 208 * @coherency_data: Piece of arbitrary coherency data to set 056daf803e87af David Howells 2020-02-06 209 * @invalidate: True if the volume should be invalidated 056daf803e87af David Howells 2020-02-06 210 * 056daf803e87af David Howells 2020-02-06 211 * Indicate that a filesystem no longer desires caching services for a volume. 056daf803e87af David Howells 2020-02-06 212 * The caller must have relinquished all file cookies prior to calling this. 056daf803e87af David Howells 2020-02-06 213 * The coherency data stored is updated. 2d6fff63703739 David Howells 2009-04-03 214 */ 2d6fff63703739 David Howells 2009-04-03 215 static inline 056daf803e87af David Howells 2020-02-06 216 void fscache_relinquish_volume(struct fscache_volume *volume, 056daf803e87af David Howells 2020-02-06 217 u64 coherency_data, 056daf803e87af David Howells 2020-02-06 218 bool invalidate) 2d6fff63703739 David Howells 2009-04-03 219 { 056daf803e87af David Howells 2020-02-06 220 if (fscache_volume_valid(volume)) 056daf803e87af David Howells 2020-02-06 @221 __fscache_relinquish_volume(volume, coherency_data, invalidate); 2d6fff63703739 David Howells 2009-04-03 222 } 2d6fff63703739 David Howells 2009-04-03 223 2d6fff63703739 David Howells 2009-04-03 224 /** 2d6fff63703739 David Howells 2009-04-03 225 * fscache_acquire_cookie - Acquire a cookie to represent a cache object 056daf803e87af David Howells 2020-02-06 226 * @volume: The volume in which to locate/create this cookie d5c268fc7cd21a David Howells 2020-02-06 227 * @advice: Advice flags (FSCACHE_COOKIE_ADV_*) 402cb8dda949d9 David Howells 2018-04-04 228 * @index_key: The index key for this cookie 402cb8dda949d9 David Howells 2018-04-04 229 * @index_key_len: Size of the index key 402cb8dda949d9 David Howells 2018-04-04 230 * @aux_data: The auxiliary data for the cookie (may be NULL) 402cb8dda949d9 David Howells 2018-04-04 231 * @aux_data_len: Size of the auxiliary data buffer ee1235a9a06813 David Howells 2018-04-04 232 * @object_size: The initial size of object 2d6fff63703739 David Howells 2009-04-03 233 * 056daf803e87af David Howells 2020-02-06 234 * Acquire a cookie to represent a data file within the given cache volume. 2d6fff63703739 David Howells 2009-04-03 235 * efc930fa1d8448 Mauro Carvalho Chehab 2020-04-27 236 * See Documentation/filesystems/caching/netfs-api.rst for a complete 2d6fff63703739 David Howells 2009-04-03 237 * description. 2d6fff63703739 David Howells 2009-04-03 238 */ 2d6fff63703739 David Howells 2009-04-03 239 static inline 056daf803e87af David Howells 2020-02-06 240 struct fscache_cookie *fscache_acquire_cookie(struct fscache_volume *volume, d5c268fc7cd21a David Howells 2020-02-06 241 u8 advice, 402cb8dda949d9 David Howells 2018-04-04 242 const void *index_key, 402cb8dda949d9 David Howells 2018-04-04 243 size_t index_key_len, 402cb8dda949d9 David Howells 2018-04-04 244 const void *aux_data, 402cb8dda949d9 David Howells 2018-04-04 245 size_t aux_data_len, 056daf803e87af David Howells 2020-02-06 246 loff_t object_size) 2d6fff63703739 David Howells 2009-04-03 247 { 056daf803e87af David Howells 2020-02-06 248 if (!fscache_volume_valid(volume)) 056daf803e87af David Howells 2020-02-06 249 return NULL; 056daf803e87af David Howells 2020-02-06 @250 return __fscache_acquire_cookie(volume, advice, 402cb8dda949d9 David Howells 2018-04-04 251 index_key, index_key_len, 402cb8dda949d9 David Howells 2018-04-04 252 aux_data, aux_data_len, 056daf803e87af David Howells 2020-02-06 253 object_size); 056daf803e87af David Howells 2020-02-06 254 } 056daf803e87af David Howells 2020-02-06 255 056daf803e87af David Howells 2020-02-06 256 /** 056daf803e87af David Howells 2020-02-06 257 * fscache_use_cookie - Request usage of cookie attached to an object 056daf803e87af David Howells 2020-02-06 258 * @object: Object description 056daf803e87af David Howells 2020-02-06 259 * @will_modify: If cache is expected to be modified locally 056daf803e87af David Howells 2020-02-06 260 * 056daf803e87af David Howells 2020-02-06 261 * Request usage of the cookie attached to an object. The caller should tell 056daf803e87af David Howells 2020-02-06 262 * the cache if the object's contents are about to be modified locally and then 056daf803e87af David Howells 2020-02-06 263 * the cache can apply the policy that has been set to handle this case. 056daf803e87af David Howells 2020-02-06 264 */ 056daf803e87af David Howells 2020-02-06 265 static inline void fscache_use_cookie(struct fscache_cookie *cookie, 056daf803e87af David Howells 2020-02-06 266 bool will_modify) 056daf803e87af David Howells 2020-02-06 267 { 056daf803e87af David Howells 2020-02-06 268 if (fscache_cookie_valid(cookie)) 056daf803e87af David Howells 2020-02-06 @269 __fscache_use_cookie(cookie, will_modify); 056daf803e87af David Howells 2020-02-06 270 } 056daf803e87af David Howells 2020-02-06 271 056daf803e87af David Howells 2020-02-06 272 /** 056daf803e87af David Howells 2020-02-06 273 * fscache_unuse_cookie - Cease usage of cookie attached to an object 056daf803e87af David Howells 2020-02-06 274 * @object: Object description 056daf803e87af David Howells 2020-02-06 275 * @aux_data: Updated auxiliary data (or NULL) 056daf803e87af David Howells 2020-02-06 276 * @object_size: Revised size of the object (or NULL) 056daf803e87af David Howells 2020-02-06 277 * 056daf803e87af David Howells 2020-02-06 278 * Cease usage of the cookie attached to an object. When the users count 056daf803e87af David Howells 2020-02-06 279 * reaches zero then the cookie relinquishment will be permitted to proceed. 056daf803e87af David Howells 2020-02-06 280 */ 056daf803e87af David Howells 2020-02-06 281 static inline void fscache_unuse_cookie(struct fscache_cookie *cookie, 056daf803e87af David Howells 2020-02-06 282 const void *aux_data, 056daf803e87af David Howells 2020-02-06 283 const loff_t *object_size) 056daf803e87af David Howells 2020-02-06 284 { 056daf803e87af David Howells 2020-02-06 285 if (fscache_cookie_valid(cookie)) 056daf803e87af David Howells 2020-02-06 @286 __fscache_unuse_cookie(cookie, aux_data, object_size); 2d6fff63703739 David Howells 2009-04-03 287 } 2d6fff63703739 David Howells 2009-04-03 288 2d6fff63703739 David Howells 2009-04-03 289 /** 2d6fff63703739 David Howells 2009-04-03 290 * fscache_relinquish_cookie - Return the cookie to the cache, maybe discarding 2d6fff63703739 David Howells 2009-04-03 291 * it 2d6fff63703739 David Howells 2009-04-03 292 * @cookie: The cookie being returned 2d6fff63703739 David Howells 2009-04-03 293 * @retire: True if the cache object the cookie represents is to be discarded 2d6fff63703739 David Howells 2009-04-03 294 * 2d6fff63703739 David Howells 2009-04-03 295 * This function returns a cookie to the cache, forcibly discarding the 056daf803e87af David Howells 2020-02-06 296 * associated cache object if retire is set to true. 2d6fff63703739 David Howells 2009-04-03 297 * efc930fa1d8448 Mauro Carvalho Chehab 2020-04-27 298 * See Documentation/filesystems/caching/netfs-api.rst for a complete 2d6fff63703739 David Howells 2009-04-03 299 * description. 2d6fff63703739 David Howells 2009-04-03 300 */ 2d6fff63703739 David Howells 2009-04-03 301 static inline 056daf803e87af David Howells 2020-02-06 302 void fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire) 2d6fff63703739 David Howells 2009-04-03 303 { ccc4fc3d11e914 David Howells 2009-04-03 304 if (fscache_cookie_valid(cookie)) 056daf803e87af David Howells 2020-02-06 @305 __fscache_relinquish_cookie(cookie, retire); 2d6fff63703739 David Howells 2009-04-03 306 } 2d6fff63703739 David Howells 2009-04-03 307 423c447e7489a3 David Howells 2020-11-25 308 /* 423c447e7489a3 David Howells 2020-11-25 309 * Find the auxiliary data on a cookie. 423c447e7489a3 David Howells 2020-11-25 310 */ 423c447e7489a3 David Howells 2020-11-25 311 static inline void *fscache_get_aux(struct fscache_cookie *cookie) 423c447e7489a3 David Howells 2020-11-25 312 { 423c447e7489a3 David Howells 2020-11-25 313 if (cookie->aux_len <= sizeof(cookie->inline_aux)) 423c447e7489a3 David Howells 2020-11-25 314 return cookie->inline_aux; 423c447e7489a3 David Howells 2020-11-25 315 else 423c447e7489a3 David Howells 2020-11-25 316 return cookie->aux; 423c447e7489a3 David Howells 2020-11-25 317 } 423c447e7489a3 David Howells 2020-11-25 318 423c447e7489a3 David Howells 2020-11-25 319 /* 423c447e7489a3 David Howells 2020-11-25 320 * Update the auxiliary data on a cookie. 423c447e7489a3 David Howells 2020-11-25 321 */ 423c447e7489a3 David Howells 2020-11-25 322 static inline 423c447e7489a3 David Howells 2020-11-25 323 void fscache_update_aux(struct fscache_cookie *cookie, 423c447e7489a3 David Howells 2020-11-25 324 const void *aux_data, const loff_t *object_size) 423c447e7489a3 David Howells 2020-11-25 325 { 423c447e7489a3 David Howells 2020-11-25 326 void *p = fscache_get_aux(cookie); 423c447e7489a3 David Howells 2020-11-25 327 423c447e7489a3 David Howells 2020-11-25 328 if (aux_data && p) 423c447e7489a3 David Howells 2020-11-25 329 memcpy(p, aux_data, cookie->aux_len); 423c447e7489a3 David Howells 2020-11-25 330 if (object_size) 423c447e7489a3 David Howells 2020-11-25 331 cookie->object_size = *object_size; 423c447e7489a3 David Howells 2020-11-25 332 } 423c447e7489a3 David Howells 2020-11-25 333 423c447e7489a3 David Howells 2020-11-25 334 #ifdef CONFIG_FSCACHE_STATS 423c447e7489a3 David Howells 2020-11-25 335 extern atomic_t fscache_n_updates; 423c447e7489a3 David Howells 2020-11-25 336 #endif 423c447e7489a3 David Howells 2020-11-25 337 423c447e7489a3 David Howells 2020-11-25 338 static inline 423c447e7489a3 David Howells 2020-11-25 339 void __fscache_update_cookie(struct fscache_cookie *cookie, const void *aux_data, 423c447e7489a3 David Howells 2020-11-25 340 const loff_t *object_size) 423c447e7489a3 David Howells 2020-11-25 341 { 423c447e7489a3 David Howells 2020-11-25 342 #ifdef CONFIG_FSCACHE_STATS 423c447e7489a3 David Howells 2020-11-25 343 atomic_inc(&fscache_n_updates); 423c447e7489a3 David Howells 2020-11-25 344 #endif 423c447e7489a3 David Howells 2020-11-25 345 fscache_update_aux(cookie, aux_data, object_size); 423c447e7489a3 David Howells 2020-11-25 346 smp_wmb(); 423c447e7489a3 David Howells 2020-11-25 347 set_bit(FSCACHE_COOKIE_NEEDS_UPDATE, &cookie->flags); 423c447e7489a3 David Howells 2020-11-25 348 } 423c447e7489a3 David Howells 2020-11-25 349 2d6fff63703739 David Howells 2009-04-03 350 /** 2d6fff63703739 David Howells 2009-04-03 351 * fscache_update_cookie - Request that a cache object be updated 2d6fff63703739 David Howells 2009-04-03 352 * @cookie: The cookie representing the cache object 402cb8dda949d9 David Howells 2018-04-04 353 * @aux_data: The updated auxiliary data for the cookie (may be NULL) 056daf803e87af David Howells 2020-02-06 354 * @object_size: The current size of the object (may be NULL) 2d6fff63703739 David Howells 2009-04-03 355 * 2d6fff63703739 David Howells 2009-04-03 356 * Request an update of the index data for the cache object associated with the 402cb8dda949d9 David Howells 2018-04-04 357 * cookie. The auxiliary data on the cookie will be updated first if @aux_data 056daf803e87af David Howells 2020-02-06 358 * is set and the object size will be updated and the object possibly trimmed 056daf803e87af David Howells 2020-02-06 359 * if @object_size is set. 2d6fff63703739 David Howells 2009-04-03 360 * efc930fa1d8448 Mauro Carvalho Chehab 2020-04-27 361 * See Documentation/filesystems/caching/netfs-api.rst for a complete 2d6fff63703739 David Howells 2009-04-03 362 * description. 2d6fff63703739 David Howells 2009-04-03 363 */ 2d6fff63703739 David Howells 2009-04-03 364 static inline 056daf803e87af David Howells 2020-02-06 365 void fscache_update_cookie(struct fscache_cookie *cookie, const void *aux_data, 056daf803e87af David Howells 2020-02-06 366 const loff_t *object_size) 2d6fff63703739 David Howells 2009-04-03 367 { b4a0c0e0a13cea Jeff Layton 2020-07-30 368 if (fscache_cookie_enabled(cookie)) 056daf803e87af David Howells 2020-02-06 369 __fscache_update_cookie(cookie, aux_data, object_size); 2d6fff63703739 David Howells 2009-04-03 370 } 2d6fff63703739 David Howells 2009-04-03 371 9d8038c4821d31 David Howells 2020-02-06 372 /** 9d8038c4821d31 David Howells 2020-02-06 373 * fscache_resize_cookie - Request that a cache object be resized 9d8038c4821d31 David Howells 2020-02-06 374 * @cookie: The cookie representing the cache object 9d8038c4821d31 David Howells 2020-02-06 375 * @new_size: The new size of the object (may be NULL) 9d8038c4821d31 David Howells 2020-02-06 376 * 9d8038c4821d31 David Howells 2020-02-06 377 * Request that the size of an object be changed. 9d8038c4821d31 David Howells 2020-02-06 378 * 9d8038c4821d31 David Howells 2020-02-06 379 * See Documentation/filesystems/caching/netfs-api.txt for a complete 9d8038c4821d31 David Howells 2020-02-06 380 * description. 9d8038c4821d31 David Howells 2020-02-06 381 */ 9d8038c4821d31 David Howells 2020-02-06 382 static inline 9d8038c4821d31 David Howells 2020-02-06 383 void fscache_resize_cookie(struct fscache_cookie *cookie, loff_t new_size) 9d8038c4821d31 David Howells 2020-02-06 384 { 9d8038c4821d31 David Howells 2020-02-06 385 if (fscache_cookie_enabled(cookie)) 9d8038c4821d31 David Howells 2020-02-06 @386 __fscache_resize_cookie(cookie, new_size); 9d8038c4821d31 David Howells 2020-02-06 387 } 9d8038c4821d31 David Howells 2020-02-06 388 2d6fff63703739 David Howells 2009-04-03 389 /** 2d6fff63703739 David Howells 2009-04-03 390 * fscache_pin_cookie - Pin a data-storage cache object in its cache 2d6fff63703739 David Howells 2009-04-03 391 * @cookie: The cookie representing the cache object 2d6fff63703739 David Howells 2009-04-03 392 * 2d6fff63703739 David Howells 2009-04-03 393 * Permit data-storage cache objects to be pinned in the cache. 2d6fff63703739 David Howells 2009-04-03 394 * efc930fa1d8448 Mauro Carvalho Chehab 2020-04-27 395 * See Documentation/filesystems/caching/netfs-api.rst for a complete 2d6fff63703739 David Howells 2009-04-03 396 * description. 2d6fff63703739 David Howells 2009-04-03 397 */ 2d6fff63703739 David Howells 2009-04-03 398 static inline 2d6fff63703739 David Howells 2009-04-03 399 int fscache_pin_cookie(struct fscache_cookie *cookie) 2d6fff63703739 David Howells 2009-04-03 400 { 2d6fff63703739 David Howells 2009-04-03 401 return -ENOBUFS; 2d6fff63703739 David Howells 2009-04-03 402 } 2d6fff63703739 David Howells 2009-04-03 403 2d6fff63703739 David Howells 2009-04-03 404 /** 2d6fff63703739 David Howells 2009-04-03 405 * fscache_pin_cookie - Unpin a data-storage cache object in its cache 2d6fff63703739 David Howells 2009-04-03 406 * @cookie: The cookie representing the cache object 2d6fff63703739 David Howells 2009-04-03 407 * 2d6fff63703739 David Howells 2009-04-03 408 * Permit data-storage cache objects to be unpinned from the cache. 2d6fff63703739 David Howells 2009-04-03 409 * efc930fa1d8448 Mauro Carvalho Chehab 2020-04-27 410 * See Documentation/filesystems/caching/netfs-api.rst for a complete 2d6fff63703739 David Howells 2009-04-03 411 * description. 2d6fff63703739 David Howells 2009-04-03 412 */ 2d6fff63703739 David Howells 2009-04-03 413 static inline 2d6fff63703739 David Howells 2009-04-03 414 void fscache_unpin_cookie(struct fscache_cookie *cookie) 2d6fff63703739 David Howells 2009-04-03 415 { 2d6fff63703739 David Howells 2009-04-03 416 } 2d6fff63703739 David Howells 2009-04-03 417 ef778e7ae67cd4 David Howells 2012-12-20 418 /** ef778e7ae67cd4 David Howells 2012-12-20 419 * fscache_invalidate - Notify cache that an object needs invalidation ef778e7ae67cd4 David Howells 2012-12-20 420 * @cookie: The cookie representing the cache object d8d6f8e68e17cd David Howells 2020-02-06 421 * @aux_data: The updated auxiliary data for the cookie (may be NULL) 6b97c8850f9876 David Howells 2021-10-04 422 * @size: The revised size of the object. d8d6f8e68e17cd David Howells 2020-02-06 423 * @flags: Invalidation flags (FSCACHE_INVAL_*) ef778e7ae67cd4 David Howells 2012-12-20 424 * ef778e7ae67cd4 David Howells 2012-12-20 425 * Notify the cache that an object is needs to be invalidated and that it ef778e7ae67cd4 David Howells 2012-12-20 426 * should abort any retrievals or stores it is doing on the cache. The object ef778e7ae67cd4 David Howells 2012-12-20 427 * is then marked non-caching until such time as the invalidation is complete. ef778e7ae67cd4 David Howells 2012-12-20 428 * d8d6f8e68e17cd David Howells 2020-02-06 429 * FSCACHE_INVAL_LIGHT indicates that if the object has been invalidated and d8d6f8e68e17cd David Howells 2020-02-06 430 * replaced by a temporary object, the temporary object need not be replaced d8d6f8e68e17cd David Howells 2020-02-06 431 * again. This is primarily intended for use with FSCACHE_ADV_SINGLE_CHUNK. d8d6f8e68e17cd David Howells 2020-02-06 432 * d8d6f8e68e17cd David Howells 2020-02-06 433 * FSCACHE_INVAL_DIO_WRITE indicates that this is due to a direct I/O write and d8d6f8e68e17cd David Howells 2020-02-06 434 * may cause caching to be suspended on this cookie. ef778e7ae67cd4 David Howells 2012-12-20 435 * efc930fa1d8448 Mauro Carvalho Chehab 2020-04-27 436 * See Documentation/filesystems/caching/netfs-api.rst for a complete ef778e7ae67cd4 David Howells 2012-12-20 437 * description. ef778e7ae67cd4 David Howells 2012-12-20 438 */ ef778e7ae67cd4 David Howells 2012-12-20 439 static inline d8d6f8e68e17cd David Howells 2020-02-06 440 void fscache_invalidate(struct fscache_cookie *cookie, d8d6f8e68e17cd David Howells 2020-02-06 441 const void *aux_data, loff_t size, unsigned int flags) ef778e7ae67cd4 David Howells 2012-12-20 442 { b4a0c0e0a13cea Jeff Layton 2020-07-30 443 if (fscache_cookie_enabled(cookie)) d8d6f8e68e17cd David Howells 2020-02-06 444 __fscache_invalidate(cookie, aux_data, size, flags); ef778e7ae67cd4 David Howells 2012-12-20 445 } ef778e7ae67cd4 David Howells 2012-12-20 446 ef778e7ae67cd4 David Howells 2012-12-20 447 /** 056daf803e87af David Howells 2020-02-06 448 * fscache_operation_valid - Return true if operations resources are usable 056daf803e87af David Howells 2020-02-06 449 * @cres: The resources to check. ef778e7ae67cd4 David Howells 2012-12-20 450 * 056daf803e87af David Howells 2020-02-06 451 * Returns a pointer to the operations table if usable or NULL if not. ef778e7ae67cd4 David Howells 2012-12-20 452 */ ef778e7ae67cd4 David Howells 2012-12-20 453 static inline 056daf803e87af David Howells 2020-02-06 454 const struct netfs_cache_ops *fscache_operation_valid(const struct netfs_cache_resources *cres) ef778e7ae67cd4 David Howells 2012-12-20 455 { 056daf803e87af David Howells 2020-02-06 456 return fscache_resources_valid(cres) ? cres->ops : NULL; ef778e7ae67cd4 David Howells 2012-12-20 457 } ef778e7ae67cd4 David Howells 2012-12-20 458 26aaeffcafe6cb David Howells 2021-02-22 459 #ifdef FSCACHE_USE_NEW_IO_API 26aaeffcafe6cb David Howells 2021-02-22 460 26aaeffcafe6cb David Howells 2021-02-22 461 /** 26aaeffcafe6cb David Howells 2021-02-22 462 * fscache_begin_read_operation - Begin a read operation for the netfs lib a2872465a68c9b David Howells 2021-09-14 463 * @cres: The cache resources for the read being performed 26aaeffcafe6cb David Howells 2021-02-22 464 * @cookie: The cookie representing the cache object 26aaeffcafe6cb David Howells 2021-02-22 465 * a2872465a68c9b David Howells 2021-09-14 466 * Begin a read operation on behalf of the netfs helper library. @cres a2872465a68c9b David Howells 2021-09-14 467 * indicates the cache resources to which the operation state should be a2872465a68c9b David Howells 2021-09-14 468 * attached; @cookie indicates the cache object that will be accessed. 26aaeffcafe6cb David Howells 2021-02-22 469 * 26aaeffcafe6cb David Howells 2021-02-22 470 * This is intended to be called from the ->begin_cache_operation() netfs lib 26aaeffcafe6cb David Howells 2021-02-22 471 * operation as implemented by the network filesystem. 26aaeffcafe6cb David Howells 2021-02-22 472 * 26aaeffcafe6cb David Howells 2021-02-22 473 * Returns: 26aaeffcafe6cb David Howells 2021-02-22 474 * * 0 - Success 26aaeffcafe6cb David Howells 2021-02-22 475 * * -ENOBUFS - No caching available 26aaeffcafe6cb David Howells 2021-02-22 476 * * Other error code from the cache, such as -ENOMEM. 26aaeffcafe6cb David Howells 2021-02-22 477 */ 26aaeffcafe6cb David Howells 2021-02-22 478 static inline a2872465a68c9b David Howells 2021-09-14 479 int fscache_begin_read_operation(struct netfs_cache_resources *cres, 26aaeffcafe6cb David Howells 2021-02-22 480 struct fscache_cookie *cookie) 26aaeffcafe6cb David Howells 2021-02-22 481 { b4a0c0e0a13cea Jeff Layton 2020-07-30 482 if (fscache_cookie_enabled(cookie)) 056daf803e87af David Howells 2020-02-06 @483 return __fscache_begin_read_operation(cres, cookie); 26aaeffcafe6cb David Howells 2021-02-22 484 return -ENOBUFS; 26aaeffcafe6cb David Howells 2021-02-22 485 } 26aaeffcafe6cb David Howells 2021-02-22 486
:::::: The code at line 386 was first introduced by commit :::::: 9d8038c4821d31fb8928f85f9f708ae7e831b775 fscache: Provide resize operation
:::::: TO: David Howells <dhowells@redhat.com> :::::: CC: David Howells <dhowells@redhat.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |