From c8bd0729bc39e57f69892355da92506025921f7e Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 21 Apr 2006 20:36:53 +0000 Subject: [PATCH] make fld really stand-alone service independent from mdt --- lustre/fld/fld_internal.h | 4 +- lustre/fld/fld_seq.c | 186 ++++++++++++++++++++++++++++++---------- lustre/mdc/mdc_request.c | 14 +-- lustre/ptlrpc/lproc_ptlrpc.c | 5 +- lustre/ptlrpc/pack_generic.c | 65 +++++++------- lustre/ptlrpc/ptlrpc_internal.h | 12 ++- 6 files changed, 196 insertions(+), 90 deletions(-) diff --git a/lustre/fld/fld_internal.h b/lustre/fld/fld_internal.h index 2b386ef..fa31006 100644 --- a/lustre/fld/fld_internal.h +++ b/lustre/fld/fld_internal.h @@ -1,7 +1,7 @@ /* -*- MODE: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- * vim:expandtab:shiftwidth=8:tabstop=8: * - * fld/fld.c + * fld/fld.c * * Copyright (C) 2006 Cluster File Systems, Inc. * @@ -53,4 +53,6 @@ enum fld_op { FLD_GET = 2 }; +#define FLD_SERVICE_WATCHDOG_TIMEOUT (obd_timeout * 1000) + #endif diff --git a/lustre/fld/fld_seq.c b/lustre/fld/fld_seq.c index 301d750..ee1e23a 100644 --- a/lustre/fld/fld_seq.c +++ b/lustre/fld/fld_seq.c @@ -1,7 +1,7 @@ /* -*- MODE: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- * vim:expandtab:shiftwidth=8:tabstop=8: * - * fld/fld.c + * fld/fld.c * * Copyright (C) 2006 Cluster File Systems, Inc. * Author: WangDi @@ -40,25 +40,28 @@ #include #include #include "fld_internal.h" - + +static int fld_handle(struct lu_context *ctx, + struct fld *fld, __u32 opts, struct md_fld *mf); + /*XXX maybe these 2 items should go to sbi*/ struct fld_cache_info *fld_cache = NULL; static int dht_mdt_hash(__u64 seq) { - return 0; + return 0; } struct obd_export* get_fld_exp(struct obd_export *exp, __u64 seq) { int seq_mds; - + seq_mds = dht_mdt_hash(seq); CDEBUG(D_INFO, "mds number %d\n", seq_mds); - + /*get exp according to lu_seq*/ return exp; } - + enum { FLD_HTABLE_BITS = 8, FLD_HTABLE_SIZE = (1 << FLD_HTABLE_BITS), @@ -71,7 +74,7 @@ static __u32 fld_hash(__u64 lu_seq) } -static int fld_cache_insert(struct fld_cache_info *fld_cache, __u64 lu_seq, +static int fld_cache_insert(struct fld_cache_info *fld_cache, __u64 lu_seq, __u64 mds_num) { struct fld_cache *fld; @@ -89,9 +92,9 @@ static int fld_cache_insert(struct fld_cache_info *fld_cache, __u64 lu_seq, INIT_HLIST_NODE(&fld->fld_list); fld->fld_mds = mds_num; - fld->fld_seq = lu_seq; + fld->fld_seq = lu_seq; - spin_lock(&fld_cache->fld_lock); + spin_lock(&fld_cache->fld_lock); hlist_for_each_entry(fld, scan, bucket, fld_list) { if (fld->fld_seq == lu_seq) { spin_unlock(&fld_cache->fld_lock); @@ -101,12 +104,12 @@ static int fld_cache_insert(struct fld_cache_info *fld_cache, __u64 lu_seq, hlist_add_head(&fld->fld_list, bucket); spin_unlock(&fld_cache->fld_lock); exit: - if (rc != 0) + if (rc != 0) OBD_FREE(fld, sizeof(*fld)); RETURN(rc); } -static struct fld_cache* +static struct fld_cache* fld_cache_lookup(struct fld_cache_info *fld_cache, __u64 lu_seq) { struct hlist_head *bucket; @@ -116,8 +119,8 @@ fld_cache_lookup(struct fld_cache_info *fld_cache, __u64 lu_seq) bucket = fld_cache->fld_hash + (fld_hash(lu_seq) & fld_cache->fld_hash_mask); - - spin_lock(&fld_cache->fld_lock); + + spin_lock(&fld_cache->fld_lock); hlist_for_each_entry(fld, scan, bucket, fld_list) { if (fld->fld_seq == lu_seq) { spin_unlock(&fld_cache->fld_lock); @@ -138,8 +141,8 @@ static void fld_cache_delete(struct fld_cache_info *fld_cache, __u64 lu_seq) bucket = fld_cache->fld_hash + (fld_hash(lu_seq) & fld_cache->fld_hash_mask); - - spin_lock(&fld_cache->fld_lock); + + spin_lock(&fld_cache->fld_lock); hlist_for_each_entry(fld, scan, bucket, fld_list) { if (fld->fld_seq == lu_seq) { hlist_del_init(&fld->fld_list); @@ -155,7 +158,7 @@ static void fld_cache_delete(struct fld_cache_info *fld_cache, __u64 lu_seq) int fld_create(struct obd_export *exp, __u64 seq, __u64 mds_num) { struct obd_export *fld_exp; - struct md_fld md_fld; + struct md_fld md_fld; __u32 rc; ENTRY; @@ -175,9 +178,9 @@ int fld_create(struct obd_export *exp, __u64 seq, __u64 mds_num) int fld_delete(struct obd_export *exp, __u64 seq, __u64 mds_num) { struct obd_export *fld_exp; - struct md_fld md_fld; + struct md_fld md_fld; __u32 rc; - + fld_cache_delete(fld_cache, seq); fld_exp = get_fld_exp(exp, seq); @@ -195,28 +198,28 @@ int fld_delete(struct obd_export *exp, __u64 seq, __u64 mds_num) int fld_get(struct obd_export *exp, __u64 lu_seq, __u64 *mds_num) { struct obd_export *fld_exp; - struct md_fld md_fld; + struct md_fld md_fld; int vallen, rc; - + fld_exp = get_fld_exp(exp, lu_seq); if (!fld_exp); RETURN(-EINVAL); md_fld.mf_seq = lu_seq; - + vallen = sizeof(struct md_fld); - + rc = mdc_fld(fld_exp, &md_fld, FLD_GET); - + *mds_num = md_fld.mf_mds; - + RETURN(rc); } /*lookup fid in the namespace of pfid according to the name*/ int fld_lookup(struct obd_export *exp, __u64 lu_seq, __u64 *mds_num) { - struct fld_cache *fld; + struct fld_cache *fld; int rc; ENTRY; @@ -226,13 +229,13 @@ int fld_lookup(struct obd_export *exp, __u64 lu_seq, __u64 *mds_num) *mds_num = fld->fld_mds; RETURN(0); } - /*can not find it in the cache*/ + /*can not find it in the cache*/ rc = fld_get(exp, lu_seq, mds_num); if (rc) - RETURN(rc); - + RETURN(rc); + rc = fld_cache_insert(fld_cache, lu_seq, *mds_num); - + RETURN(rc); } @@ -242,14 +245,14 @@ static int fld_init(void) OBD_ALLOC_PTR(fld_cache); if (fld_cache == NULL) - RETURN(-ENOMEM); - + RETURN(-ENOMEM); + /*init fld cache info*/ fld_cache->fld_hash_mask = FLD_HTABLE_MASK; - OBD_ALLOC(fld_cache->fld_hash, FLD_HTABLE_SIZE * + OBD_ALLOC(fld_cache->fld_hash, FLD_HTABLE_SIZE * sizeof fld_cache->fld_hash[0]); spin_lock_init(&fld_cache->fld_lock); - + RETURN(0); } @@ -260,7 +263,7 @@ static int fld_fini(void) sizeof fld_cache->fld_hash[0]); OBD_FREE_PTR(fld_cache); } - return 0; + return 0; } static int __init fld_mod_init(void) @@ -278,19 +281,107 @@ static void __exit fld_mod_exit(void) struct fld_list fld_list_head; +static int fld_req_handle0(struct lu_context *ctx, + struct fld *fld, struct ptlrpc_request *req) +{ + struct md_fld *in; + struct md_fld *out; + int size = sizeof *in; + int rc; + __u32 *opt; + + ENTRY; + + rc = lustre_pack_reply(req, 1, &size, NULL); + if (rc) + RETURN(rc); + + rc = -EPROTO; + opt = lustre_swab_reqbuf(req, 0, sizeof *opt, lustre_swab_generic_32s); + if (opt != NULL) { + in = lustre_swab_reqbuf(req, 1, sizeof *in, lustre_swab_md_fld); + if (in != NULL) { + out = lustre_msg_buf(req->rq_repmsg, 0, size); + LASSERT(out != NULL); + *out = *in; + + rc = fld_handle(ctx, fld, *opt, out); + } else + CERROR("Cannot unpack mf\n"); + } else + CERROR("Cannot unpack option\n"); + RETURN(rc); +} + + +static int fld_req_handle(struct ptlrpc_request *req) +{ + int result; + struct lu_context *ctx; + struct lu_site *site; + + ENTRY; + + ctx = req->rq_svc_thread->t_ctx; + LASSERT(ctx != NULL); + LASSERT(ctx->lc_thread == req->rq_svc_thread); + result = -EPROTO; + if (req->rq_reqmsg->opc == FLD_QUERY) { + if (req->rq_export != NULL) { + site = req->rq_export->exp_obd->obd_lu_dev->ld_site; + LASSERT(site != NULL); + result = fld_req_handle0(ctx, site->ls_fld, req); + } else + CERROR("Unconnected request\n"); + } else + CERROR("Wrong opcode: %d\n", req->rq_reqmsg->opc); + + RETURN(result); +} + int fld_server_init(struct fld *fld, struct dt_device *dt) { + int result; + struct ptlrpc_service_conf fld_conf = { + .psc_nbufs = MDS_NBUFS, + .psc_bufsize = MDS_BUFSIZE, + .psc_max_req_size = MDS_MAXREQSIZE, + .psc_max_reply_size = MDS_MAXREPSIZE, + .psc_req_portal = MDS_FLD_PORTAL, + .psc_rep_portal = MDC_REPLY_PORTAL, + .psc_watchdog_timeout = FLD_SERVICE_WATCHDOG_TIMEOUT, + .psc_num_threads = FLD_NUM_THREADS + }; + fld->fld_dt = dt; + lu_device_get(&dt->dd_lu_dev); INIT_LIST_HEAD(&fld_list_head.fld_list); spin_lock_init(&fld_list_head.fld_lock); - return 0; + + fld->fld_service = + ptlrpc_init_svc_conf(&fld_conf, fld_req_handle, + LUSTRE_FLD0_NAME, + fld->fld_proc_entry, NULL); + if (fld->fld_service != NULL) + result = ptlrpc_start_threads(NULL, fld->fld_service, + LUSTRE_FLD0_NAME); + else + result = -ENOMEM; + if (result != 0) + fld_server_fini(fld); + return result; } EXPORT_SYMBOL(fld_server_init); void fld_server_fini(struct fld *fld) { struct list_head *pos, *n; - + + if (fld->fld_service != NULL) { + ptlrpc_unregister_service(fld->fld_service); + fld->fld_service = NULL; + } + spin_lock(&fld_list_head.fld_lock); list_for_each_safe(pos, n, &fld_list_head.fld_list) { struct fld_item *fld = list_entry(pos, struct fld_item, @@ -298,18 +389,20 @@ void fld_server_fini(struct fld *fld) list_del_init(&fld->fld_list); OBD_FREE_PTR(fld); } - spin_unlock(&fld_list_head.fld_lock); + spin_unlock(&fld_list_head.fld_lock); + lu_device_put(&fld->fld_dt->dd_lu_dev); + fld->fld_dt = NULL; } EXPORT_SYMBOL(fld_server_fini); static int fld_handle_create(struct fld *pfld, __u64 seq_num, __u64 mds_num) { struct fld_item *fld; - + OBD_ALLOC_PTR(fld); fld->fld_seq = seq_num; fld->fld_mds = mds_num; - INIT_LIST_HEAD(&fld->fld_list); + INIT_LIST_HEAD(&fld->fld_list); spin_lock(&fld_list_head.fld_lock); list_add_tail(&fld_list_head.fld_list, &fld->fld_list); spin_unlock(&fld_list_head.fld_lock); @@ -338,7 +431,7 @@ static int fld_handle_delete(struct fld *pfld, __u64 seq_num, __u64 mds_num) static int fld_handle_get(struct fld *pfld, __u64 seq_num, __u64 *mds_num) { struct list_head *pos, *n; - + spin_lock(&fld_list_head.fld_lock); list_for_each_safe(pos, n, &fld_list_head.fld_list) { struct fld_item *fld = list_entry(pos, struct fld_item, @@ -353,30 +446,29 @@ static int fld_handle_get(struct fld *pfld, __u64 seq_num, __u64 *mds_num) return -ENOENT; } -int fld_handle(struct fld *fld, __u32 opts, void *mf) +static int fld_handle(struct lu_context *ctx, + struct fld *fld, __u32 opts, struct md_fld *mf) { - struct md_fld *pmf = mf; int rc; ENTRY; switch (opts) { case FLD_CREATE: - rc = fld_handle_create(fld, pmf->mf_seq, pmf->mf_mds); + rc = fld_handle_create(fld, mf->mf_seq, mf->mf_mds); break; case FLD_DELETE: - rc = fld_handle_delete(fld, pmf->mf_seq, pmf->mf_mds); + rc = fld_handle_delete(fld, mf->mf_seq, mf->mf_mds); break; case FLD_GET: - rc = fld_handle_get(fld, pmf->mf_seq, &pmf->mf_mds); + rc = fld_handle_get(fld, mf->mf_seq, &mf->mf_mds); break; default: rc = -EINVAL; - break; + break; } RETURN(rc); } -EXPORT_SYMBOL(fld_handle); MODULE_AUTHOR("Cluster File Systems, Inc. "); MODULE_DESCRIPTION("Lustre fld Prototype"); diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index d76dcce..cbf222e 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -516,7 +516,7 @@ int mdc_set_open_replay_data(struct obd_export *exp, struct mdt_body *body = lustre_msg_buf(open_req->rq_repmsg, 1, sizeof(*body)); ENTRY; - + LASSERT(body != NULL); /* incoming message in my byte order (it's been swabbed) */ LASSERT(rec != NULL); @@ -869,22 +869,22 @@ int mdc_fld(struct obd_export *exp, struct md_fld *mf, __u32 fld_op) int size[2] = {sizeof(op), mf_size}, rc; ENTRY; - req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, - MDS_FLD, 2, size, NULL); + req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, + FLD_QUERY, 2, size, NULL); if (req == NULL) RETURN(-ENOMEM); - + op = lustre_msg_buf(req->rq_reqmsg, 0, sizeof (*op)); *op = fld_op; pmf = lustre_msg_buf(req->rq_reqmsg, 1, sizeof (*pmf)); memcpy(pmf, mf, sizeof(*mf)); - + req->rq_replen = lustre_msg_size(1, &mf_size); rc = ptlrpc_queue_wait(req); if (rc) GOTO(out_req, rc); - + pmf = lustre_swab_repbuf(req, 0, sizeof(*pmf), lustre_swab_md_fld); out_req: ptlrpc_req_finished(req); @@ -1145,7 +1145,7 @@ static int mdc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) ENTRY; switch (stage) { - case OBD_CLEANUP_EARLY: + case OBD_CLEANUP_EARLY: case OBD_CLEANUP_EXPORTS: break; case OBD_CLEANUP_SELF_EXP: diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c index e4a539d..a2eec28 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -76,7 +76,6 @@ struct ll_rpc_opcode { { MDS_QUOTACTL, "mds_quotactl" }, { MDS_GETXATTR, "mds_getxattr" }, { MDS_SETXATTR, "mds_setxattr" }, - { MDS_FLD, "mds_fld" }, { LDLM_ENQUEUE, "ldlm_enqueue" }, { LDLM_CONVERT, "ldlm_convert" }, { LDLM_CANCEL, "ldlm_cancel" }, @@ -84,7 +83,9 @@ struct ll_rpc_opcode { { LDLM_CP_CALLBACK, "ldlm_cp_callback" }, { LDLM_GL_CALLBACK, "ldlm_gl_callback" }, { OBD_PING, "obd_ping" }, - { OBD_LOG_CANCEL, "llog_origin_handle_cancel"}, + { OBD_LOG_CANCEL, "llog_origin_handle_cancel" }, + { OBD_QC_CALLBACK, "obd_qc_callback" }, + { FLD_QUERY, "fld_query" } }; const char* ll_opcode2str(__u32 opcode) diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 5070106..08a6dcb 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -1206,7 +1206,7 @@ void lustre_assert_wire_constants(void) (long long)MDS_QUOTACHECK); LASSERTF(MDS_QUOTACTL == 48, " found %lld\n", (long long)MDS_QUOTACTL); - LASSERTF(MDS_LAST_OPC == 52, " found %lld\n", + LASSERTF(MDS_LAST_OPC == 51, " found %lld\n", (long long)MDS_LAST_OPC); LASSERTF(REINT_SETATTR == 1, " found %lld\n", (long long)REINT_SETATTR); @@ -1467,36 +1467,36 @@ void lustre_assert_wire_constants(void) (long long)(int)sizeof(((struct obdo *)0)->o_inline)); LASSERTF(OBD_INLINESZ == 80, " found %lld\n", (long long)OBD_INLINESZ); - CLASSERT(OBD_MD_FLID == (0x00000001ULL)); - CLASSERT(OBD_MD_FLATIME == (0x00000002ULL)); - CLASSERT(OBD_MD_FLMTIME == (0x00000004ULL)); - CLASSERT(OBD_MD_FLCTIME == (0x00000008ULL)); - CLASSERT(OBD_MD_FLSIZE == (0x00000010ULL)); - CLASSERT(OBD_MD_FLBLOCKS == (0x00000020ULL)); - CLASSERT(OBD_MD_FLBLKSZ == (0x00000040ULL)); - CLASSERT(OBD_MD_FLMODE == (0x00000080ULL)); - CLASSERT(OBD_MD_FLTYPE == (0x00000100ULL)); - CLASSERT(OBD_MD_FLUID == (0x00000200ULL)); - CLASSERT(OBD_MD_FLGID == (0x00000400ULL)); - CLASSERT(OBD_MD_FLFLAGS == (0x00000800ULL)); - CLASSERT(OBD_MD_FLNLINK == (0x00002000ULL)); - CLASSERT(OBD_MD_FLGENER == (0x00004000ULL)); - CLASSERT(OBD_MD_FLINLINE == (0x00008000ULL)); - CLASSERT(OBD_MD_FLRDEV == (0x00010000ULL)); - CLASSERT(OBD_MD_FLEASIZE == (0x00020000ULL)); - CLASSERT(OBD_MD_LINKNAME == (0x00040000ULL)); - CLASSERT(OBD_MD_FLHANDLE == (0x00080000ULL)); - CLASSERT(OBD_MD_FLCKSUM == (0x00100000ULL)); - CLASSERT(OBD_MD_FLQOS == (0x00200000ULL)); - CLASSERT(OBD_MD_FLCOOKIE == (0x00800000ULL)); - CLASSERT(OBD_MD_FLGROUP == (0x01000000ULL)); - CLASSERT(OBD_MD_FLFID == (0x02000000ULL)); - CLASSERT(OBD_MD_FLEPOCH == (0x04000000ULL)); - CLASSERT(OBD_MD_FLGRANT == (0x08000000ULL)); - CLASSERT(OBD_MD_FLDIREA == (0x10000000ULL)); - CLASSERT(OBD_MD_FLUSRQUOTA == (0x20000000ULL)); - CLASSERT(OBD_MD_FLGRPQUOTA == (0x40000000ULL)); - CLASSERT(OBD_MD_FLMODEASIZE == (0x80000000ULL)); + CLASSERT(OBD_MD_FLID == (0x0000000000000001ULL)); + CLASSERT(OBD_MD_FLATIME == (0x0000000000000002ULL)); + CLASSERT(OBD_MD_FLMTIME == (0x0000000000000004ULL)); + CLASSERT(OBD_MD_FLCTIME == (0x0000000000000008ULL)); + CLASSERT(OBD_MD_FLSIZE == (0x0000000000000010ULL)); + CLASSERT(OBD_MD_FLBLOCKS == (0x0000000000000020ULL)); + CLASSERT(OBD_MD_FLBLKSZ == (0x0000000000000040ULL)); + CLASSERT(OBD_MD_FLMODE == (0x0000000000000080ULL)); + CLASSERT(OBD_MD_FLTYPE == (0x0000000000000100ULL)); + CLASSERT(OBD_MD_FLUID == (0x0000000000000200ULL)); + CLASSERT(OBD_MD_FLGID == (0x0000000000000400ULL)); + CLASSERT(OBD_MD_FLFLAGS == (0x0000000000000800ULL)); + CLASSERT(OBD_MD_FLNLINK == (0x0000000000002000ULL)); + CLASSERT(OBD_MD_FLGENER == (0x0000000000004000ULL)); + CLASSERT(OBD_MD_FLINLINE == (0x0000000000008000ULL)); + CLASSERT(OBD_MD_FLRDEV == (0x0000000000010000ULL)); + CLASSERT(OBD_MD_FLEASIZE == (0x0000000000020000ULL)); + CLASSERT(OBD_MD_LINKNAME == (0x0000000000040000ULL)); + CLASSERT(OBD_MD_FLHANDLE == (0x0000000000080000ULL)); + CLASSERT(OBD_MD_FLCKSUM == (0x0000000000100000ULL)); + CLASSERT(OBD_MD_FLQOS == (0x0000000000200000ULL)); + CLASSERT(OBD_MD_FLCOOKIE == (0x0000000000800000ULL)); + CLASSERT(OBD_MD_FLGROUP == (0x0000000001000000ULL)); + CLASSERT(OBD_MD_FLFID == (0x0000000002000000ULL)); + CLASSERT(OBD_MD_FLEPOCH == (0x0000000004000000ULL)); + CLASSERT(OBD_MD_FLGRANT == (0x0000000008000000ULL)); + CLASSERT(OBD_MD_FLDIREA == (0x0000000010000000ULL)); + CLASSERT(OBD_MD_FLUSRQUOTA == (0x0000000020000000ULL)); + CLASSERT(OBD_MD_FLGRPQUOTA == (0x0000000040000000ULL)); + CLASSERT(OBD_MD_FLMODEASIZE == (0x0000000080000000ULL)); CLASSERT(OBD_MD_MDS == (0x0000000100000000ULL)); CLASSERT(OBD_MD_REINT == (0x0000000200000000ULL)); CLASSERT(OBD_MD_FLXATTR == (0x0000001000000000ULL)); @@ -2895,3 +2895,6 @@ void lustre_assert_wire_constants(void) } + + + diff --git a/lustre/ptlrpc/ptlrpc_internal.h b/lustre/ptlrpc/ptlrpc_internal.h index d4eb69b..9ff8e2b 100644 --- a/lustre/ptlrpc/ptlrpc_internal.h +++ b/lustre/ptlrpc/ptlrpc_internal.h @@ -81,6 +81,13 @@ static inline int opcode_offset(__u32 opc) { (LDLM_LAST_OPC - LDLM_FIRST_OPC) + (MDS_LAST_OPC - MDS_FIRST_OPC) + (OST_LAST_OPC - OST_FIRST_OPC)); + } else if (opc < FLD_LAST_OPC) { + /* FLD opcode */ + return (opc - FLD_FIRST_OPC + + (OBD_LAST_OPC - OBD_FIRST_OPC) + + (LDLM_LAST_OPC - LDLM_FIRST_OPC) + + (MDS_LAST_OPC - MDS_FIRST_OPC) + + (OST_LAST_OPC - OST_FIRST_OPC)); } else { /* Unknown Opcode */ return -1; @@ -90,7 +97,8 @@ static inline int opcode_offset(__u32 opc) { #define LUSTRE_MAX_OPCODES ((LDLM_LAST_OPC - LDLM_FIRST_OPC) + \ (MDS_LAST_OPC - MDS_FIRST_OPC) + \ (OST_LAST_OPC - OST_FIRST_OPC) + \ - (OBD_LAST_OPC - OBD_FIRST_OPC)) + (OBD_LAST_OPC - OBD_FIRST_OPC) + \ + (FLD_LAST_OPC - FLD_FIRST_OPC)) enum { PTLRPC_REQWAIT_CNTR = 0, @@ -104,7 +112,7 @@ int ptlrpc_expire_one_request(struct ptlrpc_request *req); /* pers.c */ void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc); -void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, struct page *page, +void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, struct page *page, int pageoffset, int len); void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc); -- 1.8.3.1