Whamcloud - gitweb
Added date for the 1.6.5 release.
[fs/lustre-release.git] / lustre / mdt / mdt_internal.h
index 4ff1b1e..d943076 100644 (file)
@@ -55,6 +55,8 @@
 #include <lustre_disk.h>
 #include <lustre_sec.h>
 #include <lvfs.h>
+#include <lustre_idmap.h>
+#include <lustre_eacl.h>
 
 
 /* Data stored per client in the last_rcvd file.  In le32 order. */
@@ -177,10 +179,10 @@ struct mdt_device {
         unsigned long              mdt_client_bitmap[(LR_MAX_CLIENTS >> 3) / sizeof(long)];
 
         struct upcall_cache        *mdt_identity_cache;
-        struct upcall_cache        *mdt_rmtacl_cache;
 
-        /* root squash */
-        struct rootsquash_info     *mdt_rootsquash_info;
+        /* sptlrpc rules */
+        rwlock_t                   mdt_sptlrpc_lock;
+        struct sptlrpc_rule_set    mdt_sptlrpc_rset;
 
         /* capability keys */
         unsigned long              mdt_capa_timeout;
@@ -266,27 +268,18 @@ enum mdt_reint_flag {
 struct mdt_thread_info {
         /*
          * XXX: Part One:
-         * The following members will be filled expilictly
+         * The following members will be filled explicitly
          * with specific data in mdt_thread_info_init().
          */
-
-        /*
-         * for req-layout interface. This field should be first to be compatible
-         * with "struct com_thread_info" in seq and fld.
+        /* TODO: move this into mdt_session_key(with LCT_SESSION), because
+         * request handling may migrate from one server thread to another.
          */
-        struct req_capsule         mti_pill;
+        struct req_capsule        *mti_pill;
+
         /* although we have export in req, there are cases when it is not
          * available, e.g. closing files upon export destroy */
         struct obd_export          *mti_exp;
         /*
-         * number of buffers in reply message.
-         */
-        int                        mti_rep_buf_nr;
-        /*
-         * sizes of reply buffers.
-         */
-        int                        mti_rep_buf_size[REQ_MAX_FIELD_NR];
-        /*
          * A couple of lock handles.
          */
         struct mdt_lock_handle     mti_lh[MDT_LH_NR];
@@ -440,12 +433,13 @@ static inline struct md_device_operations *mdt_child_ops(struct mdt_device * m)
 
 static inline struct md_object *mdt_object_child(struct mdt_object *o)
 {
+        LASSERT(o);
         return lu2md(lu_object_next(&o->mot_obj.mo_lu));
 }
 
 static inline struct ptlrpc_request *mdt_info_req(struct mdt_thread_info *info)
 {
-         return info->mti_pill.rc_req;
+         return info->mti_pill ? info->mti_pill->rc_req : NULL;
 }
 
 static inline __u64 mdt_conn_flags(struct mdt_thread_info *info)
@@ -528,7 +522,8 @@ void mdt_pack_attr2body(struct mdt_thread_info *info, struct mdt_body *b,
                         const struct lu_attr *attr, const struct lu_fid *fid);
 
 int mdt_getxattr(struct mdt_thread_info *info);
-int mdt_setxattr(struct mdt_thread_info *info);
+int mdt_reint_setxattr(struct mdt_thread_info *info,
+                       struct mdt_lock_handle *lh);
 
 void mdt_lock_handle_init(struct mdt_lock_handle *lh);
 void mdt_lock_handle_fini(struct mdt_lock_handle *lh);
@@ -599,17 +594,10 @@ const struct lu_buf *mdt_buf_const(const struct lu_env *env,
 void mdt_dump_lmm(int level, const struct lov_mds_md *lmm);
 
 int mdt_check_ucred(struct mdt_thread_info *);
-
 int mdt_init_ucred(struct mdt_thread_info *, struct mdt_body *);
-
 int mdt_init_ucred_reint(struct mdt_thread_info *);
-
 void mdt_exit_ucred(struct mdt_thread_info *);
 
-int groups_from_list(struct group_info *, gid_t *);
-
-void groups_sort(struct group_info *);
-
 /* mdt_idmap.c */
 int mdt_init_idmap(struct mdt_thread_info *);
 
@@ -639,23 +627,16 @@ static inline struct mdt_device *mdt_dev(struct lu_device *d)
 
 extern struct upcall_cache_ops mdt_identity_upcall_cache_ops;
 
-struct mdt_identity *mdt_identity_get(struct upcall_cache *, __u32);
+struct md_identity *mdt_identity_get(struct upcall_cache *, __u32);
 
-void mdt_identity_put(struct upcall_cache *, struct mdt_identity *);
+void mdt_identity_put(struct upcall_cache *, struct md_identity *);
 
 void mdt_flush_identity(struct upcall_cache *, int);
 
-__u32 mdt_identity_get_setxid_perm(struct mdt_identity *, __u32, lnet_nid_t);
+__u32 mdt_identity_get_perm(struct md_identity *, __u32, lnet_nid_t);
 
 int mdt_pack_remote_perm(struct mdt_thread_info *, struct mdt_object *, void *);
 
-/* mdt/mdt_rmtacl.c */
-#define MDT_RMTACL_UPCALL_PATH          "/usr/sbin/l_facl"
-
-extern struct upcall_cache_ops mdt_rmtacl_upcall_cache_ops;
-
-int mdt_rmtacl_upcall(struct mdt_thread_info *, char *, struct lu_buf *);
-
 extern struct lu_context_key       mdt_thread_key;
 /* debug issues helper starts here*/
 static inline void mdt_fail_write(const struct lu_env *env,