Lines Matching full:object
70 struct fscache_object *fsdef; /* object for the fsdef index */
79 * operation to be applied to a cache object
99 struct list_head pend_link; /* link in object->pending_ops */
100 struct fscache_object *object; /* object to be operated upon */ member
108 #define FSCACHE_OP_DEC_READ_CNT 6 /* decrement object->n_reads on destruction */
215 * - defer writes until cache object lookup completion
229 /* allocate an object record for a cookie */
233 /* look up the object for a cookie
236 int (*lookup_object)(struct fscache_object *object);
239 void (*lookup_complete)(struct fscache_object *object);
241 /* increment the usage count on this object (may fail if unmounting) */
242 struct fscache_object *(*grab_object)(struct fscache_object *object,
245 /* pin an object in the cache */
246 int (*pin_object)(struct fscache_object *object);
248 /* unpin an object in the cache */
249 void (*unpin_object)(struct fscache_object *object);
255 /* store the updated auxiliary data on an object */
256 void (*update_object)(struct fscache_object *object);
258 /* Invalidate an object */
261 /* discard the resources pinned by an object and effect retirement if
263 void (*drop_object)(struct fscache_object *object);
265 /* dispose of a reference to an object */
266 void (*put_object)(struct fscache_object *object,
272 /* notification that the attributes of a non-index object (such as
274 int (*attr_changed)(struct fscache_object *object);
276 /* reserve space for an object's data and associated metadata */
277 int (*reserve_space)(struct fscache_object *object, loff_t i_size);
302 void (*uncache_page)(struct fscache_object *object,
315 FSCACHE_OBJECT_EV_NEW_CHILD, /* T if object has a new child */
316 FSCACHE_OBJECT_EV_PARENT_READY, /* T if object's parent is ready */
317 FSCACHE_OBJECT_EV_UPDATE, /* T if object should be updated */
318 FSCACHE_OBJECT_EV_INVALIDATE, /* T if cache requested object invalidation */
321 FSCACHE_OBJECT_EV_KILL, /* T if netfs relinquished or cache withdrew object */
328 * States for object state machine.
338 const struct fscache_state *(*work)(struct fscache_object *object,
347 const struct fscache_state *state; /* Object state machine state */
351 int n_ops; /* number of extant ops on object */
352 int n_obj_ops; /* number of object ops outstanding on object */
359 unsigned long oob_event_mask; /* OOB events this object is interested in */
360 unsigned long event_mask; /* events this object is interested in */
361 unsigned long events; /* events to be processed by this object
365 #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */
366 #define FSCACHE_OBJECT_PENDING_WRITE 1 /* T if object has pending write */
367 #define FSCACHE_OBJECT_WAITING 2 /* T if object is waiting on its parent */
368 #define FSCACHE_OBJECT_IS_LIVE 3 /* T if object is not withdrawn or relinquished */
369 #define FSCACHE_OBJECT_IS_LOOKED_UP 4 /* T if object has been looked up */
370 #define FSCACHE_OBJECT_IS_AVAILABLE 5 /* T if object has become active */
371 #define FSCACHE_OBJECT_RETIRED 6 /* T if object was retired on relinquishment */
372 #define FSCACHE_OBJECT_KILLED_BY_CACHE 7 /* T if object was killed by the cache */
373 #define FSCACHE_OBJECT_RUN_AFTER_DEAD 8 /* T if object has been dispatched after death */
377 struct fscache_cache *cache; /* cache that supplied this object */
378 struct fscache_cookie *cookie; /* netfs's file/index object */
379 struct fscache_object *parent; /* parent object */
383 struct list_head pending_ops; /* unstarted operations on this object */
385 struct rb_node objlist_link; /* link in global object list */
395 extern void fscache_object_lookup_negative(struct fscache_object *object);
396 extern void fscache_obtained_object(struct fscache_object *object);
398 static inline bool fscache_object_is_live(struct fscache_object *object) in fscache_object_is_live() argument
400 return test_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); in fscache_object_is_live()
403 static inline bool fscache_object_is_dying(struct fscache_object *object) in fscache_object_is_dying() argument
405 return !fscache_object_is_live(object); in fscache_object_is_dying()
408 static inline bool fscache_object_is_available(struct fscache_object *object) in fscache_object_is_available() argument
410 return test_bit(FSCACHE_OBJECT_IS_AVAILABLE, &object->flags); in fscache_object_is_available()
413 static inline bool fscache_cache_is_broken(struct fscache_object *object) in fscache_cache_is_broken() argument
415 return test_bit(FSCACHE_IOERROR, &object->cache->flags); in fscache_cache_is_broken()
418 static inline bool fscache_object_is_active(struct fscache_object *object) in fscache_object_is_active() argument
420 return fscache_object_is_available(object) && in fscache_object_is_active()
421 fscache_object_is_live(object) && in fscache_object_is_active()
422 !fscache_cache_is_broken(object); in fscache_object_is_active()
426 * fscache_object_destroyed - Note destruction of an object in a cache
427 * @cache: The cache from which the object came
429 * Note the destruction and deallocation of an object record in a cache.
438 * fscache_object_lookup_error - Note an object encountered an error
439 * @object: The object on which the error was encountered
441 * Note that an object encountered a fatal error (usually an I/O error) and
444 static inline void fscache_object_lookup_error(struct fscache_object *object) in fscache_object_lookup_error() argument
446 set_bit(FSCACHE_OBJECT_EV_ERROR, &object->events); in fscache_object_lookup_error()
450 * fscache_set_store_limit - Set the maximum size to be stored in an object
451 * @object: The object to set the maximum on
454 * Set the maximum size an object is permitted to reach, implying the highest
461 void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) in fscache_set_store_limit() argument
463 object->store_limit_l = i_size; in fscache_set_store_limit()
464 object->store_limit = i_size >> PAGE_SHIFT; in fscache_set_store_limit()
466 object->store_limit++; in fscache_set_store_limit()
490 * fscache_use_cookie - Request usage of cookie attached to an object
491 * @object: Object description
493 * Request usage of the cookie attached to an object. NULL is returned if the
496 static inline bool fscache_use_cookie(struct fscache_object *object) in fscache_use_cookie() argument
498 struct fscache_cookie *cookie = object->cookie; in fscache_use_cookie()
513 * fscache_unuse_cookie - Cease usage of cookie attached to an object
514 * @object: Object description
516 * Cease usage of the cookie attached to an object. When the users count
519 static inline void fscache_unuse_cookie(struct fscache_object *object) in fscache_unuse_cookie() argument
521 struct fscache_cookie *cookie = object->cookie; in fscache_unuse_cookie()
549 extern enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
554 extern void fscache_object_retrying_stale(struct fscache_object *object);
562 extern void fscache_object_mark_killed(struct fscache_object *object,