From: John L. Hammond
Remove ll_objects_destroy(). This function is not needed for
interoperability with servers of version 2.4 or higher.
Remove the then unused function lov_destroy() and its supporting
functions. Remove the lsm_destroy method of struct lsm_operations.
Remove the unused struct lov_stripe_md, MD export, and capa parameters
from obd_destroy() and its implementations.
Signed-off-by: John L. Hammond
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/12618
Reviewed-by: Andreas Dilger
Reviewed-by: Jinshan Xiong
Reviewed-by: Lai Siyao
Reviewed-by: Oleg Drokin
Signed-off-by: James Simmons
---
drivers/staging/lustre/lustre/include/obd.h|5 +-
drivers/staging/lustre/lustre/include/obd_class.h |6 +-
drivers/staging/lustre/lustre/llite/file.c |6 --
.../staging/lustre/lustre/llite/llite_internal.h |2 -
drivers/staging/lustre/lustre/llite/namei.c| 73 --
drivers/staging/lustre/lustre/lov/lov_ea.c |8 --
drivers/staging/lustre/lustre/lov/lov_internal.h |5 -
drivers/staging/lustre/lustre/lov/lov_obd.c| 54 --
drivers/staging/lustre/lustre/lov/lov_request.c| 78
.../staging/lustre/lustre/obdecho/echo_client.c|5 +-
drivers/staging/lustre/lustre/osc/osc_request.c|3 +-
11 files changed, 6 insertions(+), 239 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/obd.h
b/drivers/staging/lustre/lustre/include/obd.h
index ca63891..cd7f552 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -869,8 +869,7 @@ struct obd_ops {
int (*create)(const struct lu_env *env, struct obd_export *exp,
struct obdo *oa, struct obd_trans_info *oti);
int (*destroy)(const struct lu_env *env, struct obd_export *exp,
- struct obdo *oa, struct lov_stripe_md *ea,
- struct obd_trans_info *oti, struct obd_export *md_exp);
+ struct obdo *oa, struct obd_trans_info *oti);
int (*setattr)(const struct lu_env *, struct obd_export *exp,
struct obd_info *oinfo, struct obd_trans_info *oti);
int (*setattr_async)(struct obd_export *exp, struct obd_info *oinfo,
@@ -1058,8 +1057,6 @@ struct md_ops {
struct lsm_operations {
void (*lsm_free)(struct lov_stripe_md *);
- int (*lsm_destroy)(struct lov_stripe_md *, struct obdo *oa,
- struct obd_export *md_exp);
void (*lsm_stripe_by_index)(struct lov_stripe_md *, int *, u64 *,
u64 *);
void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, u64 *,
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h
b/drivers/staging/lustre/lustre/include/obd_class.h
index 2bf2826..9836aed 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -702,16 +702,14 @@ static inline int obd_create(const struct lu_env *env,
struct obd_export *exp,
}
static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
- struct obdo *obdo, struct lov_stripe_md *ea,
- struct obd_trans_info *oti,
- struct obd_export *md_exp)
+ struct obdo *obdo, struct obd_trans_info *oti)
{
int rc;
EXP_CHECK_DT_OP(exp, destroy);
EXP_COUNTER_INCREMENT(exp, destroy);
- rc = OBP(exp->exp_obd, destroy)(env, exp, obdo, ea, oti, md_exp);
+ rc = OBP(exp->exp_obd, destroy)(env, exp, obdo, oti);
return rc;
}
diff --git a/drivers/staging/lustre/lustre/llite/file.c
b/drivers/staging/lustre/lustre/llite/file.c
index a562b11..0b3b387 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -189,12 +189,6 @@ static int ll_close_inode_openhandle(struct obd_export
*md_exp,
spin_unlock(>lli_lock);
}
- if (rc == 0) {
- rc = ll_objects_destroy(req, inode);
- if (rc)
- CERROR("inode %lu ll_objects destroy: rc = %d\n",
- inode->i_ino, rc);
- }
if (rc == 0 && op_data->op_bias & MDS_HSM_RELEASE) {
struct mdt_body *body;
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h
b/drivers/staging/lustre/lustre/llite/llite_internal.h
index bdfdff5..0dc47f2 100644
--- a/drivers/staging/lustre/lustre/llite/llite_internal.h
+++ b/drivers/staging/lustre/lustre/llite/llite_internal.h
@@ -721,8 +721,6 @@ void ll_release_page(struct inode *inode, struct page
*page, bool remove);
/* llite/namei.c */
extern const struct inode_operations ll_special_inode_operations;
-int ll_objects_destroy(struct ptlrpc_request *request,
-