backend-api.txt 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. ==========================
  2. FS-CACHE CACHE BACKEND API
  3. ==========================
  4. The FS-Cache system provides an API by which actual caches can be supplied to
  5. FS-Cache for it to then serve out to network filesystems and other interested
  6. parties.
  7. This API is declared in <linux/fscache-cache.h>.
  8. ====================================
  9. INITIALISING AND REGISTERING A CACHE
  10. ====================================
  11. To start off, a cache definition must be initialised and registered for each
  12. cache the backend wants to make available. For instance, CacheFS does this in
  13. the fill_super() operation on mounting.
  14. The cache definition (struct fscache_cache) should be initialised by calling:
  15. void fscache_init_cache(struct fscache_cache *cache,
  16. struct fscache_cache_ops *ops,
  17. const char *idfmt,
  18. ...);
  19. Where:
  20. (*) "cache" is a pointer to the cache definition;
  21. (*) "ops" is a pointer to the table of operations that the backend supports on
  22. this cache; and
  23. (*) "idfmt" is a format and printf-style arguments for constructing a label
  24. for the cache.
  25. The cache should then be registered with FS-Cache by passing a pointer to the
  26. previously initialised cache definition to:
  27. int fscache_add_cache(struct fscache_cache *cache,
  28. struct fscache_object *fsdef,
  29. const char *tagname);
  30. Two extra arguments should also be supplied:
  31. (*) "fsdef" which should point to the object representation for the FS-Cache
  32. master index in this cache. Netfs primary index entries will be created
  33. here. FS-Cache keeps the caller's reference to the index object if
  34. successful and will release it upon withdrawal of the cache.
  35. (*) "tagname" which, if given, should be a text string naming this cache. If
  36. this is NULL, the identifier will be used instead. For CacheFS, the
  37. identifier is set to name the underlying block device and the tag can be
  38. supplied by mount.
  39. This function may return -ENOMEM if it ran out of memory or -EEXIST if the tag
  40. is already in use. 0 will be returned on success.
  41. =====================
  42. UNREGISTERING A CACHE
  43. =====================
  44. A cache can be withdrawn from the system by calling this function with a
  45. pointer to the cache definition:
  46. void fscache_withdraw_cache(struct fscache_cache *cache);
  47. In CacheFS's case, this is called by put_super().
  48. ========
  49. SECURITY
  50. ========
  51. The cache methods are executed one of two contexts:
  52. (1) that of the userspace process that issued the netfs operation that caused
  53. the cache method to be invoked, or
  54. (2) that of one of the processes in the FS-Cache thread pool.
  55. In either case, this may not be an appropriate context in which to access the
  56. cache.
  57. The calling process's fsuid, fsgid and SELinux security identities may need to
  58. be masqueraded for the duration of the cache driver's access to the cache.
  59. This is left to the cache to handle; FS-Cache makes no effort in this regard.
  60. ===================================
  61. CONTROL AND STATISTICS PRESENTATION
  62. ===================================
  63. The cache may present data to the outside world through FS-Cache's interfaces
  64. in sysfs and procfs - the former for control and the latter for statistics.
  65. A sysfs directory called /sys/fs/fscache/<cachetag>/ is created if CONFIG_SYSFS
  66. is enabled. This is accessible through the kobject struct fscache_cache::kobj
  67. and is for use by the cache as it sees fit.
  68. ========================
  69. RELEVANT DATA STRUCTURES
  70. ========================
  71. (*) Index/Data file FS-Cache representation cookie:
  72. struct fscache_cookie {
  73. struct fscache_object_def *def;
  74. struct fscache_netfs *netfs;
  75. void *netfs_data;
  76. ...
  77. };
  78. The fields that might be of use to the backend describe the object
  79. definition, the netfs definition and the netfs's data for this cookie.
  80. The object definition contain functions supplied by the netfs for loading
  81. and matching index entries; these are required to provide some of the
  82. cache operations.
  83. (*) In-cache object representation:
  84. struct fscache_object {
  85. int debug_id;
  86. enum {
  87. FSCACHE_OBJECT_RECYCLING,
  88. ...
  89. } state;
  90. spinlock_t lock
  91. struct fscache_cache *cache;
  92. struct fscache_cookie *cookie;
  93. ...
  94. };
  95. Structures of this type should be allocated by the cache backend and
  96. passed to FS-Cache when requested by the appropriate cache operation. In
  97. the case of CacheFS, they're embedded in CacheFS's internal object
  98. structures.
  99. The debug_id is a simple integer that can be used in debugging messages
  100. that refer to a particular object. In such a case it should be printed
  101. using "OBJ%x" to be consistent with FS-Cache.
  102. Each object contains a pointer to the cookie that represents the object it
  103. is backing. An object should retired when put_object() is called if it is
  104. in state FSCACHE_OBJECT_RECYCLING. The fscache_object struct should be
  105. initialised by calling fscache_object_init(object).
  106. (*) FS-Cache operation record:
  107. struct fscache_operation {
  108. atomic_t usage;
  109. struct fscache_object *object;
  110. unsigned long flags;
  111. #define FSCACHE_OP_EXCLUSIVE
  112. void (*processor)(struct fscache_operation *op);
  113. void (*release)(struct fscache_operation *op);
  114. ...
  115. };
  116. FS-Cache has a pool of threads that it uses to give CPU time to the
  117. various asynchronous operations that need to be done as part of driving
  118. the cache. These are represented by the above structure. The processor
  119. method is called to give the op CPU time, and the release method to get
  120. rid of it when its usage count reaches 0.
  121. An operation can be made exclusive upon an object by setting the
  122. appropriate flag before enqueuing it with fscache_enqueue_operation(). If
  123. an operation needs more processing time, it should be enqueued again.
  124. (*) FS-Cache retrieval operation record:
  125. struct fscache_retrieval {
  126. struct fscache_operation op;
  127. struct address_space *mapping;
  128. struct list_head *to_do;
  129. ...
  130. };
  131. A structure of this type is allocated by FS-Cache to record retrieval and
  132. allocation requests made by the netfs. This struct is then passed to the
  133. backend to do the operation. The backend may get extra refs to it by
  134. calling fscache_get_retrieval() and refs may be discarded by calling
  135. fscache_put_retrieval().
  136. A retrieval operation can be used by the backend to do retrieval work. To
  137. do this, the retrieval->op.processor method pointer should be set
  138. appropriately by the backend and fscache_enqueue_retrieval() called to
  139. submit it to the thread pool. CacheFiles, for example, uses this to queue
  140. page examination when it detects PG_lock being cleared.
  141. The to_do field is an empty list available for the cache backend to use as
  142. it sees fit.
  143. (*) FS-Cache storage operation record:
  144. struct fscache_storage {
  145. struct fscache_operation op;
  146. pgoff_t store_limit;
  147. ...
  148. };
  149. A structure of this type is allocated by FS-Cache to record outstanding
  150. writes to be made. FS-Cache itself enqueues this operation and invokes
  151. the write_page() method on the object at appropriate times to effect
  152. storage.
  153. ================
  154. CACHE OPERATIONS
  155. ================
  156. The cache backend provides FS-Cache with a table of operations that can be
  157. performed on the denizens of the cache. These are held in a structure of type:
  158. struct fscache_cache_ops
  159. (*) Name of cache provider [mandatory]:
  160. const char *name
  161. This isn't strictly an operation, but should be pointed at a string naming
  162. the backend.
  163. (*) Allocate a new object [mandatory]:
  164. struct fscache_object *(*alloc_object)(struct fscache_cache *cache,
  165. struct fscache_cookie *cookie)
  166. This method is used to allocate a cache object representation to back a
  167. cookie in a particular cache. fscache_object_init() should be called on
  168. the object to initialise it prior to returning.
  169. This function may also be used to parse the index key to be used for
  170. multiple lookup calls to turn it into a more convenient form. FS-Cache
  171. will call the lookup_complete() method to allow the cache to release the
  172. form once lookup is complete or aborted.
  173. (*) Look up and create object [mandatory]:
  174. void (*lookup_object)(struct fscache_object *object)
  175. This method is used to look up an object, given that the object is already
  176. allocated and attached to the cookie. This should instantiate that object
  177. in the cache if it can.
  178. The method should call fscache_object_lookup_negative() as soon as
  179. possible if it determines the object doesn't exist in the cache. If the
  180. object is found to exist and the netfs indicates that it is valid then
  181. fscache_obtained_object() should be called once the object is in a
  182. position to have data stored in it. Similarly, fscache_obtained_object()
  183. should also be called once a non-present object has been created.
  184. If a lookup error occurs, fscache_object_lookup_error() should be called
  185. to abort the lookup of that object.
  186. (*) Release lookup data [mandatory]:
  187. void (*lookup_complete)(struct fscache_object *object)
  188. This method is called to ask the cache to release any resources it was
  189. using to perform a lookup.
  190. (*) Increment object refcount [mandatory]:
  191. struct fscache_object *(*grab_object)(struct fscache_object *object)
  192. This method is called to increment the reference count on an object. It
  193. may fail (for instance if the cache is being withdrawn) by returning NULL.
  194. It should return the object pointer if successful.
  195. (*) Lock/Unlock object [mandatory]:
  196. void (*lock_object)(struct fscache_object *object)
  197. void (*unlock_object)(struct fscache_object *object)
  198. These methods are used to exclusively lock an object. It must be possible
  199. to schedule with the lock held, so a spinlock isn't sufficient.
  200. (*) Pin/Unpin object [optional]:
  201. int (*pin_object)(struct fscache_object *object)
  202. void (*unpin_object)(struct fscache_object *object)
  203. These methods are used to pin an object into the cache. Once pinned an
  204. object cannot be reclaimed to make space. Return -ENOSPC if there's not
  205. enough space in the cache to permit this.
  206. (*) Check coherency state of an object [mandatory]:
  207. int (*check_consistency)(struct fscache_object *object)
  208. This method is called to have the cache check the saved auxiliary data of
  209. the object against the netfs's idea of the state. 0 should be returned
  210. if they're consistent and -ESTALE otherwise. -ENOMEM and -ERESTARTSYS
  211. may also be returned.
  212. (*) Update object [mandatory]:
  213. int (*update_object)(struct fscache_object *object)
  214. This is called to update the index entry for the specified object. The
  215. new information should be in object->cookie->netfs_data. This can be
  216. obtained by calling object->cookie->def->get_aux()/get_attr().
  217. (*) Invalidate data object [mandatory]:
  218. int (*invalidate_object)(struct fscache_operation *op)
  219. This is called to invalidate a data object (as pointed to by op->object).
  220. All the data stored for this object should be discarded and an
  221. attr_changed operation should be performed. The caller will follow up
  222. with an object update operation.
  223. fscache_op_complete() must be called on op before returning.
  224. (*) Discard object [mandatory]:
  225. void (*drop_object)(struct fscache_object *object)
  226. This method is called to indicate that an object has been unbound from its
  227. cookie, and that the cache should release the object's resources and
  228. retire it if it's in state FSCACHE_OBJECT_RECYCLING.
  229. This method should not attempt to release any references held by the
  230. caller. The caller will invoke the put_object() method as appropriate.
  231. (*) Release object reference [mandatory]:
  232. void (*put_object)(struct fscache_object *object)
  233. This method is used to discard a reference to an object. The object may
  234. be freed when all the references to it are released.
  235. (*) Synchronise a cache [mandatory]:
  236. void (*sync)(struct fscache_cache *cache)
  237. This is called to ask the backend to synchronise a cache with its backing
  238. device.
  239. (*) Dissociate a cache [mandatory]:
  240. void (*dissociate_pages)(struct fscache_cache *cache)
  241. This is called to ask a cache to perform any page dissociations as part of
  242. cache withdrawal.
  243. (*) Notification that the attributes on a netfs file changed [mandatory]:
  244. int (*attr_changed)(struct fscache_object *object);
  245. This is called to indicate to the cache that certain attributes on a netfs
  246. file have changed (for example the maximum size a file may reach). The
  247. cache can read these from the netfs by calling the cookie's get_attr()
  248. method.
  249. The cache may use the file size information to reserve space on the cache.
  250. It should also call fscache_set_store_limit() to indicate to FS-Cache the
  251. highest byte it's willing to store for an object.
  252. This method may return -ve if an error occurred or the cache object cannot
  253. be expanded. In such a case, the object will be withdrawn from service.
  254. This operation is run asynchronously from FS-Cache's thread pool, and
  255. storage and retrieval operations from the netfs are excluded during the
  256. execution of this operation.
  257. (*) Reserve cache space for an object's data [optional]:
  258. int (*reserve_space)(struct fscache_object *object, loff_t size);
  259. This is called to request that cache space be reserved to hold the data
  260. for an object and the metadata used to track it. Zero size should be
  261. taken as request to cancel a reservation.
  262. This should return 0 if successful, -ENOSPC if there isn't enough space
  263. available, or -ENOMEM or -EIO on other errors.
  264. The reservation may exceed the current size of the object, thus permitting
  265. future expansion. If the amount of space consumed by an object would
  266. exceed the reservation, it's permitted to refuse requests to allocate
  267. pages, but not required. An object may be pruned down to its reservation
  268. size if larger than that already.
  269. (*) Request page be read from cache [mandatory]:
  270. int (*read_or_alloc_page)(struct fscache_retrieval *op,
  271. struct page *page,
  272. gfp_t gfp)
  273. This is called to attempt to read a netfs page from the cache, or to
  274. reserve a backing block if not. FS-Cache will have done as much checking
  275. as it can before calling, but most of the work belongs to the backend.
  276. If there's no page in the cache, then -ENODATA should be returned if the
  277. backend managed to reserve a backing block; -ENOBUFS or -ENOMEM if it
  278. didn't.
  279. If there is suitable data in the cache, then a read operation should be
  280. queued and 0 returned. When the read finishes, fscache_end_io() should be
  281. called.
  282. The fscache_mark_pages_cached() should be called for the page if any cache
  283. metadata is retained. This will indicate to the netfs that the page needs
  284. explicit uncaching. This operation takes a pagevec, thus allowing several
  285. pages to be marked at once.
  286. The retrieval record pointed to by op should be retained for each page
  287. queued and released when I/O on the page has been formally ended.
  288. fscache_get/put_retrieval() are available for this purpose.
  289. The retrieval record may be used to get CPU time via the FS-Cache thread
  290. pool. If this is desired, the op->op.processor should be set to point to
  291. the appropriate processing routine, and fscache_enqueue_retrieval() should
  292. be called at an appropriate point to request CPU time. For instance, the
  293. retrieval routine could be enqueued upon the completion of a disk read.
  294. The to_do field in the retrieval record is provided to aid in this.
  295. If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS
  296. returned if possible or fscache_end_io() called with a suitable error
  297. code.
  298. fscache_put_retrieval() should be called after a page or pages are dealt
  299. with. This will complete the operation when all pages are dealt with.
  300. (*) Request pages be read from cache [mandatory]:
  301. int (*read_or_alloc_pages)(struct fscache_retrieval *op,
  302. struct list_head *pages,
  303. unsigned *nr_pages,
  304. gfp_t gfp)
  305. This is like the read_or_alloc_page() method, except it is handed a list
  306. of pages instead of one page. Any pages on which a read operation is
  307. started must be added to the page cache for the specified mapping and also
  308. to the LRU. Such pages must also be removed from the pages list and
  309. *nr_pages decremented per page.
  310. If there was an error such as -ENOMEM, then that should be returned; else
  311. if one or more pages couldn't be read or allocated, then -ENOBUFS should
  312. be returned; else if one or more pages couldn't be read, then -ENODATA
  313. should be returned. If all the pages are dispatched then 0 should be
  314. returned.
  315. (*) Request page be allocated in the cache [mandatory]:
  316. int (*allocate_page)(struct fscache_retrieval *op,
  317. struct page *page,
  318. gfp_t gfp)
  319. This is like the read_or_alloc_page() method, except that it shouldn't
  320. read from the cache, even if there's data there that could be retrieved.
  321. It should, however, set up any internal metadata required such that
  322. the write_page() method can write to the cache.
  323. If there's no backing block available, then -ENOBUFS should be returned
  324. (or -ENOMEM if there were other problems). If a block is successfully
  325. allocated, then the netfs page should be marked and 0 returned.
  326. (*) Request pages be allocated in the cache [mandatory]:
  327. int (*allocate_pages)(struct fscache_retrieval *op,
  328. struct list_head *pages,
  329. unsigned *nr_pages,
  330. gfp_t gfp)
  331. This is an multiple page version of the allocate_page() method. pages and
  332. nr_pages should be treated as for the read_or_alloc_pages() method.
  333. (*) Request page be written to cache [mandatory]:
  334. int (*write_page)(struct fscache_storage *op,
  335. struct page *page);
  336. This is called to write from a page on which there was a previously
  337. successful read_or_alloc_page() call or similar. FS-Cache filters out
  338. pages that don't have mappings.
  339. This method is called asynchronously from the FS-Cache thread pool. It is
  340. not required to actually store anything, provided -ENODATA is then
  341. returned to the next read of this page.
  342. If an error occurred, then a negative error code should be returned,
  343. otherwise zero should be returned. FS-Cache will take appropriate action
  344. in response to an error, such as withdrawing this object.
  345. If this method returns success then FS-Cache will inform the netfs
  346. appropriately.
  347. (*) Discard retained per-page metadata [mandatory]:
  348. void (*uncache_page)(struct fscache_object *object, struct page *page)
  349. This is called when a netfs page is being evicted from the pagecache. The
  350. cache backend should tear down any internal representation or tracking it
  351. maintains for this page.
  352. ==================
  353. FS-CACHE UTILITIES
  354. ==================
  355. FS-Cache provides some utilities that a cache backend may make use of:
  356. (*) Note occurrence of an I/O error in a cache:
  357. void fscache_io_error(struct fscache_cache *cache)
  358. This tells FS-Cache that an I/O error occurred in the cache. After this
  359. has been called, only resource dissociation operations (object and page
  360. release) will be passed from the netfs to the cache backend for the
  361. specified cache.
  362. This does not actually withdraw the cache. That must be done separately.
  363. (*) Invoke the retrieval I/O completion function:
  364. void fscache_end_io(struct fscache_retrieval *op, struct page *page,
  365. int error);
  366. This is called to note the end of an attempt to retrieve a page. The
  367. error value should be 0 if successful and an error otherwise.
  368. (*) Record that one or more pages being retrieved or allocated have been dealt
  369. with:
  370. void fscache_retrieval_complete(struct fscache_retrieval *op,
  371. int n_pages);
  372. This is called to record the fact that one or more pages have been dealt
  373. with and are no longer the concern of this operation. When the number of
  374. pages remaining in the operation reaches 0, the operation will be
  375. completed.
  376. (*) Record operation completion:
  377. void fscache_op_complete(struct fscache_operation *op);
  378. This is called to record the completion of an operation. This deducts
  379. this operation from the parent object's run state, potentially permitting
  380. one or more pending operations to start running.
  381. (*) Set highest store limit:
  382. void fscache_set_store_limit(struct fscache_object *object,
  383. loff_t i_size);
  384. This sets the limit FS-Cache imposes on the highest byte it's willing to
  385. try and store for a netfs. Any page over this limit is automatically
  386. rejected by fscache_read_alloc_page() and co with -ENOBUFS.
  387. (*) Mark pages as being cached:
  388. void fscache_mark_pages_cached(struct fscache_retrieval *op,
  389. struct pagevec *pagevec);
  390. This marks a set of pages as being cached. After this has been called,
  391. the netfs must call fscache_uncache_page() to unmark the pages.
  392. (*) Perform coherency check on an object:
  393. enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
  394. const void *data,
  395. uint16_t datalen);
  396. This asks the netfs to perform a coherency check on an object that has
  397. just been looked up. The cookie attached to the object will determine the
  398. netfs to use. data and datalen should specify where the auxiliary data
  399. retrieved from the cache can be found.
  400. One of three values will be returned:
  401. (*) FSCACHE_CHECKAUX_OKAY
  402. The coherency data indicates the object is valid as is.
  403. (*) FSCACHE_CHECKAUX_NEEDS_UPDATE
  404. The coherency data needs updating, but otherwise the object is
  405. valid.
  406. (*) FSCACHE_CHECKAUX_OBSOLETE
  407. The coherency data indicates that the object is obsolete and should
  408. be discarded.
  409. (*) Initialise a freshly allocated object:
  410. void fscache_object_init(struct fscache_object *object);
  411. This initialises all the fields in an object representation.
  412. (*) Indicate the destruction of an object:
  413. void fscache_object_destroyed(struct fscache_cache *cache);
  414. This must be called to inform FS-Cache that an object that belonged to a
  415. cache has been destroyed and deallocated. This will allow continuation
  416. of the cache withdrawal process when it is stopped pending destruction of
  417. all the objects.
  418. (*) Indicate negative lookup on an object:
  419. void fscache_object_lookup_negative(struct fscache_object *object);
  420. This is called to indicate to FS-Cache that a lookup process for an object
  421. found a negative result.
  422. This changes the state of an object to permit reads pending on lookup
  423. completion to go off and start fetching data from the netfs server as it's
  424. known at this point that there can't be any data in the cache.
  425. This may be called multiple times on an object. Only the first call is
  426. significant - all subsequent calls are ignored.
  427. (*) Indicate an object has been obtained:
  428. void fscache_obtained_object(struct fscache_object *object);
  429. This is called to indicate to FS-Cache that a lookup process for an object
  430. produced a positive result, or that an object was created. This should
  431. only be called once for any particular object.
  432. This changes the state of an object to indicate:
  433. (1) if no call to fscache_object_lookup_negative() has been made on
  434. this object, that there may be data available, and that reads can
  435. now go and look for it; and
  436. (2) that writes may now proceed against this object.
  437. (*) Indicate that object lookup failed:
  438. void fscache_object_lookup_error(struct fscache_object *object);
  439. This marks an object as having encountered a fatal error (usually EIO)
  440. and causes it to move into a state whereby it will be withdrawn as soon
  441. as possible.
  442. (*) Indicate that a stale object was found and discarded:
  443. void fscache_object_retrying_stale(struct fscache_object *object);
  444. This is called to indicate that the lookup procedure found an object in
  445. the cache that the netfs decided was stale. The object has been
  446. discarded from the cache and the lookup will be performed again.
  447. (*) Indicate that the caching backend killed an object:
  448. void fscache_object_mark_killed(struct fscache_object *object,
  449. enum fscache_why_object_killed why);
  450. This is called to indicate that the cache backend preemptively killed an
  451. object. The why parameter should be set to indicate the reason:
  452. FSCACHE_OBJECT_IS_STALE - the object was stale and needs discarding.
  453. FSCACHE_OBJECT_NO_SPACE - there was insufficient cache space
  454. FSCACHE_OBJECT_WAS_RETIRED - the object was retired when relinquished.
  455. FSCACHE_OBJECT_WAS_CULLED - the object was culled to make space.
  456. (*) Get and release references on a retrieval record:
  457. void fscache_get_retrieval(struct fscache_retrieval *op);
  458. void fscache_put_retrieval(struct fscache_retrieval *op);
  459. These two functions are used to retain a retrieval record whilst doing
  460. asynchronous data retrieval and block allocation.
  461. (*) Enqueue a retrieval record for processing.
  462. void fscache_enqueue_retrieval(struct fscache_retrieval *op);
  463. This enqueues a retrieval record for processing by the FS-Cache thread
  464. pool. One of the threads in the pool will invoke the retrieval record's
  465. op->op.processor callback function. This function may be called from
  466. within the callback function.
  467. (*) List of object state names:
  468. const char *fscache_object_states[];
  469. For debugging purposes, this may be used to turn the state that an object
  470. is in into a text string for display purposes.