* Use is subject to license terms.
*/
/*
- * Copyright (c) 2011, 2012 Whamcloud, Inc.
+ * Copyright (c) 2012, Intel Corporation.
* Use is subject to license terms.
*/
/*
#define _OSD_INTERNAL_H
#include <dt_object.h>
-#include <lquota.h>
+#include <lustre_quota.h>
#include <sys/arc.h>
#include <sys/nvpair.h>
struct luz_direntry oti_zde;
struct lquota_id_info oti_qi;
+ struct lu_seq_range oti_seq_range;
};
extern struct lu_context_key osd_key;
struct thandle ot_super;
cfs_list_t ot_dcb_list;
cfs_list_t ot_sa_list;
- cfs_semaphore_t ot_sa_lock;
+ struct semaphore ot_sa_lock;
dmu_tx_t *ot_tx;
struct lquota_trans ot_quota_trans;
__u32 ot_write_commit:1,
uint64_t oi_zapid;
};
+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 osd_seq_list {
+ rwlock_t osl_seq_list_lock; /* lock for seq_list */
+ cfs_list_t osl_seq_list; /* list head for seq */
+ struct semaphore osl_seq_init_sem;
+};
+
#define OSD_OST_MAP_SIZE 32
/*
uint64_t od_root;
struct osd_oi **od_oi_table;
unsigned int od_oi_count;
- uint64_t od_ost_compat_dirs[OSD_OST_MAP_SIZE];
- uint64_t od_ost_compat_grp0;
+ uint64_t od_ost_compat_grp0;
+ struct osd_seq_list od_seq_list;
unsigned int od_rdonly:1,
od_xattr_in_sa:1,
nvlist_t *oo_sa_xattr;
cfs_list_t oo_sa_linkage;
- cfs_rw_semaphore_t oo_sem;
+ struct rw_semaphore oo_sem;
/* cached attributes */
- cfs_rwlock_t oo_attr_lock;
+ rwlock_t oo_attr_lock;
struct lu_attr oo_attr;
/* protects extended attributes */
- cfs_semaphore_t oo_guard;
+ struct semaphore oo_guard;
uint64_t oo_xattr;
/* record size for index file */
return osd_invariant(osd_obj(l));
}
+static inline struct seq_server_site *osd_seq_site(struct osd_device *osd)
+{
+ return osd->od_dt_dev.dd_lu_dev.ld_site->ld_seq_site;
+}
+
+static inline char *osd_name(struct osd_device *osd)
+{
+ return osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name;
+}
#ifdef LPROCFS
enum {