* dir_dentry is NULL, we do a read lock while we do the lookup to
* avoid races with create/destroy and such changing the directory
* internal to the filesystem code. */
-struct dentry *filter_fid2dentry(struct obd_device *obd,
- struct dentry *dir_dentry,
- obd_gr group, obd_id id)
+struct dentry *filter_id2dentry(struct obd_device *obd,
+ struct dentry *dir_dentry,
+ obd_gr group, obd_id id)
{
struct dentry *dparent = dir_dentry;
struct dentry *dchild;
GOTO(cleanup, rc);
}
rc = filter_group_set_fs_flags(obd, group);
- if (rc != 0) {
+ if (rc != 0) {
CERROR("can't set kml flags %u\n", group);
GOTO(cleanup, rc);
}
if (oa->o_valid & OBD_MD_FLGROUP)
group = oa->o_gr;
- dchild = filter_fid2dentry(obd, NULL, group, oa->o_id);
+ dchild = filter_id2dentry(obd, NULL, group, oa->o_id);
if (IS_ERR(dchild)) {
CERROR("%s error looking up object: "LPU64"\n", what, oa->o_id);
obd_gr group, int *num)
{
struct dentry *dchild = NULL, *dparent = NULL;
- struct filter_obd *filter;
int err = 0, rc = 0, recreate_obj = 0, i;
- __u64 next_id;
+ struct filter_obd *filter;
void *handle = NULL;
void *lock = NULL;
+ __u64 next_id;
ENTRY;
filter = &obd->u.filter;
/*only do precreate rec record. so clean kml flags here*/
fsfilt_clear_fs_flags(obd, dparent->d_inode, SM_DO_REC);
- dchild = filter_fid2dentry(obd, dparent, group, next_id);
+ dchild = filter_id2dentry(obd, dparent, group, next_id);
if (IS_ERR(dchild))
GOTO(cleanup, rc = PTR_ERR(dchild));
cleanup_phase = 2;
static int filter_destroy(struct obd_export *exp, struct obdo *oa,
struct lov_stripe_md *ea, struct obd_trans_info *oti)
{
- struct obd_device *obd;
- struct filter_obd *filter;
+ int rc, rc2, cleanup_phase = 0, have_prepared = 0;
struct dentry *dchild = NULL, *dparent = NULL;
+ struct llog_cookie *fcc = NULL;
struct lvfs_run_ctxt saved;
+ struct filter_obd *filter;
+ struct obd_device *obd;
void *handle = NULL;
- struct llog_cookie *fcc = NULL;
- int rc, rc2, cleanup_phase = 0, have_prepared = 0;
void *lock = NULL;
struct iattr iattr;
ENTRY;
GOTO(cleanup, rc = PTR_ERR(dparent));
cleanup_phase = 1;
- dchild = filter_fid2dentry(obd, dparent, oa->o_gr, oa->o_id);
+ dchild = filter_id2dentry(obd, dparent, oa->o_gr, oa->o_id);
if (IS_ERR(dchild))
GOTO(cleanup, rc = -ENOENT);
cleanup_phase = 2;
RETURN(rc);
}
-static struct dentry *filter_lvfs_fid2dentry(__u64 id, __u32 gen, __u64 gr,
- void *data)
+static struct dentry *filter_lvfs_id2dentry(__u64 id, __u32 gen,
+ __u64 gr, void *data)
{
- return filter_fid2dentry(data, NULL, gr, id);
+ return filter_id2dentry(data, NULL, gr, id);
}
static struct lvfs_callback_ops filter_lvfs_ops = {
- l_fid2dentry: filter_lvfs_fid2dentry,
+ l_id2dentry: filter_lvfs_id2dentry,
};
static struct obd_ops filter_obd_ops = {