From: pschwan Date: Thu, 4 Jul 2002 19:58:38 +0000 (+0000) Subject: - Quiet the FIXMEs from CERRORs to CDEBUGs, because they were reducing LLNL X-Git-Tag: v1_7_100~5371 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c2f0e8398d39660a0c0ac02c1fa12faa8b360c5b;p=fs%2Flustre-release.git - Quiet the FIXMEs from CERRORs to CDEBUGs, because they were reducing LLNL consoles to a crawl - more DLM debug infrastructure, mostly preventative. - check for the forgotten ptlrpc_abort() case in reply_in_callback - cleanup the intent-test and runfailure-mds --- diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index bd10e2b..1a63479 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -110,7 +110,7 @@ do { \ #include #include -#define fixme() CERROR("FIXME\n"); +#define fixme() CDEBUG(D_OTHER, "FIXME\n"); static inline void OBD_FAIL_WRITE(int id, kdev_t dev) { diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 694dac5..c94e9e2 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -83,6 +83,7 @@ void ldlm_lock_put(struct ldlm_lock *lock) l_lock(nslock); lock->l_refc--; + LDLM_DEBUG(lock, "after refc--"); if (lock->l_refc < 0) LBUG(); @@ -107,14 +108,13 @@ void ldlm_lock_destroy(struct ldlm_lock *lock) l_lock(&lock->l_resource->lr_namespace->ns_lock); if (!list_empty(&lock->l_children)) { - CERROR("lock %p still has children (%p)!\n", lock, - lock->l_children.next); + LDLM_DEBUG(lock, "still has children (%p)!", + lock->l_children.next); ldlm_lock_dump(lock); LBUG(); } if (lock->l_readers || lock->l_writers) { - CDEBUG(D_INFO, "lock still has references (%d readers, %d " - "writers)\n", lock->l_readers, lock->l_writers); + LDLM_DEBUG(lock, "lock still has references"); ldlm_lock_dump(lock); LBUG(); } @@ -221,7 +221,6 @@ void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh) lockh->cookie = lock->l_random; } - struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *handle) { struct ldlm_lock *lock = NULL; @@ -245,7 +244,7 @@ struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *handle) EXIT; out: l_unlock(&lock->l_resource->lr_namespace->ns_lock); - return lock; + return lock; } diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 4f778df..1bf08d0 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -252,9 +252,9 @@ static int ldlm_handle_callback(struct ptlrpc_request *req) ldlm_grant_lock(lock); /* FIXME: we want any completion function, not just wake_up */ wake_up(&lock->l_waitq); - ldlm_lock_put(lock); lock->l_resource->lr_tmp = NULL; l_unlock(&lock->l_resource->lr_namespace->ns_lock); + ldlm_lock_put(lock); ldlm_run_ast_work(&rpc_list); } diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 487d88e..7f0c58d 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -295,6 +295,7 @@ static int ptlrpc_check_reply(struct ptlrpc_request *req) } out: + CDEBUG(D_NET, "req = %p, rc = %d\n", req, rc); return rc; } diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index 629840c..b2ae37e 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -72,6 +72,12 @@ static int reply_in_callback(ptl_event_t *ev) struct ptlrpc_request *req = ev->mem_desc.user_ptr; ENTRY; + if (req->rq_xid == 0x5a5a5a5a) { + CERROR("Reply received for freed request! Probably a missing " + "ptlrpc_abort()\n"); + LBUG(); + } + if (req->rq_xid != ev->match_bits) { CERROR("Reply packet for wrong request\n"); LBUG(); diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index a4591e8..1b8da1e 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -54,7 +54,7 @@ static int ptlrpc_check_event(struct ptlrpc_service *svc, } if (err != PTL_EQ_EMPTY) { - CDEBUG(D_NET, "BUG: PtlEQGet returned %d\n", rc); + CERROR("BUG: PtlEQGet returned %d\n", rc); LBUG(); } diff --git a/lustre/tests/intent-test.sh b/lustre/tests/intent-test.sh index 232801b..7837b62 100755 --- a/lustre/tests/intent-test.sh +++ b/lustre/tests/intent-test.sh @@ -3,116 +3,110 @@ OST=`../utils/obdctl name2dev OSCDEV` MDS=`../utils/obdctl name2dev MDCDEV` -mkdir /mnt/lustre/foo -mkdir /mnt/lustre/foo2 +remount() { + umount /mnt/lustre || exit -1 + debugctl clear + mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre || exit -1 +} -mkdir /mnt/lustre/foo +# Test mkdir +mkdir /mnt/lustre/dir +mkdir /mnt/lustre/dir2 -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +# Test mkdir on existing directory +mkdir /mnt/lustre/dir -mkdir /mnt/lustre/foo +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +# Test mkdir on existing directory with no locks already held +mkdir /mnt/lustre/dir -./mcreate /mnt/lustre/bar -./mcreate /mnt/lustre/bar +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +# Use mknod to create a file +./mcreate /mnt/lustre/file +# ...on an existing file. +./mcreate /mnt/lustre/file -./mcreate /mnt/lustre/bar +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +# Use mknod to create a file with no locks already held +./mcreate /mnt/lustre/file -ls -l /mnt/lustre/bar +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +ls -l /mnt/lustre/file -cat /mnt/lustre/bar -./mcreate /mnt/lustre/bar2 -cat /mnt/lustre/bar2 -./mcreate /mnt/lustre/bar3 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +cat /mnt/lustre/file +./mcreate /mnt/lustre/file2 +cat /mnt/lustre/file2 +./mcreate /mnt/lustre/file3 -./tchmod 777 /mnt/lustre/bar3 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +./tchmod 777 /mnt/lustre/file3 -./mcreate /mnt/lustre/bar4 -./tchmod 777 /mnt/lustre/bar4 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +./mcreate /mnt/lustre/file4 +./tchmod 777 /mnt/lustre/file4 -ls -l /mnt/lustre/bar4 -./tchmod 777 /mnt/lustre/bar4 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +ls -l /mnt/lustre/file4 +./tchmod 777 /mnt/lustre/file4 -cat /mnt/lustre/bar4 -./tchmod 777 /mnt/lustre/bar4 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +cat /mnt/lustre/file4 +./tchmod 777 /mnt/lustre/file4 -touch /mnt/lustre/bar5 -touch /mnt/lustre/bar6 -touch /mnt/lustre/bar5 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +touch /mnt/lustre/file5 +touch /mnt/lustre/file6 +touch /mnt/lustre/file5 -touch /mnt/lustre/bar5 +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +touch /mnt/lustre/file5 -echo foo >> /mnt/lustre/bar -cat /mnt/lustre/bar +remount -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +echo foo >> /mnt/lustre/file +cat /mnt/lustre/file -cat /mnt/lustre/bar +remount + +cat /mnt/lustre/file echo foo >> /mnt/lustre/iotest echo bar >> /mnt/lustre/iotest cat /mnt/lustre/iotest -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +remount cat /mnt/lustre/iotest echo baz >> /mnt/lustre/iotest -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +remount ls /mnt/lustre -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +remount mkdir /mnt/lustre/new ls /mnt/lustre -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +remount ls /mnt/lustre mkdir /mnt/lustre/newer ls /mnt/lustre -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +remount cat /mnt/lustre/iotest echo "Testing truncation..." @@ -123,8 +117,7 @@ echo "trucating to 4 bytes now..." ./truncate /mnt/lustre/iotest 4 cat /mnt/lustre/iotest -umount /mnt/lustre -mount -t lustre_lite -o ost=$OST,mds=$MDS none /mnt/lustre +remount ls /mnt/lustre rmdir /mnt/lustre/foo diff --git a/lustre/tests/runfailure-mds b/lustre/tests/runfailure-mds index 0f473ff..f2942c3 100755 --- a/lustre/tests/runfailure-mds +++ b/lustre/tests/runfailure-mds @@ -3,43 +3,9 @@ SRCDIR="`dirname $0`" . $SRCDIR/common.sh -NETWORK=tcp -LOCALHOST=localhost -SERVER=localhost -PORT=1234 +. $SRCDIR/llmount.sh -setup_portals -setup_lustre - -new_fs ext2 /tmp/ost 10000 -OST=$LOOPDEV -MDSFS=ext3 -new_fs ${MDSFS} /tmp/mds 10000 -MDS=$LOOPDEV - -echo 0xffffffff > /proc/sys/portals/debug - -$OBDCTL < /proc/sys/lustre/fail_loc