Whamcloud - gitweb
LU-1632 fid: remove fid_delete in delete_inode procedure
authorwangdi <di.wang@whamcloud.com>
Mon, 16 Jul 2012 17:27:56 +0000 (10:27 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 Nov 2012 22:48:34 +0000 (18:48 -0400)
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: I07a59da0db2ac284eb99f78a24b0e1af3080e2ca
Reviewed-on: http://review.whamcloud.com/3422
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.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 041cf3a..2c4fda2 100644 (file)
@@ -1304,12 +1304,6 @@ struct obd_ops {
         int (*o_fid_alloc)(struct obd_export *exp, struct lu_fid *fid,
                            struct md_op_data *op_data);
 
-        /*
-         * 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)(struct obd_device *obd, struct obd_statfs *osfs,
                         __u64 max_age, __u32 flags);
         int (*o_statfs_async)(struct obd_device *obd, struct obd_info *oinfo,
index c93984b..c8b1031 100644 (file)
@@ -1041,19 +1041,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(struct obd_export *exp)
 {
         int rc;
index b4dac6c..275a7bc 100644 (file)
@@ -1786,14 +1786,8 @@ void ll_read_inode2(struct inode *inode, void *opaque)
 
 void ll_delete_inode(struct inode *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);
-
         truncate_inode_pages(&inode->i_data, 0);
 
         /* Workaround for LU-118 */
index 09167d6..3f9575b 100644 (file)
@@ -1040,17 +1040,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;
@@ -3129,7 +3118,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
 };
 
 struct md_ops lmv_md_ops = {
index 72310d1..7e95582 100644 (file)
@@ -1959,16 +1959,6 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
         RETURN(seq_client_alloc_fid(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;
@@ -2296,7 +2286,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 9808db6..2377edd 100644 (file)
@@ -1470,7 +1470,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);