Whamcloud - gitweb
LU-744 osc: add lru pages management - new RPC
[fs/lustre-release.git] / lustre / osc / osc_cl_internal.h
index 54ded82..79dcc8b 100644 (file)
@@ -56,6 +56,7 @@
 /* osc_build_res_name() */
 #include <obd_ost.h>
 #include <cl_object.h>
+#include <lclient.h>
 #include "osc_internal.h"
 
 /** \defgroup osc osc
@@ -101,6 +102,7 @@ struct osc_session {
         struct osc_io       os_io;
 };
 
+#define OTI_PVEC_SIZE 64
 struct osc_thread_info {
         struct ldlm_res_id      oti_resname;
         ldlm_policy_data_t      oti_policy;
@@ -108,7 +110,8 @@ struct osc_thread_info {
         struct cl_attr          oti_attr;
         struct lustre_handle    oti_handle;
         struct cl_page_list     oti_plist;
-       struct cl_io        oti_io;
+       struct cl_io            oti_io;
+       struct cl_page         *oti_pvec[OTI_PVEC_SIZE];
 };
 
 struct osc_object {
@@ -360,14 +363,25 @@ struct osc_page {
          */
                               ops_temp:1,
         /**
+        * in LRU?
+        */
+                             ops_in_lru:1,
+       /**
          * Set if the page must be transferred with OBD_BRW_SRVLOCK.
          */
                               ops_srvlock:1;
-        /**
-         * Linkage into a per-osc_object list of pages in flight. For
-         * debugging.
-         */
-        cfs_list_t            ops_inflight;
+       union {
+               /**
+                * lru page list. ops_inflight and ops_lru are exclusive so
+                * that they can share the same data.
+                */
+               cfs_list_t            ops_lru;
+               /**
+                * Linkage into a per-osc_object list of pages in flight. For
+                * debugging.
+                */
+               cfs_list_t            ops_inflight;
+       };
         /**
          * Thread that submitted this page for transfer. For debugging.
          */