On Thu, May 19, 2011 at 11:51:49AM -0400, Aaron Everett wrote:
> I'm getting a build error:
> make[5]: Entering directory `/usr/src/kernels/2.6.18-238.9.1.el5-x86_64'
> /usr/src/redhat/BUILD/lustre-1.8.5/lustre/mdc/mdc_lib.c:828: error:
> conflicting types for 'mdc_getattr_pack'
> /usr/src/redhat/BUILD/lustre-1.8.5/lustre/mdc/mdc_internal.h:56: error:
> previous declaration of 'mdc_getattr_pack' was here
Weird, the patch does not modify mdc_getattr_pack() at all.
It applies cleanly to 1.8.5 for me and i can successfully build it.
How did you pick up the patch? Have you made any changes to mdc_getattr_pack()?
Please find attached the patch I used (extracted from git).
> 55 void mdc_getattr_pack(struct ptlrpc_request *req, int offset, __u64
> valid,
> 56 int flags, struct mdc_op_data *data);
>
> mdc_lib.c (patched version downloaded from link above):
> 828 {
> 829 if (mdc_req_is_2_0_server(req))
> 830 mdc_getattr_pack_20(req, offset, valid, flags, data,
> ea_size);
The patch from bugzilla ticket 24048 added a new argument to
mdc_getattr_pack(), but that's not the patch i pointed you at.
> 831 else
> 832 mdc_getattr_pack_18(req, offset, valid, flags,
> data);
> 833 }
>
> Upon closer inspection, it appears this patch is for Lustre 1.8.6, while
> we're running 1.8.5.
The patch i attached should really work with 1.8.5.
> Is there a download location for lustre source for
> 1.8.6? I don't see it on lustre.org.
AFAIK, 1.8.6 has not been released yet.
Johann
--
Johann Lombardi
Whamcloud, Inc.
www.whamcloud.com
>From 69219538cf774475344472a0b42795012aa0ec71 Mon Sep 17 00:00:00 2001
From: yangsheng <[email protected]>
Date: Fri, 6 May 2011 23:03:56 +0800
Subject: [PATCH] LU-286 racer: general protection fault.
Fixed previous patch hasn't cleanup appropriate may cause
invalid reference.
Change-Id: Ib9b6375c9a7bc57ee5ad17da514848ce8ca87acd
Signed-off-by: Yang Sheng <[email protected]>
---
lustre/mdc/mdc_lib.c | 7 +++++++
lustre/mdc/mdc_locks.c | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c
index ea93da1..798df45 100644
--- a/lustre/mdc/mdc_lib.c
+++ b/lustre/mdc/mdc_lib.c
@@ -964,6 +964,13 @@ int mdc_enter_request(struct client_obd *cli)
spin_unlock(&cli->cl_loi_list_lock);
rc = l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw),
&lwi);
+ if (rc) {
+ spin_lock(&cli->cl_loi_list_lock);
+ if (list_empty(&mcw.mcw_entry))
+ cli->cl_r_in_flight--;
+ list_del_init(&mcw.mcw_entry);
+ spin_unlock(&cli->cl_loi_list_lock);
+ }
} else {
cli->cl_r_in_flight++;
spin_unlock(&cli->cl_loi_list_lock);
diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c
index e29de48..cdc7fe9 100644
--- a/lustre/mdc/mdc_locks.c
+++ b/lustre/mdc/mdc_locks.c
@@ -642,10 +642,11 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, &policy, &flags,
NULL, 0, NULL, lockh, 0);
mdc_exit_request(&obddev->u.cli);
+ if (rc < 0)
+ CERROR("ldlm_cli_enqueue error: %d\n", rc);
}
mdc_put_rpc_lock(obddev->u.cli.cl_rpc_lock, it);
if (rc < 0) {
- CERROR("ldlm_cli_enqueue: %d\n", rc);
mdc_clear_replay_flag(req, rc);
ptlrpc_req_finished(req);
RETURN(rc);
--
1.7.4.1
_______________________________________________
Lustre-discuss mailing list
[email protected]
http://lists.lustre.org/mailman/listinfo/lustre-discuss