Whamcloud - gitweb
- landing b_fid.
[fs/lustre-release.git] / lustre / obdfilter / filter.c
index 04b941e..ef1fc11 100644 (file)
@@ -1153,9 +1153,9 @@ struct dentry *filter_parent_lock(struct obd_device *obd, obd_gr group,
  * 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;
@@ -1728,7 +1728,7 @@ static int filter_connect(struct lustre_handle *conn, struct obd_device *obd,
                 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);
         }
@@ -1986,7 +1986,7 @@ struct dentry *__filter_oa2dentry(struct obd_device *obd,
         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);
@@ -2265,11 +2265,11 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa,
                             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;
@@ -2316,7 +2316,7 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa,
                 /*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;
@@ -2499,13 +2499,13 @@ static int filter_create(struct obd_export *exp, struct obdo *oa,
 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;
@@ -2523,7 +2523,7 @@ static int filter_destroy(struct obd_export *exp, struct obdo *oa,
                 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;
@@ -2985,14 +2985,14 @@ static int filter_llog_connect(struct obd_export *exp,
         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 = {