Lines Matching refs:object
47 (*) "fsdef" which should point to the object representation for the FS-Cache
49 here. FS-Cache keeps the caller's reference to the index object if
117 The fields that might be of use to the backend describe the object
119 The object definition contain functions supplied by the netfs for loading
124 (*) In-cache object representation:
140 the case of CacheFS, they're embedded in CacheFS's internal object
144 that refer to a particular object. In such a case it should be printed
147 Each object contains a pointer to the cookie that represents the object it
148 is backing. An object should retired when put_object() is called if it is
150 initialised by calling fscache_object_init(object).
157 struct fscache_object *object;
171 An operation can be made exclusive upon an object by setting the
211 the write_page() method on the object at appropriate times to effect
232 (*) Allocate a new object [mandatory]:
237 This method is used to allocate a cache object representation to back a
239 the object to initialise it prior to returning.
247 (*) Look up and create object [mandatory]:
249 void (*lookup_object)(struct fscache_object *object)
251 This method is used to look up an object, given that the object is already
252 allocated and attached to the cookie. This should instantiate that object
256 possible if it determines the object doesn't exist in the cache. If the
257 object is found to exist and the netfs indicates that it is valid then
258 fscache_obtained_object() should be called once the object is in a
260 should also be called once a non-present object has been created.
263 to abort the lookup of that object.
268 void (*lookup_complete)(struct fscache_object *object)
274 (*) Increment object refcount [mandatory]:
276 struct fscache_object *(*grab_object)(struct fscache_object *object)
278 This method is called to increment the reference count on an object. It
280 It should return the object pointer if successful.
283 (*) Lock/Unlock object [mandatory]:
285 void (*lock_object)(struct fscache_object *object)
286 void (*unlock_object)(struct fscache_object *object)
288 These methods are used to exclusively lock an object. It must be possible
292 (*) Pin/Unpin object [optional]:
294 int (*pin_object)(struct fscache_object *object)
295 void (*unpin_object)(struct fscache_object *object)
297 These methods are used to pin an object into the cache. Once pinned an
298 object cannot be reclaimed to make space. Return -ENOSPC if there's not
302 (*) Check coherency state of an object [mandatory]:
304 int (*check_consistency)(struct fscache_object *object)
307 the object against the netfs's idea of the state. 0 should be returned
311 (*) Update object [mandatory]:
313 int (*update_object)(struct fscache_object *object)
315 This is called to update the index entry for the specified object. The
316 new information should be in object->cookie->netfs_data. This can be
317 obtained by calling object->cookie->def->get_aux()/get_attr().
320 (*) Invalidate data object [mandatory]:
324 This is called to invalidate a data object (as pointed to by op->object).
325 All the data stored for this object should be discarded and an
327 with an object update operation.
332 (*) Discard object [mandatory]:
334 void (*drop_object)(struct fscache_object *object)
336 This method is called to indicate that an object has been unbound from its
337 cookie, and that the cache should release the object's resources and
344 (*) Release object reference [mandatory]:
346 void (*put_object)(struct fscache_object *object)
348 This method is used to discard a reference to an object. The object may
370 int (*attr_changed)(struct fscache_object *object);
379 highest byte it's willing to store for an object.
381 This method may return -ve if an error occurred or the cache object cannot
382 be expanded. In such a case, the object will be withdrawn from service.
389 (*) Reserve cache space for an object's data [optional]:
391 int (*reserve_space)(struct fscache_object *object, loff_t size);
394 for an object and the metadata used to track it. Zero size should be
400 The reservation may exceed the current size of the object, thus permitting
401 future expansion. If the amount of space consumed by an object would
403 pages, but not required. An object may be pruned down to its reservation
511 in response to an error, such as withdrawing this object.
519 void (*uncache_page)(struct fscache_object *object, struct page *page)
537 has been called, only resource dissociation operations (object and page
570 this operation from the parent object's run state, potentially permitting
576 void fscache_set_store_limit(struct fscache_object *object,
593 (*) Perform coherency check on an object:
595 enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
599 This asks the netfs to perform a coherency check on an object that has
600 just been looked up. The cookie attached to the object will determine the
608 The coherency data indicates the object is valid as is.
612 The coherency data needs updating, but otherwise the object is
617 The coherency data indicates that the object is obsolete and should
621 (*) Initialise a freshly allocated object:
623 void fscache_object_init(struct fscache_object *object);
625 This initialises all the fields in an object representation.
628 (*) Indicate the destruction of an object:
632 This must be called to inform FS-Cache that an object that belonged to a
638 (*) Indicate negative lookup on an object:
640 void fscache_object_lookup_negative(struct fscache_object *object);
642 This is called to indicate to FS-Cache that a lookup process for an object
645 This changes the state of an object to permit reads pending on lookup
649 This may be called multiple times on an object. Only the first call is
653 (*) Indicate an object has been obtained:
655 void fscache_obtained_object(struct fscache_object *object);
657 This is called to indicate to FS-Cache that a lookup process for an object
658 produced a positive result, or that an object was created. This should
659 only be called once for any particular object.
661 This changes the state of an object to indicate:
664 this object, that there may be data available, and that reads can
667 (2) that writes may now proceed against this object.
670 (*) Indicate that object lookup failed:
672 void fscache_object_lookup_error(struct fscache_object *object);
674 This marks an object as having encountered a fatal error (usually EIO)
679 (*) Indicate that a stale object was found and discarded:
681 void fscache_object_retrying_stale(struct fscache_object *object);
683 This is called to indicate that the lookup procedure found an object in
684 the cache that the netfs decided was stale. The object has been
688 (*) Indicate that the caching backend killed an object:
690 void fscache_object_mark_killed(struct fscache_object *object,
694 object. The why parameter should be set to indicate the reason:
696 FSCACHE_OBJECT_IS_STALE - the object was stale and needs discarding.
698 FSCACHE_OBJECT_WAS_RETIRED - the object was retired when relinquished.
699 FSCACHE_OBJECT_WAS_CULLED - the object was culled to make space.
721 (*) List of object state names:
725 For debugging purposes, this may be used to turn the state that an object