From: wangdi Date: Wed, 18 Jul 2012 09:17:27 +0000 (-0700) Subject: LU-1632 fid: remove fid_delete in delete_inode procedure X-Git-Tag: 2.3.58~39 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=7c4c8f922b383a0468ec0aab1815a46d86e67814 LU-1632 fid: remove fid_delete in delete_inode procedure 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 Change-Id: I4002945603790f8dda3e33847160c13afb7b41a4 Reviewed-on: http://review.whamcloud.com/3434 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 6a2ab5f..f69baea 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -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, diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 50abf03..25f3ff2 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -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; diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index f54393f..e91259c 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -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. */ diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 5ed30c8..f68a0cc 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -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 }; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index fa30f9d..ae21cd3 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -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, diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index d8146ae..61f4915 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -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);