From df7db69b8e3038061851ab91d976d6c2881e0baf Mon Sep 17 00:00:00 2001 From: braam Date: Sun, 3 Mar 2002 03:17:46 +0000 Subject: [PATCH] - minor fixes to get mdc_readpage working over again. --- lustre/include/linux/lustre_net.h | 2 +- lustre/mdc/mdc_request.c | 7 ++----- lustre/osc/osc_request.c | 2 +- lustre/ost/ost_handler.c | 2 +- lustre/ptlrpc/niobuf.c | 7 +++++-- lustre/tests/llmount.sh | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index 6e0a233..6978066 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -199,7 +199,7 @@ typedef int (*svc_handler_t)(struct obd_device *obddev, int ptlrpc_check_bulk_sent(struct ptlrpc_bulk_desc *); int ptlrpc_send_bulk(struct ptlrpc_bulk_desc *, int portal); int ptl_send_buf(struct ptlrpc_request *, struct lustre_peer *, int portal); -int ptlrpc_wait_bulk(struct ptlrpc_bulk_desc *); +int ptlrpc_register_bulk(struct ptlrpc_bulk_desc *); int ptlrpc_reply(struct obd_device *obddev, struct ptlrpc_service *svc, struct ptlrpc_request *req); int ptlrpc_error(struct obd_device *obddev, struct ptlrpc_service *svc, diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 91a7181..66d34cf 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -194,12 +194,9 @@ int mdc_readpage(struct ptlrpc_client *cl, ino_t ino, int type, __u64 offset, bulk->b_buflen = PAGE_SIZE; bulk->b_buf = (void *)(long)niobuf.addr; bulk->b_portal = MDS_BULK_PORTAL; + bulk->b_xid = request->rq_xid; - spin_lock(&cl->cli_lock); - bulk->b_xid = cl->cli_xid++; - spin_unlock(&cl->cli_lock); - - rc = ptlrpc_wait_bulk(bulk); + rc = ptlrpc_register_bulk(bulk); if (rc) { CERROR("%s: couldn't setup bulk sink: error %d.\n", __FUNCTION__, rc); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index f6bd069..92e1b95 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -393,7 +393,7 @@ int osc_brw_read(struct obd_conn *conn, obd_count num_oa, struct obdo **oa, *(__u32 *)ptr2 = bulk[n]->b_xid; ptr2 = (char *)ptr2 + sizeof(__u32); - rc = ptlrpc_wait_bulk(bulk[n]); + rc = ptlrpc_register_bulk(bulk[n]); if (rc) goto out; } diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index ca57958..01e4edb 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -357,7 +357,7 @@ int ost_brw(struct ost_obd *obddev, struct ptlrpc_request *req) bulk_vec[i]->b_buf = (void *)(unsigned long)dst->addr; bulk_vec[i]->b_buflen = PAGE_SIZE; bulk_vec[i]->b_portal = OSC_BULK_PORTAL; - rc = ptlrpc_wait_bulk(bulk_vec[i]); + rc = ptlrpc_register_bulk(bulk_vec[i]); if (rc) goto out; diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index 33a4900..9b1a181 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -154,7 +154,7 @@ int ptlrpc_send_bulk(struct ptlrpc_bulk_desc *bulk, int portal) return rc; } -int ptlrpc_wait_bulk(struct ptlrpc_bulk_desc *bulk) +int ptlrpc_register_bulk(struct ptlrpc_bulk_desc *bulk) { int rc; @@ -186,12 +186,15 @@ int ptlrpc_wait_bulk(struct ptlrpc_bulk_desc *bulk) CDEBUG(D_NET, "Setup bulk sink buffer: %u bytes, xid %u, portal %u\n", bulk->b_buflen, bulk->b_xid, bulk->b_portal); + EXIT; + return 0; cleanup2: + EXIT; PtlMEUnlink(bulk->b_me_h); cleanup1: PtlMDUnlink(bulk->b_md_h); - + EXIT; return rc; } diff --git a/lustre/tests/llmount.sh b/lustre/tests/llmount.sh index b16d19d..7f47f9a 100755 --- a/lustre/tests/llmount.sh +++ b/lustre/tests/llmount.sh @@ -62,4 +62,4 @@ quit EOF mkdir /mnt/obd -# mount -t lustre_light -o device=3 none /mnt/obd +mount -t lustre_light -o device=3 none /mnt/obd -- 1.8.3.1