Whamcloud - gitweb
LU-1632 fid: remove fid_delete in delete_inode procedure
authorwangdi <di.wang@whamcloud.com>
Wed, 18 Jul 2012 09:17:27 +0000 (02:17 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 17 Dec 2012 06:11:01 +0000 (01:11 -0500)
Remove fid_delete in delete_inode procedure, which is
completely obsolete in 2.x infrastructure , especially
when lmv layer is not being created during upgrade,
because it will cause the client fid space to be zero
out whenever an inode is being deleted.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I4002945603790f8dda3e33847160c13afb7b41a4
Reviewed-on: http://review.whamcloud.com/3434
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd.h
lustre/include/obd_class.h
lustre/llite/llite_lib.c
lustre/lmv/lmv_obd.c
lustre/mdc/mdc_request.c
lustre/obdclass/lprocfs_status.c

index 6a2ab5f..f69baea 100644 (file)
@@ -1332,8 +1332,6 @@ struct obd_ops {
          * Object with @fid is getting deleted, we may want to do something
          * about this.
          */
-        int (*o_fid_delete)(struct obd_export *exp, const struct lu_fid *fid);
-
         int (*o_statfs)(const struct lu_env *, struct obd_export *exp,
                         struct obd_statfs *osfs, __u64 max_age, __u32 flags);
         int (*o_statfs_async)(struct obd_export *exp, struct obd_info *oinfo,
index 50abf03..25f3ff2 100644 (file)
@@ -1077,19 +1077,6 @@ static inline int obd_fid_alloc(struct obd_export *exp,
         RETURN(rc);
 }
 
-static inline int obd_fid_delete(struct obd_export *exp,
-                                 const struct lu_fid *fid)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_DT_OP(exp, fid_delete);
-        EXP_COUNTER_INCREMENT(exp, fid_delete);
-
-        rc = OBP(exp->exp_obd, fid_delete)(exp, fid);
-        RETURN(rc);
-}
-
 static inline int obd_ping(const struct lu_env *env, struct obd_export *exp)
 {
         int rc;
index f54393f..e91259c 100644 (file)
@@ -1873,14 +1873,8 @@ void ll_read_inode2(struct inode *inode, void *opaque)
 void ll_delete_inode(struct inode *inode)
 {
        struct cl_inode_info *lli = cl_i2info(inode);
-       struct ll_sb_info    *sbi = ll_i2sbi(inode);
-       int rc;
        ENTRY;
 
-       rc = obd_fid_delete(sbi->ll_md_exp, ll_inode2fid(inode));
-       if (rc)
-               CERROR("fid_delete() failed, rc %d\n", rc);
-
        if (S_ISREG(inode->i_mode) && lli->lli_clob != NULL)
                /* discard all dirty pages before truncating them, required by
                 * osc_extent implementation at LU-1030. */
index 5ed30c8..f68a0cc 100644 (file)
@@ -1029,17 +1029,6 @@ int lmv_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
         RETURN(rc);
 }
 
-static int lmv_fid_delete(struct obd_export *exp, const struct lu_fid *fid)
-{
-        ENTRY;
-        LASSERT(exp != NULL && fid != NULL);
-        if (lmv_object_delete(exp, fid)) {
-                CDEBUG(D_INODE, "Object "DFID" is destroyed.\n",
-                       PFID(fid));
-        }
-        RETURN(0);
-}
-
 static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
         struct lmv_obd             *lmv = &obd->u.lmv;
@@ -3177,7 +3166,6 @@ struct obd_ops lmv_obd_ops = {
         .o_notify               = lmv_notify,
         .o_get_uuid             = lmv_get_uuid,
         .o_iocontrol            = lmv_iocontrol,
-        .o_fid_delete           = lmv_fid_delete,
         .o_quotacheck           = lmv_quotacheck,
         .o_quotactl             = lmv_quotactl
 };
index fa30f9d..ae21cd3 100644 (file)
@@ -2043,16 +2043,6 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
         RETURN(seq_client_alloc_fid(NULL, seq, fid));
 }
 
-/* XXX This method is used only to clear current fid seq
- * once fld/mds insert failed */
-static int mdc_fid_delete(struct obd_export *exp, const struct lu_fid *fid)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-
-        seq_client_flush(cli->cl_seq);
-        return 0;
-}
-
 struct obd_uuid *mdc_get_uuid(struct obd_export *exp) {
         struct client_obd *cli = &exp->exp_obd->u.cli;
         return &cli->cl_target_uuid;
@@ -2369,7 +2359,6 @@ struct obd_ops mdc_obd_ops = {
         .o_fid_init         = mdc_fid_init,
         .o_fid_fini         = mdc_fid_fini,
         .o_fid_alloc        = mdc_fid_alloc,
-        .o_fid_delete       = mdc_fid_delete,
         .o_import_event     = mdc_import_event,
         .o_llog_init        = mdc_llog_init,
         .o_llog_finish      = mdc_llog_finish,
index d8146ae..61f4915 100644 (file)
@@ -1642,7 +1642,6 @@ void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats)
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_init);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_fini);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_alloc);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_delete);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);