zap_cursor_t *oiq_zc;
/** identifier for current quota record */
__u64 oiq_id;
- /* the hash where object accounting is cached */
- cfs_hash_t *oiq_hash;
unsigned oiq_reset:1; /* 1 -- no need to advance */
};
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;
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;
};
#define OSD_OST_MAP_SIZE 32
/*
- * this structure tracks changes made to the accounting within specific TXG
- */
-struct osd_zfs_acct_txg {
- uint64_t zat_txg;
- cfs_hash_t *zat_usr;
- cfs_hash_t *zat_grp;
- struct osd_device *zat_osd;
-};
-
-/*
* osd device.
*/
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;
arc_prune_t *arc_prune_cb;
- /* quota: object accounting */
- spinlock_t od_known_txg_lock;
- uint64_t od_known_txg;
- struct osd_zfs_acct_txg *od_acct_delta;
- cfs_hash_t *od_acct_usr;
- cfs_hash_t *od_acct_grp;
+ /* osd seq instance */
+ struct lu_client_seq *od_cl_seq;
};
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;
int osd_statfs(const struct lu_env *, struct dt_device *, struct obd_statfs *);
extern const struct dt_index_operations osd_acct_index_ops;
+uint64_t osd_quota_fid2dmu(const struct lu_fid *fid);
extern struct lu_device_operations osd_lu_ops;
int osd_declare_quota(const struct lu_env *env, struct osd_device *osd,
qid_t uid, qid_t gid, long long space,
};
/* 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);
return rc;
}
-void osd_zfs_acct_uid(const struct lu_env *env, struct osd_device *osd,
- __u64 uid, int delta, struct osd_thandle *oh);
-void osd_zfs_acct_gid(const struct lu_env *env, struct osd_device *osd,
- __u64 gid, int delta, struct osd_thandle *oh);
-int osd_zfs_acct_init(const struct lu_env *env, struct osd_device *osd);
-void osd_zfs_acct_fini(const struct lu_env *env, struct osd_device *osd);
-
static inline uint64_t attrs_fs2zfs(const uint32_t flags)
{
return (((flags & FS_APPEND_FL) ? ZFS_APPENDONLY : 0) |