Whamcloud - gitweb
LU-2139 osc: Track and limit "unstable" pages
[fs/lustre-release.git] / lustre / include / lclient.h
index dd782ee..5285071 100644 (file)
@@ -432,16 +432,20 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode);
 void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm);
 
 /**
- * Data structure managing a client's cached clean pages. An LRU of
- * pages is maintained, along with other statistics.
+ * Data structure managing a client's cached pages. A count of
+ * "unstable" pages is maintained, and an LRU of clean pages is
+ * maintained. "unstable" pages are pages pinned by the ptlrpc
+ * layer for recovery purposes.
  */
 struct cl_client_cache {
-       cfs_atomic_t    ccc_users;    /* # of users (OSCs) of this data */
-       cfs_list_t      ccc_lru;      /* LRU list of cached clean pages */
-       spinlock_t      ccc_lru_lock; /* lock for list */
-       cfs_atomic_t    ccc_lru_left; /* # of LRU entries available */
-       unsigned long   ccc_lru_max;  /* Max # of LRU entries possible */
-       unsigned int    ccc_lru_shrinkers; /* # of threads reclaiming */
+       cfs_atomic_t            ccc_users;    /* # of users (OSCs) */
+       cfs_list_t              ccc_lru;      /* LRU of cached clean pages */
+       spinlock_t              ccc_lru_lock; /* lock for list */
+       cfs_atomic_t            ccc_lru_left; /* # of LRU entries available */
+       unsigned long           ccc_lru_max;  /* Max # of LRU entries */
+       unsigned int            ccc_lru_shrinkers;  /* # of threads shrinking */
+       cfs_atomic_t            ccc_unstable_nr;    /* # of pages pinned */
+       wait_queue_head_t       ccc_unstable_waitq; /* Signaled on BRW commit */
 };
 
 #endif /*LCLIENT_H */