Whamcloud - gitweb
LU-3321 clio: add pages into writeback cache in batch
[fs/lustre-release.git] / lustre / osc / osc_internal.h
index e6f8f3f..5c4e785 100644 (file)
@@ -77,6 +77,12 @@ struct osc_async_page {
 #define oap_count       oap_brw_page.count
 #define oap_brw_flags   oap_brw_page.flag
 
+static inline struct osc_async_page *brw_page2oap(struct brw_page *pga)
+{
+       return (struct osc_async_page *)container_of(pga, struct osc_async_page,
+                                                    oap_brw_page);
+}
+
 struct osc_cache_waiter {
        cfs_list_t              ocw_entry;
        wait_queue_head_t             ocw_waitq;