From 017c04a20bb9adc42faf0c6b8226e5109008ee80 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Mon, 1 Dec 2014 13:57:06 -0600 Subject: [PATCH] LU-2675 mdc: remove mdc_sendpage() Remove the unused function mdc_sendpage() and supporting crud. Signed-off-by: John L. Hammond Change-Id: I09792c5b25f10351eead9e67d42de5821f4d7bc1 Reviewed-on: http://review.whamcloud.com/12893 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- config/lustre-build.m4 | 2 -- lustre/autoconf/lustre-core.m4 | 16 ------------- lustre/include/lustre_mdc.h | 4 ---- lustre/include/lustre_req_layout.h | 1 - lustre/mdc/mdc_request.c | 46 -------------------------------------- lustre/ptlrpc/layout.c | 7 ------ 6 files changed, 76 deletions(-) diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 39f8435..da197ba 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -647,8 +647,6 @@ LB_CONFIG_SERVERS # Tests depends from utils (multiop from liblustreapi) AS_IF([test "x$enable_utils" = xno], [enable_tests="no"]) -# two macros for cmd3 -m4_ifdef([LC_CONFIG_SPLIT], [LC_CONFIG_SPLIT]) m4_ifdef([LC_NODEMAP_PROC_DEBUG], [LC_NODEMAP_PROC_DEBUG]) LN_CONFIG_CDEBUG LC_QUOTA diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index a5aadff..239172b 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1746,22 +1746,6 @@ AS_IF([test "x$enable_quota" != xno -a "x$enable_utils" != xno], [ ]) # LC_QUOTA # -# LC_CONFIG_SPLIT -# -# whether to enable split support -# -AC_DEFUN([LC_CONFIG_SPLIT], [ -AC_MSG_CHECKING([whether to enable split support]) -AC_ARG_ENABLE([split], - AC_HELP_STRING([--enable-split], - [enable split support]), - [], [enable_split='no']) -AC_MSG_RESULT([$enable_split]) -AS_IF([test "x$enable_split" != xno], - [AC_DEFINE(HAVE_SPLIT_SUPPORT, 1, [enable split support])]) -]) # LC_CONFIG_SPLIT - -# # LC_CONFIG_NODEMAP_PROC_DEBUG # # enable nodemap proc file debugging diff --git a/lustre/include/lustre_mdc.h b/lustre/include/lustre_mdc.h index c99ab17..36bdaaf 100644 --- a/lustre/include/lustre_mdc.h +++ b/lustre/include/lustre_mdc.h @@ -193,10 +193,6 @@ static inline void mdc_update_max_ea_from_body(struct obd_export *exp, /* mdc/mdc_locks.c */ int it_open_error(int phase, struct lookup_intent *it); -#ifdef HAVE_SPLIT_SUPPORT -int mdc_sendpage(struct obd_export *exp, const struct lu_fid *fid, - const struct page *page, int offset); -#endif static inline bool cl_is_lov_delay_create(unsigned int flags) { diff --git a/lustre/include/lustre_req_layout.h b/lustre/include/lustre_req_layout.h index 6ec880b..69ee5af 100644 --- a/lustre/include/lustre_req_layout.h +++ b/lustre/include/lustre_req_layout.h @@ -171,7 +171,6 @@ extern struct req_format RQF_MDS_CONNECT; extern struct req_format RQF_MDS_DISCONNECT; extern struct req_format RQF_MDS_GET_INFO; extern struct req_format RQF_MDS_READPAGE; -extern struct req_format RQF_MDS_WRITEPAGE; extern struct req_format RQF_MDS_DONE_WRITING; extern struct req_format RQF_MDS_REINT; extern struct req_format RQF_MDS_REINT_CREATE; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index d655f9c..1cea3a5 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -1024,52 +1024,6 @@ static int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data, RETURN(rc); } -#ifdef HAVE_SPLIT_SUPPORT -int mdc_sendpage(struct obd_export *exp, const struct lu_fid *fid, - const struct page *page, int offset) -{ - struct ptlrpc_request *req; - struct ptlrpc_bulk_desc *desc; - int rc; - ENTRY; - - req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_WRITEPAGE); - if (req == NULL) - RETURN(-ENOMEM); - - /* FIXME: capa doesn't support split yet */ - mdc_set_capa_size(req, &RMF_CAPA1, NULL); - - rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_WRITEPAGE); - if (rc) { - ptlrpc_request_free(req); - RETURN(rc); - } - - req->rq_request_portal = MDS_READPAGE_PORTAL; - ptlrpc_at_set_req_timeout(req); - - desc = ptlrpc_prep_bulk_imp(req, 1, 1,BULK_GET_SOURCE, MDS_BULK_PORTAL); - if (desc == NULL) - GOTO(out, rc = -ENOMEM); - - /* NB req now owns desc and will free it when it gets freed. */ - ptlrpc_prep_bulk_page(desc, (struct page *)page, 0, offset); - mdc_readdir_pack(req, 0, offset, fid, NULL); - - ptlrpc_request_set_replen(req); - rc = ptlrpc_queue_wait(req); - if (rc) - GOTO(out, rc); - - rc = sptlrpc_cli_unwrap_bulk_write(req, req->rq_bulk); -out: - ptlrpc_req_finished(req); - return rc; -} -EXPORT_SYMBOL(mdc_sendpage); -#endif - static int mdc_getpage(struct obd_export *exp, const struct lu_fid *fid, __u64 offset, struct obd_capa *oc, struct page **pages, int npages, diff --git a/lustre/ptlrpc/layout.c b/lustre/ptlrpc/layout.c index 4a37c28..e11c9fe 100644 --- a/lustre/ptlrpc/layout.c +++ b/lustre/ptlrpc/layout.c @@ -722,7 +722,6 @@ static struct req_format *req_formats[] = { &RQF_MDS_CLOSE, &RQF_MDS_RELEASE_CLOSE, &RQF_MDS_READPAGE, - &RQF_MDS_WRITEPAGE, &RQF_MDS_DONE_WRITING, &RQF_MDS_REINT, &RQF_MDS_REINT_CREATE, @@ -1550,12 +1549,6 @@ struct req_format RQF_MDS_SWAP_LAYOUTS = mdt_swap_layouts, empty); EXPORT_SYMBOL(RQF_MDS_SWAP_LAYOUTS); -/* This is for split */ -struct req_format RQF_MDS_WRITEPAGE = - DEFINE_REQ_FMT0("MDS_WRITEPAGE", - mdt_body_capa, mdt_body_only); -EXPORT_SYMBOL(RQF_MDS_WRITEPAGE); - struct req_format RQF_LLOG_ORIGIN_HANDLE_CREATE = DEFINE_REQ_FMT0("LLOG_ORIGIN_HANDLE_CREATE", llog_origin_handle_create_client, llogd_body_only); -- 1.8.3.1