Whamcloud - gitweb
- CROW-related fixes from b_hd_mdref
[fs/lustre-release.git] / lustre / include / linux / obd.h
index 9727313..104acc0 100644 (file)
@@ -13,6 +13,7 @@
 #define IOC_OSC_TYPE         'h'
 #define IOC_OSC_MIN_NR       20
 #define IOC_OSC_SET_ACTIVE   _IOWR(IOC_OSC_TYPE, 21, struct obd_device *)
+#define IOC_OSC_CTL_RECOVERY _IOWR(IOC_OSC_TYPE, 22, struct obd_device *)
 #define IOC_OSC_MAX_NR       50
 
 #define IOC_MDC_TYPE         'i'
@@ -254,6 +255,11 @@ struct filter_obd {
 
         struct list_head         fo_llog_list;
         spinlock_t               fo_llog_list_lock;
+
+        /* which secure flavor from remote is denied */
+        spinlock_t              fo_denylist_lock;
+        struct list_head        fo_denylist;
+
 };
 
 struct mds_server_data;
@@ -278,8 +284,6 @@ struct client_obd {
         /* security flavors */
         __u32                    cl_sec_flavor;
         __u32                    cl_sec_subflavor;
-        __u32                    cl_nllu; /* non lustre local user */
-        __u32                    cl_nllg; /* non lustre local group */
 
         //struct llog_canceld_ctxt *cl_llcd; /* it's included by obd_llog_ctxt */
         void                    *cl_llcd_offset;
@@ -369,11 +373,12 @@ struct mds_obd {
         struct obd_export               *mds_dt_exp;
         int                              mds_has_dt_desc;
         struct lov_desc                  mds_dt_desc;
+
+        spinlock_t                       mds_dt_lock;
         obd_id                          *mds_dt_objids;
-        int                              mds_dt_objids_valid;
-        int                              mds_dt_nextid_set;
         struct file                     *mds_dt_objid_filp;
-        spinlock_t                       mds_dt_lock;
+        int                              mds_dt_objids_valid;
+
         unsigned long                   *mds_client_bitmap;
         struct semaphore                 mds_orphan_recovery_sem;
         
@@ -400,6 +405,10 @@ struct mds_obd {
         /* security related */
         char                            *mds_mds_sec;
         char                            *mds_ost_sec;
+        /* which secure flavor from remote to this mds is denied */
+        spinlock_t                      mds_denylist_lock;
+        struct list_head                mds_denylist;
+        struct semaphore                mds_create_sem;
 };
 
 struct echo_obd {
@@ -456,6 +465,8 @@ struct echo_client_obd {
 struct cache_obd {
         struct obd_export      *master_exp; /* local connection to master obd */
         struct obd_export      *cache_exp;  /* local connection to cache obd */
+        struct obd_export      *cache_real_exp;
+        struct obd_export      *master_real_exp;
         struct obd_device      *master;
         struct obd_device      *cache;
         char                   *master_name;
@@ -523,6 +534,7 @@ struct lmv_obd {
         int                     server_timeout;
         int                     connect_flags;
         struct semaphore        init_sem;
+        struct obd_connect_data conn_data;
 };
 
 struct niobuf_local {
@@ -535,13 +547,17 @@ struct niobuf_local {
         int rc;
 };
 
+#define OBD_MODE_ASYNC (1 << 0)
+#define OBD_MODE_CROW  (1 << 1)
+
 /* Don't conflict with on-wire flags OBD_BRW_WRITE, etc */
 #define N_LOCAL_TEMP_PAGE 0x10000000
 
 struct obd_trans_info {
         __u64                    oti_transno;
         __u64                   *oti_objid;
-        /* Only used on the server side for tracking acks. */
+
+        /* only used on the server side for tracking acks. */
         struct oti_req_ack_lock {
                 struct lustre_handle lock;
                 __u32                mode;
@@ -550,6 +566,7 @@ struct obd_trans_info {
         struct llog_cookie       oti_onecookie;
         struct llog_cookie      *oti_logcookies;
         int                      oti_numcookies;
+        int                      oti_flags;
 };
 
 static inline void oti_alloc_cookies(struct obd_trans_info *oti,int num_cookies)
@@ -649,16 +666,23 @@ struct obd_device {
         spinlock_t                       obd_processing_task_lock;
         __u64                            obd_next_recovery_transno;
         int                              obd_replayed_requests;
+        int                              obd_replayed_locks;
         int                              obd_requests_queued_for_recovery;
         wait_queue_head_t                obd_next_transno_waitq;
         struct list_head                 obd_uncommitted_replies;
         spinlock_t                       obd_uncommitted_replies_lock;
         struct timer_list                obd_recovery_timer;
-        struct list_head                 obd_recovery_queue;
-        struct list_head                 obd_delayed_reply_queue;
         time_t                           obd_recovery_start;
         time_t                           obd_recovery_end;
 
+        atomic_t                         obd_req_replay_clients;
+        atomic_t                         obd_lock_replay_clients;
+
+        struct list_head                 obd_req_replay_queue;
+        struct list_head                 obd_lock_replay_queue;
+        struct list_head                 obd_final_req_queue;
+        int                              obd_recovery_stage;
+
         union {
                 struct filter_obd        filter;
                 struct mds_obd           mds;
@@ -716,8 +740,9 @@ struct obd_ops {
                           int priority);
         int (*o_del_conn)(struct obd_import *imp, struct obd_uuid *uuid);
         int (*o_connect)(struct lustre_handle *conn, struct obd_device *src,
-                         struct obd_uuid *cluuid, unsigned long flags);
-        int (*o_connect_post)(struct obd_export *exp, unsigned long flags);
+                         struct obd_uuid *cluuid, struct obd_connect_data *data,
+                         unsigned long flags);
+        int (*o_connect_post)(struct obd_export *exp, unsigned, unsigned long);
         int (*o_disconnect)(struct obd_export *exp, unsigned long flags);
 
         int (*o_statfs)(struct obd_device *obd, struct obd_statfs *osfs,
@@ -732,6 +757,7 @@ struct obd_ops {
         int (*o_preallocate)(struct lustre_handle *, obd_count *req,
                              obd_id *ids);
         int (*o_create)(struct obd_export *exp,  struct obdo *oa,
+                        void *acl, int acl_size,
                         struct lov_stripe_md **ea, struct obd_trans_info *oti);
         int (*o_destroy)(struct obd_export *exp, struct obdo *oa,
                          struct lov_stripe_md *ea, struct obd_trans_info *oti);