From c634f911095949d37d7f96a61504980b5e2a03e2 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 31 Aug 2005 08:59:46 +0000 Subject: [PATCH] Land b_release_1_4_5 onto b1_4 (20050830_1747) --- lustre/autoconf/lustre-version.ac | 2 +- lustre/include/linux/lustre_dlm.h | 10 +++++----- lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch | 2 +- lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch | 2 +- lustre/mds/handler.c | 4 ++-- lustre/mds/lproc_mds.c | 8 ++++---- lustre/mds/mds_fs.c | 3 ++- lustre/mds/mds_internal.h | 2 +- lustre/mds/mds_unlink_open.c | 5 ++++- lustre/obdclass/genops.c | 4 ++-- lustre/obdfilter/filter.c | 4 ++-- lustre/ost/ost_handler.c | 9 +++++---- lustre/ptlrpc/client.c | 2 +- lustre/ptlrpc/events.c | 8 ++++---- lustre/tests/replay-dual.sh | 5 ++++- lustre/tests/replay-single.sh | 6 +++--- lustre/tests/test-framework.sh | 8 ++++---- 17 files changed, 46 insertions(+), 38 deletions(-) diff --git a/lustre/autoconf/lustre-version.ac b/lustre/autoconf/lustre-version.ac index 1bdd117..37704bb 100644 --- a/lustre/autoconf/lustre-version.ac +++ b/lustre/autoconf/lustre-version.ac @@ -1 +1 @@ -m4_define([LUSTRE_VERSION],[1.4.4.5]) +m4_define([LUSTRE_VERSION],[1.4.5]) diff --git a/lustre/include/linux/lustre_dlm.h b/lustre/include/linux/lustre_dlm.h index f9a2369..5fb0019 100644 --- a/lustre/include/linux/lustre_dlm.h +++ b/lustre/include/linux/lustre_dlm.h @@ -75,11 +75,6 @@ typedef enum { #define LDLM_FL_BLOCK_NOWAIT 0x040000 // server told not to wait if blocked #define LDLM_FL_TEST_LOCK 0x080000 // return blocking lock -/* These are flags that are mapped into the flags and ASTs of blocking locks */ -#define LDLM_AST_DISCARD_DATA 0x80000000 /* Add FL_DISCARD to blocking ASTs */ -/* Flags sent in AST lock_flags to be mapped into the receiving lock. */ -#define LDLM_AST_FLAGS (LDLM_FL_DISCARD_DATA) - /* XXX FIXME: This is being added to b_size as a low-risk fix to the fact that * the LVB filling happens _after_ the lock has been granted, so another thread * can match before the LVB has been updated. As a dirty hack, we set @@ -101,6 +96,11 @@ typedef enum { /* Don't drop lock covering mmapped file in LRU */ #define LDLM_FL_NO_LRU 0x400000 +/* These are flags that are mapped into the flags and ASTs of blocking locks */ +#define LDLM_AST_DISCARD_DATA 0x80000000 /* Add FL_DISCARD to blocking ASTs */ +/* Flags sent in AST lock_flags to be mapped into the receiving lock. */ +#define LDLM_AST_FLAGS (LDLM_FL_DISCARD_DATA) + /* The blocking callback is overloaded to perform two functions. These flags * indicate which operation should be performed. */ #define LDLM_CB_BLOCKING 1 diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch index 1aae992..7f95eb3 100644 --- a/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch +++ b/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch @@ -426,7 +426,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/open.c + + newattrs.ia_uid = user; + newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID; ++ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; + newattrs.ia_valid |= ATTR_RAW; + error = op->setattr_raw(inode, &newattrs); + /* the file system wants to use normal vfs path now */ diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch index cfd0db0..8817678 100644 --- a/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch +++ b/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch @@ -401,7 +401,7 @@ Index: linux-2.6.5-12.1/fs/open.c + + newattrs.ia_uid = user; + newattrs.ia_gid = group; -+ newattrs.ia_valid = ATTR_UID | ATTR_GID; ++ newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME; + newattrs.ia_valid |= ATTR_RAW; + error = op->setattr_raw(inode, &newattrs); + /* the file system wants to use normal vfs path now */ diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 8aa7787..dd15b1c 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1692,7 +1692,7 @@ int mds_postrecov(struct obd_device *obd) } /* clean PENDING dir */ - rc = mds_cleanup_orphans(obd); + rc = mds_cleanup_pending(obd); if (rc < 0) { GOTO(out, rc); } else { @@ -2066,7 +2066,7 @@ static int mdt_setup(struct obd_device *obd, obd_count len, void *buf) lprocfs_init_vars(mdt, &lvars); lprocfs_obd_setup(obd, lvars.obd_vars); - + sema_init(&mds->mds_health_sem, 1); mds->mds_service = diff --git a/lustre/mds/lproc_mds.c b/lustre/mds/lproc_mds.c index 6e10da2..1964bc2 100644 --- a/lustre/mds/lproc_mds.c +++ b/lustre/mds/lproc_mds.c @@ -56,16 +56,16 @@ static int lprocfs_mds_wr_evict_client(struct file *file, const char *buffer, sscanf(buffer, "%40s", tmpbuf); - if (strncmp(tmpbuf, "nid:", 4) != 0) { + if (strncmp(tmpbuf, "nid:", 4) != 0) return lprocfs_wr_evict_client(file, buffer, count, data); - } obd_export_evict_by_nid(obd, tmpbuf+4); rc = obd_set_info(mds->mds_osc_exp, strlen("evict_by_nid"), - "evict_by_nid", strlen(tmpbuf+4) + 1, tmpbuf+4); + "evict_by_nid", strlen(tmpbuf + 4) + 1, tmpbuf + 4); if (rc) - CERROR("Failed to evict nid %s from OSTs\n", tmpbuf+4); + CERROR("Failed to evict nid %s from OSTs: rc %d\n", tmpbuf + 4, + rc); return count; } diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c index 166e6d2..9ca7e5e 100644 --- a/lustre/mds/mds_fs.c +++ b/lustre/mds/mds_fs.c @@ -48,7 +48,8 @@ #include "mds_internal.h" -/* This limit is arbitrary, but for now we fit it in 1 page (32k clients) */ +/* This limit is arbitrary (32k clients on x86), but it is convenient to use + * 2^n * PAGE_SIZE * 8 for the number of bits that fit an order-n allocation. */ #define MDS_MAX_CLIENTS (PAGE_SIZE * 8) #define LAST_RCVD "last_rcvd" diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h index 4ebc93a..1f564f3 100644 --- a/lustre/mds/mds_internal.h +++ b/lustre/mds/mds_internal.h @@ -130,7 +130,7 @@ int mds_init_ucred(struct lvfs_ucred *ucred, struct ptlrpc_request *req, void mds_exit_ucred(struct lvfs_ucred *ucred, struct mds_obd *obd); /* mds/mds_unlink_open.c */ -int mds_cleanup_orphans(struct obd_device *obd); +int mds_cleanup_pending(struct obd_device *obd); /* mds/mds_log.c */ diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index 2224044..6db4c52 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -161,7 +161,10 @@ out_free_lmm: RETURN(rc); } -int mds_cleanup_orphans(struct obd_device *obd) +/* Delete inodes which were previously open-unlinked but were not reopened + * during MDS recovery for whatever reason (e.g. client also failed, recovery + * aborted, etc). */ +int mds_cleanup_pending(struct obd_device *obd) { struct mds_obd *mds = &obd->u.mds; struct lvfs_run_ctxt saved; diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index a77c595e..6d647fc 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -1291,8 +1291,8 @@ search_again: if (doomed_exp == NULL) { goto out; } else { - CERROR("evicting %s at adminstrative request\n", - doomed_exp->exp_client_uuid.uuid); + CERROR("evicting nid %s (%s) at adminstrative request\n", + nid, doomed_exp->exp_client_uuid.uuid); class_fail_export(doomed_exp); class_export_put(doomed_exp); exports_evicted++; diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 3781811..eef99fc 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -302,7 +302,7 @@ static int filter_free_server_data(struct filter_obd *filter) { OBD_FREE(filter->fo_fsd, sizeof(*filter->fo_fsd)); filter->fo_fsd = NULL; - OBD_FREE(filter->fo_last_rcvd_slots, FILTER_LR_MAX_CLIENTS/8); + OBD_FREE(filter->fo_last_rcvd_slots, FILTER_LR_MAX_CLIENTS / 8); filter->fo_last_rcvd_slots = NULL; return 0; } @@ -373,7 +373,7 @@ static int filter_init_server_data(struct obd_device *obd, struct file * filp) RETURN(-ENOMEM); filter->fo_fsd = fsd; - OBD_ALLOC(filter->fo_last_rcvd_slots, FILTER_LR_MAX_CLIENTS/8); + OBD_ALLOC(filter->fo_last_rcvd_slots, FILTER_LR_MAX_CLIENTS / 8); if (filter->fo_last_rcvd_slots == NULL) { OBD_FREE(fsd, sizeof(*fsd)); RETURN(-ENOMEM); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index e081073..cc4ec22 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -917,7 +917,7 @@ out: static int ost_set_info(struct obd_export *exp, struct ptlrpc_request *req) { - char *key, *val; + char *key, *val = NULL; int keylen, vallen, rc = 0; ENTRY; @@ -932,11 +932,12 @@ static int ost_set_info(struct obd_export *exp, struct ptlrpc_request *req) if (rc) RETURN(rc); - val = lustre_msg_buf(req->rq_reqmsg, 1, 1); - vallen = lustre_msg_buflen(req->rq_reqmsg,1); + vallen = lustre_msg_buflen(req->rq_reqmsg, 1); + if (vallen) + val = lustre_msg_buf(req->rq_reqmsg, 1, 0); if (KEY_IS("evict_by_nid")) { - if (val) + if (val && vallen) obd_export_evict_by_nid(exp->exp_obd, val); GOTO(out, rc = 0); diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 7856892..e6f4f42 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -297,7 +297,7 @@ static struct ptlrpc_request *ptlrpc_prep_req_from_pool(struct ptlrpc_request_po request->rq_reqlen = pool->prp_rq_size; return request; } - + struct ptlrpc_request *ptlrpc_prep_req_pool(struct obd_import *imp, int opcode, int count, int *lengths, char **bufs, diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index 2c37488..68ef2c3 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -223,7 +223,7 @@ void request_in_callback(ptl_event_t *ev) #if CRAY_PORTALS req->rq_uid = ev->uid; #endif - + spin_lock_irqsave (&service->srv_lock, flags); req->rq_history_seq = service->srv_request_seq++; @@ -238,8 +238,8 @@ void request_in_callback(ptl_event_t *ev) * start dropping incoming requests until more buffers * get posted. NB don't moan if it's because we're * tearing down the service. */ - CWARN("All %s %s request buffers busy\n", - service->srv_name, srv_ni->sni_ni->pni_name); + CERROR("All %s %s request buffers busy\n", + service->srv_name, srv_ni->sni_ni->pni_name); } /* req takes over the network's ref on rqbd */ } else { @@ -258,7 +258,7 @@ void request_in_callback(ptl_event_t *ev) EXIT; } -/* +/* * Server's outgoing reply callback */ void reply_out_callback(ptl_event_t *ev) diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 0817fbc..b4662c5 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -2,6 +2,9 @@ set -e +# bug 6088 +ALWAYS_EXCEPT="8" + LUSTRE=${LUSTRE:-`dirname $0`/..} . $LUSTRE/tests/test-framework.sh @@ -243,7 +246,7 @@ test_12() { MULTIPID=$! sleep 5 - # drop first enqueue +#define OBD_FAIL_LDLM_ENQUEUE 0x302 sysctl -w lustre.fail_loc=0x80000302 facet_failover mds df $MOUNT || return 1 diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 0b85a69..14d3fea 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -14,8 +14,8 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/local.sh} # Skip these tests -# bug number: 2766 -ALWAYS_EXCEPT="0b" +# bug number: 2766 4176 +ALWAYS_EXCEPT="0b 39" gen_config() { rm -f $XMLCONFIG @@ -756,7 +756,7 @@ test_38() { } run_test 38 "test recovery from unlink llog (test llog_gen_rec) " -test_39() { +test_39() { # bug 4176 createmany -o $DIR/$tfile-%d 800 replay_barrier mds unlinkmany $DIR/$tfile-%d 0 400 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 771ce4d..7631827 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -182,8 +182,8 @@ replay_barrier() { df $MOUNT do_facet $facet $LCTL --device %${facet}_svc readonly do_facet $facet $LCTL --device %${facet}_svc notransno - do_facet $facet $LCTL mark "REPLAY BARRIER" - $LCTL mark "REPLAY BARRIER" + do_facet $facet $LCTL mark "$facet REPLAY BARRIER" + $LCTL mark "local REPLAY BARRIER" } replay_barrier_nodf() { @@ -191,8 +191,8 @@ replay_barrier_nodf() { do_facet $facet sync do_facet $facet $LCTL --device %${facet}_svc readonly do_facet $facet $LCTL --device %${facet}_svc notransno - do_facet $facet $LCTL mark "REPLAY BARRIER" - $LCTL mark "REPLAY BARRIER" + do_facet $facet $LCTL mark "$facet REPLAY BARRIER" + $LCTL mark "local REPLAY BARRIER" } mds_evict_client() { -- 1.8.3.1