struct semaphore om_dir_init_sem;
};
+struct osd_mdobj {
+ struct dentry *om_root; /* AGENT/<index> */
+ obd_seq om_index; /* mdt index */
+ cfs_list_t om_list; /* list to omm_list */
+};
+
+struct osd_mdobj_map {
+ struct dentry *omm_agent_dentry;
+};
+
#define osd_ldiskfs_find_entry(dir, dentry, de, lock) \
ll_ldiskfs_find_entry(dir, dentry, de, lock)
#define osd_ldiskfs_add_entry(handle, child, cinode, hlock) \
struct osd_otable_it {
struct osd_device *ooi_dev;
+ pid_t ooi_pid;
struct osd_otable_cache ooi_cache;
- /* For osd_otable_it_key. */
- __u8 ooi_key[16];
-
/* The following bits can be updated/checked w/o lock protection.
* If more bits will be introduced in the future and need lock to
* protect, please add comment. */
* filled into cache. */
ooi_user_ready:1, /* The user out of OSD is
* ready to iterate. */
- ooi_waiting:1; /* it::next is waiting. */
+ ooi_waiting:1, /* it::next is waiting. */
+ ooi_stopping:1; /* Someone is stopping
+ * the iteration. */
};
extern const int osd_dto_credits_noquota[];
struct lu_site od_site;
struct osd_obj_map *od_ost_map;
+ struct osd_mdobj_map *od_mdt_map;
unsigned long long od_readcache_max_filesize;
int od_read_cache;
struct mutex od_otable_mutex;
struct osd_otable_it *od_otable_it;
struct osd_scrub od_scrub;
+ cfs_list_t od_ios_list;
/* service name associated with the osd device */
char od_svname[MAX_OBD_NAME];
bool oti_rollback;
#endif
+ char oti_name[48];
};
extern int ldiskfs_pdo;
struct lustre_capa *capa, __u64 opc);
struct inode *osd_iget(struct osd_thread_info *info, struct osd_device *dev,
struct osd_inode_id *id);
+int osd_ea_fid_set(struct osd_thread_info *info, struct inode *inode,
+ const struct lu_fid *fid);
int osd_get_lma(struct osd_thread_info *info, struct inode *inode,
struct dentry *dentry, struct lustre_mdt_attrs *lma);
void osd_scrub_file_reset(struct osd_scrub *scrub, __u8 *uuid, __u64 flags);
int osd_scrub_file_store(struct osd_scrub *scrub);
+char *osd_lf_fid2name(const struct lu_fid *fid);
int osd_scrub_start(struct osd_device *dev);
int osd_scrub_setup(const struct lu_env *env, struct osd_device *dev);
void osd_scrub_cleanup(const struct lu_env *env, struct osd_device *dev);
int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
const struct lu_fid *fid, struct lu_seq_range *range);
+struct dentry *osd_agent_lookup(struct osd_mdobj_map *omm, int index);
+struct dentry *osd_agent_load(const struct osd_device *osd, int mdt_index,
+ int create);
+
+int osd_delete_agent_inode(const struct lu_env *env, struct osd_device *osd,
+ struct osd_object *obj, struct osd_thandle *oh);
+int osd_create_agent_inode(const struct lu_env *env, struct osd_device *osd,
+ struct osd_object *obj, struct osd_thandle *oh);
+
/* osd_quota_fmt.c */
int walk_tree_dqentry(const struct lu_env *env, struct osd_object *obj,
int type, uint blk, int depth, uint index,
int osd_quota_migration(const struct lu_env *env, struct dt_object *dt,
const struct dt_index_features *feat);
+/* osd_compat.c */
+struct osd_obj_seq *osd_seq_load(struct osd_device *osd, obd_seq seq);
+
static inline bool is_quota_glb_feat(const struct dt_index_features *feat)
{
return (feat == &dt_quota_iusr_features ||