Whamcloud - gitweb
LU-3660 acl: support mount option "noacl" for zfs
[fs/lustre-release.git] / lustre / osd-zfs / osd_internal.h
index 37f351c..16e7633 100644 (file)
@@ -104,7 +104,7 @@ struct osd_zap_it {
         * 3 - real records */
        unsigned                 ozi_pos:3;
        union {
-               char             ozi_name[NAME_MAX + 1]; /* file name for dir */
+               char             ozi_name[MAXNAMELEN]; /* file name for dir */
                __u64            ozi_key; /* binary key for index files */
        };
 };
@@ -167,7 +167,10 @@ struct osd_thread_info {
        };
 
        char                     oti_str[64];
-       char                     oti_key[MAXNAMELEN + 1];
+       union {
+               char             oti_key[MAXNAMELEN + 1];
+               __u64            oti_key64[(MAXNAMELEN + 1)/sizeof(__u64)];
+       };
        struct lustre_mdt_attrs oti_mdt_attrs;
 
        struct lu_attr           oti_la;
@@ -189,8 +192,8 @@ static inline struct osd_thread_info *osd_oti_get(const struct lu_env *env)
 
 struct osd_thandle {
        struct thandle           ot_super;
-       cfs_list_t               ot_dcb_list;
-       cfs_list_t               ot_sa_list;
+       struct list_head         ot_dcb_list;
+       struct list_head         ot_sa_list;
        struct semaphore         ot_sa_lock;
        dmu_tx_t                *ot_tx;
        struct lquota_trans      ot_quota_trans;
@@ -212,12 +215,12 @@ struct osd_seq {
        uint64_t         *os_compat_dirs;
        int              os_subdir_count; /* subdir count for each seq */
        obd_seq          os_seq;          /* seq number */
-       cfs_list_t       os_seq_list;     /* list to seq_list */
+       struct list_head os_seq_list;     /* list to seq_list */
 };
 
 struct osd_seq_list {
-       rwlock_t         osl_seq_list_lock;     /* lock for seq_list */
-       cfs_list_t       osl_seq_list;      /* list head for seq */
+       rwlock_t         osl_seq_list_lock;     /* lock for seq_list */
+       struct list_head osl_seq_list;          /* list head for seq */
        struct semaphore osl_seq_init_sem;
 };
 
@@ -239,7 +242,7 @@ struct osd_device {
        unsigned long            od_capa_timeout;
        __u32                    od_capa_alg;
        struct lustre_capa_key  *od_capa_keys;
-       cfs_hlist_head_t        *od_capa_hash;
+       struct hlist_head       *od_capa_hash;
 
        cfs_proc_dir_entry_t    *od_proc_entry;
        struct lprocfs_stats    *od_stats;
@@ -253,7 +256,8 @@ struct osd_device {
        unsigned int             od_rdonly:1,
                                 od_xattr_in_sa:1,
                                 od_quota_iused_est:1,
-                                od_is_ost:1;
+                                od_is_ost:1,
+                                od_posix_acl:1;
 
        char                     od_mntdev[128];
        char                     od_svname[128];
@@ -271,11 +275,14 @@ struct osd_device {
        /* used to debug zerocopy logic: the fields track all
         * allocated, loaned and referenced buffers in use.
         * to be removed once the change is tested well. */
-       cfs_atomic_t             od_zerocopy_alloc;
-       cfs_atomic_t             od_zerocopy_loan;
-       cfs_atomic_t             od_zerocopy_pin;
+       atomic_t                 od_zerocopy_alloc;
+       atomic_t                 od_zerocopy_loan;
+       atomic_t                 od_zerocopy_pin;
 
        arc_prune_t             *arc_prune_cb;
+
+       /* osd seq instance */
+       struct lu_client_seq    *od_cl_seq;
 };
 
 struct osd_object {
@@ -290,7 +297,7 @@ struct osd_object {
        dmu_buf_t               *oo_db;
        sa_handle_t             *oo_sa_hdl;
        nvlist_t                *oo_sa_xattr;
-       cfs_list_t               oo_sa_linkage;
+       struct list_head         oo_sa_linkage;
 
        struct rw_semaphore      oo_sem;
 
@@ -303,7 +310,9 @@ struct osd_object {
        uint64_t                 oo_xattr;
 
        /* record size for index file */
-       int                      oo_recsize;
+       unsigned char            oo_keysize;
+       unsigned char            oo_recsize;
+       unsigned char            oo_recusize;   /* unit size */
 };
 
 int osd_statfs(const struct lu_env *, struct dt_device *, struct obd_statfs *);
@@ -397,8 +406,7 @@ enum {
 };
 
 /* osd_lproc.c */
-extern struct lprocfs_vars lprocfs_osd_obd_vars[];
-extern struct lprocfs_vars lprocfs_osd_module_vars[];
+extern struct lprocfs_seq_vars lprocfs_osd_obd_vars[];
 
 int osd_procfs_init(struct osd_device *osd, const char *name);
 int osd_procfs_fini(struct osd_device *osd);
@@ -506,4 +514,16 @@ static inline uint32_t attrs_zfs2fs(const uint64_t flags)
 }
 
 #endif
+
+#ifndef HAVE_DSL_POOL_CONFIG
+static inline void dsl_pool_config_enter(dsl_pool_t *dp, char *name)
+{
+}
+
+static inline void dsl_pool_config_exit(dsl_pool_t *dp, char *name)
+{
+}
+
+#endif
+
 #endif /* _OSD_INTERNAL_H */