[Pkg-lustre-svn-commit] r370 - in /trunk/debian: ./ patches/
pwinnertz-guest at users.alioth.debian.org
pwinnertz-guest at users.alioth.debian.org
Fri Oct 12 12:51:40 UTC 2007
Author: pwinnertz-guest
Date: Fri Oct 12 12:51:40 2007
New Revision: 370
URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=370
Log:
Added patches from upstream bugzilla (some of them doesn't work yet with dpatch...)
Added:
trunk/debian/patches/bug11880-flock-recov.dpatch
trunk/debian/patches/bug12411-build_patchless-client-packages.dpatch
trunk/debian/patches/bug12609-make_group_upcall_default.dpatch
trunk/debian/patches/bug13632-no_namespace_lock.dpatch
trunk/debian/patches/bug13696-lru_resize_mount_opts+perf_test.dpatch
trunk/debian/patches/bug5491-posix.dpatch
trunk/debian/patches/bug6334-prevent_multiple_mounts.dpatch
Modified:
trunk/debian/changelog
trunk/debian/patches/00list
Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/changelog?rev=370&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Fri Oct 12 12:51:40 2007
@@ -11,6 +11,8 @@
+ FIXME: configure patch is a _very_ ugly hack
* Fix ftbfs due to a missing include (liblustre-makefile.dpatch)
* Removed unneeded patches (this patches are included in the new release)
+ * Include several patches from upstream bugzilla with some important fixes,
+ which aren't addressed by the 1.6.3 release.
-- Patrick Winnertz <patrick.winnertz at skolelinux.org> Wed, 10 Oct 2007 16:14:07 +0200
Modified: trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/00list?rev=370&op=diff
==============================================================================
--- trunk/debian/patches/00list (original)
+++ trunk/debian/patches/00list Fri Oct 12 12:51:40 2007
@@ -21,8 +21,15 @@
liblustre-makefile.dpatch
lustre_config.dpatch
fix-2.6.15-versioncheck.dpatch
-bug13852-quota-includes.dpatch
+bug13852-quota_includes.dpatch
#Work needing patches
#autogen-run.dpatch
#quota-configure.dpatch
+#bug5491-posix.dpatch
+bug11880-flock-recov.dpatch
+bug12411-build_patchless-client-packages.dpatch
+bug12609-make_group_upcall_default.dpatch
+bug13632-no_namespace_lock.dpatch
+bug13696-lru_resize_mount_opts+perf_test.dpatch
+bug6334-prevent_multiple_mounts.dpatch
Added: trunk/debian/patches/bug11880-flock-recov.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug11880-flock-recov.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug11880-flock-recov.dpatch (added)
+++ trunk/debian/patches/bug11880-flock-recov.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,199 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug11880-flock-recov.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug 11880)
+
+ at DPATCH@
+diff -u -p -r1.13 ldlm_flock.c
+--- lustre-1.6.3/lustre/ldlm/ldlm_flock.c 10 Feb 2007 06:31:56 -0000 1.13
++++ lustre-1.6.3/lustre/ldlm/ldlm_flock.c 13 Jun 2007 03:00:06 -0000
+@@ -88,7 +88,10 @@ ldlm_flock_destroy(struct ldlm_lock *loc
+ if (flags == LDLM_FL_WAIT_NOREPROC) {
+ /* client side - set a flag to prevent sending a CANCEL */
+ lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING;
+- ldlm_lock_decref_internal(lock, mode);
++
++ /* when reaching here, it is under lock_res_and_lock(). Thus,
++ need call the nolock version of ldlm_lock_decref_internal*/
++ ldlm_lock_decref_internal_nolock(lock, mode);
+ }
+
+ ldlm_lock_destroy_nolock(lock);
+@@ -137,6 +140,7 @@ ldlm_process_flock_lock(struct ldlm_lock
+ int local = ns->ns_client;
+ int added = (mode == LCK_NL);
+ int overlaps = 0;
++ int splitted = 0;
+ ENTRY;
+
+ CDEBUG(D_DLMTRACE, "flags %#x pid %u mode %u start "LPU64" end "LPU64
+@@ -155,6 +159,7 @@ ldlm_process_flock_lock(struct ldlm_lock
+ req->l_blocking_ast = ldlm_flock_blocking_ast;
+ }
+
++reprocess:
+ if ((*flags == LDLM_FL_WAIT_NOREPROC) || (mode == LCK_NL)) {
+ /* This loop determines where this processes locks start
+ * in the resource lr_granted list. */
+@@ -334,15 +339,21 @@ ldlm_process_flock_lock(struct ldlm_lock
+ /* XXX - if ldlm_lock_new() can sleep we should
+ * release the ns_lock, allocate the new lock,
+ * and restart processing this lock. */
+- new2 = ldlm_lock_create(ns, NULL, res->lr_name, LDLM_FLOCK,
++ if (!new2) {
++ unlock_res_and_lock(req);
++ new2 = ldlm_lock_create(ns, NULL, res->lr_name, LDLM_FLOCK,
+ lock->l_granted_mode, NULL, NULL, NULL,
+ NULL, 0);
+- if (!new2) {
+- ldlm_flock_destroy(req, lock->l_granted_mode, *flags);
+- *err = -ENOLCK;
+- RETURN(LDLM_ITER_STOP);
++ lock_res_and_lock(req);
++ if (!new2) {
++ ldlm_flock_destroy(req, lock->l_granted_mode, *flags);
++ *err = -ENOLCK;
++ RETURN(LDLM_ITER_STOP);
++ }
++ goto reprocess;
+ }
+
++ splitted = 1;
+ new2->l_granted_mode = lock->l_granted_mode;
+ new2->l_policy_data.l_flock.pid =
+ new->l_policy_data.l_flock.pid;
+@@ -360,8 +371,9 @@ ldlm_process_flock_lock(struct ldlm_lock
+ &new2->l_export->exp_ldlm_data.led_held_locks);
+ spin_unlock(&new2->l_export->exp_ldlm_data.led_lock);
+ }
+- if (*flags == LDLM_FL_WAIT_NOREPROC)
+- ldlm_lock_addref_internal(new2, lock->l_granted_mode);
++ if (*flags == LDLM_FL_WAIT_NOREPROC) {
++ ldlm_lock_addref_internal_nolock(new2, lock->l_granted_mode);
++ }
+
+ /* insert new2 at lock */
+ ldlm_resource_add_lock(res, ownlocks, new2);
+@@ -369,6 +381,10 @@ ldlm_process_flock_lock(struct ldlm_lock
+ break;
+ }
+
++ /* if new2 is created but never used, destroy it*/
++ if (splitted == 0 && new2 != NULL)
++ ldlm_lock_destroy_nolock(new2);
++
+ /* At this point we're granting the lock request. */
+ req->l_granted_mode = req->l_req_mode;
+
+@@ -398,9 +414,9 @@ restart:
+ ldlm_reprocess_queue(res, &res->lr_waiting,
+ &rpc_list);
+
+- unlock_res(res);
+- rc = ldlm_run_bl_ast_work(&rpc_list);
+- lock_res(res);
++ unlock_res_and_lock(req);
++ rc = ldlm_run_cp_ast_work(&rpc_list);
++ lock_res_and_lock(req);
+ if (rc == -ERESTART)
+ GOTO(restart, -ERESTART);
+ }
+@@ -500,7 +516,7 @@ granted:
+
+ LDLM_DEBUG(lock, "client-side enqueue granted");
+ ns = lock->l_resource->lr_namespace;
+- lock_res(lock->l_resource);
++ lock_res_and_lock(lock);
+
+ /* take lock off the deadlock detection waitq. */
+ list_del_init(&lock->l_flock_waitq);
+@@ -524,8 +540,8 @@ granted:
+ cfs_flock_set_type(getlk, F_UNLCK);
+ }
+ cfs_flock_set_pid(getlk, (pid_t)lock->l_policy_data.l_flock.pid);
+- cfs_flock_set_start(getlk, (off_t)lock->l_policy_data.l_flock.start);
+- cfs_flock_set_end(getlk, (off_t)lock->l_policy_data.l_flock.end);
++ cfs_flock_set_start(getlk, (loff_t)lock->l_policy_data.l_flock.start);
++ cfs_flock_set_end(getlk, (loff_t)lock->l_policy_data.l_flock.end);
+ } else {
+ int noreproc = LDLM_FL_WAIT_NOREPROC;
+
+@@ -535,7 +551,7 @@ granted:
+ if (flags == 0)
+ cfs_waitq_signal(&lock->l_waitq);
+ }
+- unlock_res(lock->l_resource);
++ unlock_res_and_lock(lock);
+ RETURN(0);
+ }
+ EXPORT_SYMBOL(ldlm_flock_completion_ast);
+diff -u -p -r1.16 ldlm_internal.h
+--- ./lustre/ldlm/ldlm_internal.h 10 Feb 2007 06:31:56 -0000 1.16
++++ ./lustre/ldlm/ldlm_internal.h 13 Jun 2007 03:00:06 -0000
+@@ -26,7 +26,9 @@ ldlm_lock_create(struct ldlm_namespace *
+ ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
+ void *cookie, int *flags);
+ void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
++void ldlm_lock_addref_internal_nolock(struct ldlm_lock *, __u32 mode);
+ void ldlm_lock_decref_internal(struct ldlm_lock *, __u32 mode);
++void ldlm_lock_decref_internal_nolock(struct ldlm_lock *, __u32 mode);
+ void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new,
+ struct list_head *work_list);
+ int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue,
+Index: ldlm/ldlm_lock.c
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/ldlm/ldlm_lock.c,v
+retrieving revision 1.159
+diff -u -p -r1.159 ldlm_lock.c
+--- lustre-1.6.3/lustre/ldlm/ldlm_lock.c 10 Feb 2007 06:31:56 -0000 1.159
++++ lustre-1.6.3/lustre/ldlm/ldlm_lock.c 13 Jun 2007 03:00:06 -0000
+@@ -556,15 +556,12 @@ void ldlm_lock_addref_internal(struct ld
+ unlock_res_and_lock(lock);
+ }
+
+-void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode)
++/* only called in ldlm_flock_destroy and for local locks.
++ * for LDLM_FLOCK type locks, l_blocking_ast is null, and
++ * ldlm_lock_remove_from_lru() does nothing, it is safe
++ * for ldlm_flock_destroy usage by dropping some code */
++void ldlm_lock_decref_internal_nolock(struct ldlm_lock *lock, __u32 mode)
+ {
+- struct ldlm_namespace *ns;
+- ENTRY;
+-
+- lock_res_and_lock(lock);
+-
+- ns = lock->l_resource->lr_namespace;
+-
+ LDLM_DEBUG(lock, "ldlm_lock_decref(%s)", ldlm_lockname[mode]);
+ if (mode & (LCK_NL | LCK_CR | LCK_PR)) {
+ LASSERT(lock->l_readers > 0);
+@@ -575,6 +572,19 @@ void ldlm_lock_decref_internal(struct ld
+ lock->l_writers--;
+ }
+
++ LDLM_LOCK_PUT(lock); /* matches the ldlm_lock_get in addref */
++}
++void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode)
++{
++ struct ldlm_namespace *ns;
++ ENTRY;
++
++ lock_res_and_lock(lock);
++
++ ns = lock->l_resource->lr_namespace;
++
++ ldlm_lock_decref_internal_nolock(lock, mode);
++
+ if (lock->l_flags & LDLM_FL_LOCAL &&
+ !lock->l_readers && !lock->l_writers) {
+ /* If this is a local lock on a server namespace and this was
+@@ -616,8 +626,6 @@ void ldlm_lock_decref_internal(struct ld
+ unlock_res_and_lock(lock);
+ }
+
+- LDLM_LOCK_PUT(lock); /* matches the ldlm_lock_get in addref */
+-
+ EXIT;
+ }
Added: trunk/debian/patches/bug12411-build_patchless-client-packages.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug12411-build_patchless-client-packages.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug12411-build_patchless-client-packages.dpatch (added)
+++ trunk/debian/patches/bug12411-build_patchless-client-packages.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,132 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug12411-build_patchless-client-packages.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug12411)
+
+ at DPATCH@
+Index: b1_6/lustre/kernel_patches/series/2.6-sles10.series
+===================================================================
+--- ./lustre/kernel_patches/series/2.6-sles10.series
++++ ./lustre/kernel_patches/series/2.6-sles10.series
+@@ -1,17 +1,13 @@
+ lustre_version.patch
+-vfs_intent-2.6-sles10.patch
+-vfs_races-2.6.18-vanilla.patch
+ jbd-2.6.10-jcberr.patch
+ iopen-misc-2.6.12.patch
+-export-truncate-2.6-suse.patch
+ export_symbols-2.6.12.patch
+ dev_read_only-2.6-fc5.patch
+ export-2.6-fc5.patch
+-lookup_bdev_init_intent.patch
+-remove-suid-2.6-suse.patch
+ export-show_task-2.6-fc5.patch
+ sd_iostats-2.6-rhel4.patch
+ export_symbol_numa-2.6-fc5.patch
+ blkdev_tunables-2.6-sles10.patch
+ jbd-stats-2.6-sles10.patch
++i_filter_data.patch
+ jbd-journal-chksum-2.6-sles10.patch
+Index: b1_6/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch
+===================================================================
+--- ./lustre/kernel_patches/patches/iopen-misc-2.6.12.patch
++++ ./lustre/kernel_patches/patches/iopen-misc-2.6.12.patch
+@@ -1,10 +1,10 @@
+-Index: linux-2.6.4-51.0/Documentation/filesystems/ext2.txt
++Index: linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt
+ ===================================================================
+---- linux-2.6.4-51.0.orig/Documentation/filesystems/ext2.txt 2004-05-06 22:21:26.000000000 -0400
+-+++ linux-2.6.4-51.0/Documentation/filesystems/ext2.txt 2004-05-06 22:24:42.000000000 -0400
+-@@ -35,6 +35,22 @@
++--- linux-2.6.16.46-0.14.orig/Documentation/filesystems/ext2.txt
+++++ linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt
++@@ -58,6 +58,22 @@ nobh Do not attach buffer_heads to fi
+
+- sb=n Use alternate superblock at this location.
++ xip Use execute in place (no caching) if possible
+
+ +iopen Makes an invisible pseudo-directory called
+ + __iopen__ available in the root directory
+@@ -25,11 +25,41 @@ Index: linux-2.6.4-51.0/Documentation/fi
+ grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2.
+
+
+-Index: linux-2.6.4-51.0/fs/dcache.c
++Index: linux-2.6.16.46-0.14/fs/dcache.c
+ ===================================================================
+---- linux-2.6.4-51.0.orig/fs/dcache.c 2004-05-06 22:24:42.000000000 -0400
+-+++ linux-2.6.4-51.0/fs/dcache.c 2004-05-06 22:58:37.000000000 -0400
+-@@ -1195,14 +1195,13 @@
++--- linux-2.6.16.46-0.14.orig/fs/dcache.c
+++++ linux-2.6.16.46-0.14/fs/dcache.c
++@@ -1309,17 +1309,26 @@ static void __d_rehash(struct dentry * e
++ * Adds a dentry to the hash according to its name.
++ */
++
++-void d_rehash(struct dentry * entry)
+++void d_rehash_cond(struct dentry * entry, int lock)
++ {
++ struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
++
++- spin_lock(&dcache_lock);
+++ if (lock)
+++ spin_lock(&dcache_lock);
++ spin_lock(&entry->d_lock);
++ __d_rehash(entry, list);
++ spin_unlock(&entry->d_lock);
++- spin_unlock(&dcache_lock);
+++ if (lock)
+++ spin_unlock(&dcache_lock);
++ }
++
+++EXPORT_SYMBOL(d_rehash_cond);
+++
+++void d_rehash(struct dentry * entry)
+++{
+++ d_rehash_cond(entry, 1);
+++ }
+++
++ #define do_switch(x,y) do { \
++ __typeof__ (x) __tmp = x; \
++ x = y; y = __tmp; } while (0)
++@@ -1392,14 +1401,13 @@ static void switch_names(struct dentry *
+ * dcache entries should not be moved in this way.
+ */
+
+@@ -45,8 +75,8 @@ Index: linux-2.6.4-51.0/fs/dcache.c
+ write_seqlock(&rename_lock);
+ /*
+ * XXXX: do we really need to take target->d_lock?
+-@@ -1253,6 +1252,14 @@
+- spin_unlock(&target->d_lock);
++@@ -1450,6 +1458,14 @@ already_unhashed:
++ fsnotify_d_move(dentry);
+ spin_unlock(&dentry->d_lock);
+ write_sequnlock(&rename_lock);
+ +}
+@@ -60,11 +90,11 @@ Index: linux-2.6.4-51.0/fs/dcache.c
+ spin_unlock(&dcache_lock);
+ }
+
+-Index: linux-2.6.4-51.0/include/linux/dcache.h
++Index: linux-2.6.16.46-0.14/include/linux/dcache.h
+ ===================================================================
+---- linux-2.6.4-51.0.orig/include/linux/dcache.h 2004-05-06 22:24:42.000000000 -0400
+-+++ linux-2.6.4-51.0/include/linux/dcache.h 2004-05-06 23:03:43.000000000 -0400
+-@@ -234,6 +234,7 @@
++--- linux-2.6.16.46-0.14.orig/include/linux/dcache.h
+++++ linux-2.6.16.46-0.14/include/linux/dcache.h
++@@ -236,6 +236,7 @@ extern int have_submounts(struct dentry
+ * This adds the entry to the hash queues.
+ */
+ extern void d_rehash(struct dentry *);
+@@ -72,7 +102,7 @@ Index: linux-2.6.4-51.0/include/linux/dc
+
+ /**
+ * d_add - add dentry to hash queues
+-@@ -252,6 +253,7 @@
++@@ -271,6 +272,7 @@ static inline struct dentry *d_add_uniqu
+
+ /* used for rename() and baskets */
+ extern void d_move(struct dentry *, struct dentry *);
Added: trunk/debian/patches/bug12609-make_group_upcall_default.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug12609-make_group_upcall_default.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug12609-make_group_upcall_default.dpatch (added)
+++ trunk/debian/patches/bug12609-make_group_upcall_default.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,196 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug12609-make_group_upcall_default.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug12609)
+
+ at DPATCH@
+diff -u -p -r1.2 lustre_param.h
+--- lustre-1.6.3/lustre/include/lustre_param.h 10 Feb 2007 06:31:18 -0000 1.2
++++ lustre-1.6.3/lustre/include/lustre_param.h 20 Sep 2007 03:25:48 -0000
+@@ -52,6 +52,7 @@ int do_lcfg(char *cfgname, lnet_nid_t ni
+ #define PARAM_FAILNODE "failover.node=" /* llog generation */
+ #define PARAM_FAILMODE "failover.mode=" /* llog generation */
+ #define PARAM_ACTIVE "active=" /* llog generation */
++#define PARAM_MDT_UPCALL "mdt.group_upcall=" /* mds group upcall */
+
+ /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */
+ #define PARAM_OST "ost."
+Index: lustre/tests/sanity.sh
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/tests/sanity.sh,v
+retrieving revision 1.100.6.48.2.3
+diff -u -p -r1.100.6.48.2.3 sanity.sh
+--- lustre-1.6.3/lustre/tests/sanity.sh 15 Sep 2007 13:48:02 -0000 1.100.6.48.2.3
++++ lustre-1.6.3/lustre/tests/sanity.sh 20 Sep 2007 03:25:50 -0000
+@@ -135,6 +135,8 @@ MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT
+ [ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo
+ rm -rf $DIR/[Rdfs][1-9]*
+
++$RUNAS ls $DIR >/dev/null 2>&1 || { echo "Error: uid $RUNAS_ID doesn't exist on MDS!"; exit 1; }
++
+ build_test_filter
+
+ echo "preparing for tests involving mounts"
+@@ -2837,7 +2839,7 @@ test_72() { # bug 5695 - Test that on 2.
+ touch $DIR/f72
+ chmod 777 $DIR/f72
+ chmod ug+s $DIR/f72
+- $RUNAS -u $(($RUNAS_ID + 1)) dd if=/dev/zero of=$DIR/f72 bs=512 count=1 || error
++ $RUNAS dd if=/dev/zero of=$DIR/f72 bs=512 count=1 || error
+ # See if we are still setuid/sgid
+ test -u $DIR/f72 -o -g $DIR/f72 && error "S/gid is not dropped on write"
+ # Now test that MDS is updated too
+Index: lustre/tests/cfg/insanity-local.sh
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/tests/cfg/insanity-local.sh,v
+retrieving revision 1.14
+diff -u -p -r1.14 insanity-local.sh
+--- lustre-1.6.3/lustre/tests/cfg/insanity-local.sh 10 Feb 2007 06:33:30 -0000 1.14
++++ lustre-1.6.3/lustre/tests/cfg/insanity-local.sh 20 Sep 2007 03:25:50 -0000
+@@ -41,6 +41,8 @@ MOUNTOPT=""
+ MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
+ [ "x$STRIPES_PER_OBJ" != "x" ] &&
+ MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
++[ "x$LUSTRE" != "x" ] &&
++ MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$LUSTRE/utils/l_getgroups"
+ MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
+
+ MKFSOPT=""
+Index: lustre/tests/cfg/local.sh
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/tests/cfg/local.sh,v
+retrieving revision 1.17
+diff -u -p -r1.17 local.sh
+--- lustre-1.6.3/lustre/tests/cfg/local.sh 23 Mar 2007 15:23:57 -0000 1.17
++++ lustre-1.6.3/lustre/tests/cfg/local.sh 20 Sep 2007 03:25:50 -0000
+@@ -45,6 +45,8 @@ MOUNTOPT=""
+ MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
+ [ "x$STRIPES_PER_OBJ" != "x" ] &&
+ MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
++[ "x$LUSTRE" != "x" ] &&
++ MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$LUSTRE/utils/l_getgroups"
+ MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
+
+ MKFSOPT=""
+Index: lustre/tests/cfg/lov.sh
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/tests/cfg/lov.sh,v
+retrieving revision 1.2
+diff -u -p -r1.2 lov.sh
+--- lustre-1.6.3/lustre/tests/cfg/lov.sh 10 Feb 2007 06:33:30 -0000 1.2
++++ lustre-1.6.3/lustre/tests/cfg/lov.sh 20 Sep 2007 03:25:50 -0000
+@@ -39,6 +39,8 @@ MOUNTOPT=""
+ MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
+ [ "x$STRIPES_PER_OBJ" != "x" ] &&
+ MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
++[ "x$LUSTRE" != "x" ] &&
++ MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$LUSTRE/utils/l_getgroups"
+ MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
+
+ MKFSOPT=""
+Index: lustre/utils/mkfs_lustre.c
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/utils/mkfs_lustre.c,v
+retrieving revision 1.8.6.6
+diff -u -p -r1.8.6.6 mkfs_lustre.c
+--- lustre-1.6.3/lustre/utils/mkfs_lustre.c 31 Aug 2007 21:15:55 -0000 1.8.6.6
++++ lustre-1.6.3/lustre/utils/mkfs_lustre.c 20 Sep 2007 03:25:50 -0000
+@@ -927,14 +927,42 @@ static inline void badopt(const char *op
+ usage(stderr);
+ }
+
++static int clean_param(char *buf, char *key)
++{
++ char *sub, *next;
++
++ if (!buf)
++ return 1;
++ if ((sub = strstr(buf, key)) != NULL) {
++ if ((next = strchr(sub, ' ')) != NULL) {
++ next++;
++ memmove(sub, next, strlen(next) + 1);
++ } else {
++ *sub = '\0';
++ }
++ }
++ return 0;
++}
++
+ static int add_param(char *buf, char *key, char *val)
+ {
+ int end = sizeof(((struct lustre_disk_data *)0)->ldd_params);
+- int start = strlen(buf);
++ int start;
+ int keylen = 0;
++ char *ptr;
+
+- if (key)
++ if (key) {
+ keylen = strlen(key);
++ clean_param(buf, key);
++ } else {
++ if((ptr = strchr(val, '=')) == NULL)
++ return 1;
++ *ptr = '\0';
++ clean_param(buf, val);
++ *ptr = '=';
++ }
++
++ start = strlen(buf);
+ if (start + 1 + keylen + strlen(val) >= end) {
+ fprintf(stderr, "%s: params are too long-\n%s %s%s\n",
+ progname, buf, key ? key : "", val);
+@@ -1021,6 +1049,8 @@ int parse_opts(int argc, char *const arg
+ char *optstring = "b:c:C:d:ef:Ghi:k:L:m:MnNo:Op:Pqru:vw";
+ int opt;
+ int rc, longidx;
++ int upcall = 0;
++ const size_t prefix_len = sizeof(PARAM_MDT_UPCALL) - 1;
+
+ while ((opt = getopt_long(argc, argv, optstring, long_opt, &longidx)) !=
+ EOF) {
+@@ -1159,6 +1189,18 @@ int parse_opts(int argc, char *const arg
+ mop->mo_ldd.ldd_flags |= LDD_F_SV_TYPE_OST;
+ break;
+ case 'p':
++ /* Test if the param is valid for mdt.group_upcall */
++ if (!strncmp(optarg, PARAM_MDT_UPCALL, prefix_len)) {
++ upcall++;
++ if(strcmp(optarg + prefix_len, "NONE") &&
++ access(optarg + prefix_len, R_OK | X_OK))
++ fprintf(stderr, "WARNING: group upcall "
++ "parameter not executable: %s\n"
++ "NOTE: you can change the path "
++ "to the group upcall through "
++ "tunefs.lustre(8)\n", optarg +
++ prefix_len);
++ }
+ rc = add_param(mop->mo_ldd.ldd_params, NULL, optarg);
+ if (rc)
+ return rc;
+@@ -1196,7 +1238,23 @@ int parse_opts(int argc, char *const arg
+ fprintf(stderr, "Bad argument: %s\n", argv[optind]);
+ return EINVAL;
+ }
+-
++
++#ifndef TUNEFS
++ if (mop->mo_ldd.ldd_flags & LDD_F_SV_TYPE_MDT && 0 == upcall) {
++ if(access("/usr/sbin/l_getgroups", R_OK | X_OK))
++ fprintf(stderr, "WARNING: MDS group upcall is not set, "
++ "use 'NONE'\n");
++ else {
++ rc = add_param(mop->mo_ldd.ldd_params, PARAM_MDT_UPCALL,
++ "/usr/sbin/l_getgroups");
++ if (rc)
++ return rc;
++ /* Must update the mgs logs */
++ mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
++ }
++ }
++#endif
++
+ return 0;
+ }
+
Added: trunk/debian/patches/bug13632-no_namespace_lock.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug13632-no_namespace_lock.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug13632-no_namespace_lock.dpatch (added)
+++ trunk/debian/patches/bug13632-no_namespace_lock.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,239 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug13632-no_namespace_lock.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug13632)
+
+ at DPATCH@
+Index: include/lustre_dlm.h
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/include/lustre_dlm.h,v
+retrieving revision 1.3.6.8
+diff -u -p -r1.3.6.8 lustre_dlm.h
+--- lustre-1.6.3/lustre/include/lustre_dlm.h 15 Sep 2007 13:01:54 -0000 1.3.6.8
++++ lustre-1.6.3/lustre/include/lustre_dlm.h 19 Sep 2007 07:19:39 -0000
+@@ -654,6 +654,12 @@ struct ldlm_namespace *ldlm_namespace_ne
+ ldlm_appetite_t apt);
+ int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int flags);
+ int ldlm_namespace_free(struct ldlm_namespace *ns, int force);
++void ldlm_namespace_move(struct ldlm_namespace *ns, ldlm_side_t client);
++struct ldlm_namespace *ldlm_namespace_first(ldlm_side_t client);
++void ldlm_namespace_get(struct ldlm_namespace *ns);
++void ldlm_namespace_put(struct ldlm_namespace *ns, int wakeup);
++void ldlm_namespace_get_nolock(struct ldlm_namespace *ns);
++void ldlm_namespace_put_nolock(struct ldlm_namespace *ns, int wakeup);
+ int ldlm_proc_setup(void);
+ #ifdef LPROCFS
+ void ldlm_proc_cleanup(void);
+Index: ldlm/ldlm_pool.c
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/ldlm/Attic/ldlm_pool.c,v
+retrieving revision 1.1.14.5
+diff -u -p -r1.1.14.5 ldlm_pool.c
+--- lustre-1.6.3/lustre/ldlm/ldlm_pool.c 14 Sep 2007 16:14:11 -0000 1.1.14.5
++++ lustre-1.6.3/lustre/ldlm/ldlm_pool.c 19 Sep 2007 07:19:40 -0000
+@@ -723,8 +723,8 @@ EXPORT_SYMBOL(ldlm_pools_wakeup);
+ static int ldlm_pools_shrink(ldlm_side_t client, int nr,
+ unsigned int gfp_mask)
+ {
++ int total = 0, cached = 0, nr_ns;
+ struct ldlm_namespace *ns;
+- int total = 0, cached = 0;
+
+ if (nr != 0 && !(gfp_mask & __GFP_FS))
+ return -1;
+@@ -732,28 +732,42 @@ static int ldlm_pools_shrink(ldlm_side_t
+ CDEBUG(D_DLMTRACE, "request to shrink %d %s locks from all pools\n",
+ nr, client == LDLM_NAMESPACE_CLIENT ? "client" : "server");
+
+- if (down_trylock(ldlm_namespace_lock(client)))
+- return nr != 0 ? -1 : 0;
+-
++ /* Find out how many resources we may release. */
++ mutex_down(ldlm_namespace_lock(client));
+ list_for_each_entry(ns, ldlm_namespace_list(client), ns_list_chain)
+ total += ldlm_pool_granted(&ns->ns_pool);
++ mutex_up(ldlm_namespace_lock(client));
+
+- if (nr == 0) {
+- mutex_up(ldlm_namespace_lock(client));
++ if (nr == 0)
+ return total;
+- }
+
+- /* Check all namespaces. */
+- list_for_each_entry(ns, ldlm_namespace_list(client), ns_list_chain) {
+- struct ldlm_pool *pl = &ns->ns_pool;
++ /* Shrink at least ldlm_namespace_nr(client) namespaces. */
++ for (nr_ns = atomic_read(ldlm_namespace_nr(client));
++ nr_ns > 0; nr_ns--)
++ {
+ int cancel, nr_locks;
+
++ /* Do not call shrink under ldlm_namespace_lock(client) */
++ mutex_down(ldlm_namespace_lock(client));
++ if (list_empty(ldlm_namespace_list(client))) {
++ mutex_up(ldlm_namespace_lock(client));
++ /* If list if empty, we can't return any @cached > 0,
++ * that probablhy would cause needless shrinker
++ * call. */
++ cached = 0;
++ break;
++ }
++ ns = ldlm_namespace_first(client);
++ ldlm_namespace_get(ns);
++ ldlm_namespace_move(ns, client);
++ mutex_up(ldlm_namespace_lock(client));
++
+ nr_locks = ldlm_pool_granted(&ns->ns_pool);
+ cancel = 1 + nr_locks * nr / total;
+- ldlm_pool_shrink(pl, cancel, gfp_mask);
++ ldlm_pool_shrink(&ns->ns_pool, cancel, gfp_mask);
+ cached += ldlm_pool_granted(&ns->ns_pool);
++ ldlm_namespace_put(ns, 1);
+ }
+- mutex_up(ldlm_namespace_lock(client));
+ return cached;
+ }
+
+@@ -771,7 +785,7 @@ void ldlm_pools_recalc(ldlm_side_t clien
+ {
+ __u32 nr_l = 0, nr_p = 0, l;
+ struct ldlm_namespace *ns;
+- int rc, equal = 0;
++ int rc, nr, equal = 0;
+
+ /* Check all modest namespaces. */
+ mutex_down(ldlm_namespace_lock(client));
+@@ -791,15 +805,9 @@ void ldlm_pools_recalc(ldlm_side_t clien
+ nr_l += l;
+ nr_p++;
+ }
+-
+- /* After setup is done - recalc the pool. */
+- rc = ldlm_pool_recalc(&ns->ns_pool);
+- if (rc)
+- CERROR("%s: pool recalculation error "
+- "%d\n", ns->ns_pool.pl_name, rc);
+ }
+
+- /* Make sure that modest namespaces did not eat more that 1/3 of limit */
++ /* Make sure that modest namespaces did not eat more that 2/3 of limit */
+ if (nr_l >= 2 * (LDLM_POOL_HOST_L / 3)) {
+ CWARN("Modest pools eat out 2/3 of locks limit. %d of %lu. "
+ "Upgrade server!\n", nr_l, LDLM_POOL_HOST_L);
+@@ -827,14 +835,34 @@ void ldlm_pools_recalc(ldlm_side_t clien
+ }
+ ldlm_pool_setup(&ns->ns_pool, l);
+ }
++ }
++ mutex_up(ldlm_namespace_lock(client));
++
++ /* Recalc at least ldlm_namespace_nr(client) namespaces. */
++ for (nr = atomic_read(ldlm_namespace_nr(client)); nr > 0; nr--) {
++ /* Lock the list, get first @ns in the list, getref, move it
++ * to the tail, unlock and call pool recalc. This way we avoid
++ * calling recalc under @ns lock what is really good as we get
++ * rid of potential deadlock on client nodes when canceling
++ * locks synchronously. */
++ mutex_down(ldlm_namespace_lock(client));
++ if (list_empty(ldlm_namespace_list(client))) {
++ mutex_up(ldlm_namespace_lock(client));
++ break;
++ }
++ ns = ldlm_namespace_first(client);
++ ldlm_namespace_get(ns);
++ ldlm_namespace_move(ns, client);
++ mutex_up(ldlm_namespace_lock(client));
+
+ /* After setup is done - recalc the pool. */
+ rc = ldlm_pool_recalc(&ns->ns_pool);
+ if (rc)
+ CERROR("%s: pool recalculation error "
+ "%d\n", ns->ns_pool.pl_name, rc);
++
++ ldlm_namespace_put(ns, 1);
+ }
+- mutex_up(ldlm_namespace_lock(client));
+ }
+ EXPORT_SYMBOL(ldlm_pools_recalc);
+
+Index: ldlm/ldlm_resource.c
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/ldlm/ldlm_resource.c,v
+retrieving revision 1.99.32.10
+diff -u -p -r1.99.32.10 ldlm_resource.c
+--- lustre-1.6.3/lustre/ldlm/ldlm_resource.c 15 Sep 2007 13:01:54 -0000 1.99.32.10
++++ lustre-1.6.3/lustre/ldlm/ldlm_resource.c 19 Sep 2007 07:19:46 -0000
+@@ -557,6 +557,51 @@ int ldlm_namespace_free(struct ldlm_name
+ return ELDLM_OK;
+ }
+
++void ldlm_namespace_get_nolock(struct ldlm_namespace *ns)
++{
++ LASSERT(ns->ns_refcount >= 0);
++ ns->ns_refcount++;
++}
++
++void ldlm_namespace_get(struct ldlm_namespace *ns)
++{
++ spin_lock(&ns->ns_hash_lock);
++ ldlm_namespace_get_nolock(ns);
++ spin_unlock(&ns->ns_hash_lock);
++}
++
++void ldlm_namespace_put_nolock(struct ldlm_namespace *ns, int wakeup)
++{
++ LASSERT(ns->ns_refcount > 0);
++ ns->ns_refcount--;
++ if (ns->ns_refcount == 0 && wakeup)
++ wake_up(&ns->ns_waitq);
++}
++
++void ldlm_namespace_put(struct ldlm_namespace *ns, int wakeup)
++{
++ spin_lock(&ns->ns_hash_lock);
++ ldlm_namespace_put_nolock(ns, wakeup);
++ spin_unlock(&ns->ns_hash_lock);
++}
++
++/* Should be called under ldlm_namespace_lock(client) taken */
++void ldlm_namespace_move(struct ldlm_namespace *ns, ldlm_side_t client)
++{
++ LASSERT(!list_empty(&ns->ns_list_chain));
++ LASSERT_SEM_LOCKED(ldlm_namespace_lock(client));
++ list_move_tail(&ns->ns_list_chain, ldlm_namespace_list(client));
++}
++
++/* Should be called under ldlm_namespace_lock(client) taken */
++struct ldlm_namespace *ldlm_namespace_first(ldlm_side_t client)
++{
++ LASSERT_SEM_LOCKED(ldlm_namespace_lock(client));
++ LASSERT(!list_empty(ldlm_namespace_list(client)));
++ return container_of(ldlm_namespace_list(client)->next,
++ struct ldlm_namespace, ns_list_chain);
++}
++
+ static __u32 ldlm_hash_fn(struct ldlm_resource *parent, struct ldlm_res_id name)
+ {
+ __u32 hash = 0;
+@@ -655,7 +700,7 @@ ldlm_resource_add(struct ldlm_namespace
+ bucket = ns->ns_hash + hash;
+ list_add(&res->lr_hash, bucket);
+ ns->ns_resources++;
+- ns->ns_refcount++;
++ ldlm_namespace_get_nolock(ns);
+
+ if (parent == NULL) {
+ list_add(&res->lr_childof, &ns->ns_root_list);
+@@ -752,7 +797,9 @@ void __ldlm_resource_putref_final(struct
+ LBUG();
+ }
+
+- ns->ns_refcount--;
++ /* Pass 0 as second argument to not wake up ->ns_waitq yet, will do it
++ * later. */
++ ldlm_namespace_put_nolock(ns, 0);
+ list_del_init(&res->lr_hash);
+ list_del_init(&res->lr_childof);
+
Added: trunk/debian/patches/bug13696-lru_resize_mount_opts+perf_test.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug13696-lru_resize_mount_opts%2Bperf_test.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug13696-lru_resize_mount_opts+perf_test.dpatch (added)
+++ trunk/debian/patches/bug13696-lru_resize_mount_opts+perf_test.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,168 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug13696-lru_resize-mount_opts+perf_test.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug13696)
+
+ at DPATCH@
+Index: llite/llite_internal.h
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/llite/llite_internal.h,v
+retrieving revision 1.68.2.13
+diff -u -p -r1.68.2.13 llite_internal.h
+--- lustre-1.6.3/lustre/llite/llite_internal.h 19 Sep 2007 20:22:25 -0000 1.68.2.13
++++ lustre-1.6.3/lustre/llite/llite_internal.h 23 Sep 2007 12:15:11 -0000
+@@ -215,6 +215,7 @@ enum stats_track_type {
+ #define LL_SBI_ACL 0x10 /* support ACL */
+ #define LL_SBI_JOIN 0x20 /* support JOIN */
+ #define LL_SBI_LOCALFLOCK 0x40 /* Local flocks support by kernel */
++#define LL_SBI_LRU_RESIZE 0x80 /* support lru resize */
+
+ /* default value for ll_sb_info->contention_time */
+ #define SBI_DEFAULT_CONTENTION_SECONDS 60
+Index: llite/llite_lib.c
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/llite/llite_lib.c,v
+retrieving revision 1.134.2.30
+diff -u -p -r1.134.2.30 llite_lib.c
+--- lustre-1.6.3/lustre/llite/llite_lib.c 14 Sep 2007 21:58:43 -0000 1.134.2.30
++++ lustre-1.6.3/lustre/llite/llite_lib.c 23 Sep 2007 12:15:11 -0000
+@@ -90,6 +90,10 @@ static struct ll_sb_info *ll_init_sbi(vo
+ sbi->ll_flags |= LL_SBI_CHECKSUM;
+ #endif
+
++#ifdef HAVE_LRU_RESIZE_SUPPORT
++ sbi->ll_flags |= LL_SBI_LRU_RESIZE;
++#endif
++
+ #ifdef HAVE_EXPORT___IGET
+ INIT_LIST_HEAD(&sbi->ll_deathrow);
+ spin_lock_init(&sbi->ll_deathrow_lock);
+@@ -163,7 +167,8 @@ static int client_common_fill_super(stru
+ OBD_CONNECT_JOIN | OBD_CONNECT_ATTRFID | OBD_CONNECT_NODEVOH |
+ OBD_CONNECT_CANCELSET | OBD_CONNECT_AT;
+ #ifdef HAVE_LRU_RESIZE_SUPPORT
+- data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
++ if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
++ data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
+ #endif
+ #ifdef CONFIG_FS_POSIX_ACL
+ data->ocd_connect_flags |= OBD_CONNECT_ACL;
+@@ -267,7 +272,8 @@ static int client_common_fill_super(stru
+ OBD_CONNECT_SRVLOCK | OBD_CONNECT_CANCELSET | OBD_CONNECT_AT;
+
+ #ifdef HAVE_LRU_RESIZE_SUPPORT
+- data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
++ if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
++ data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
+ #endif
+
+ CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d "
+@@ -714,6 +720,16 @@ static int ll_options(char *options, int
+ goto next;
+ }
+
++ tmp = ll_set_opt("lruresize", s1, LL_SBI_LRU_RESIZE);
++ if (tmp) {
++ *flags |= tmp;
++ goto next;
++ }
++ tmp = ll_set_opt("nolruresize", s1, LL_SBI_LRU_RESIZE);
++ if (tmp) {
++ *flags &= ~tmp;
++ goto next;
++ }
+ LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
+ s1);
+ RETURN(-EINVAL);
+Index: tests/sanity.sh
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/tests/sanity.sh,v
+retrieving revision 1.100.6.54
+diff -u -p -r1.100.6.54 sanity.sh
+--- lustre-1.6.3/lustre/tests/sanity.sh 20 Sep 2007 12:15:45 -0000 1.100.6.54
++++ lustre-1.6.3/lustre/tests/sanity.sh 23 Sep 2007 12:15:14 -0000
+@@ -4231,7 +4231,7 @@ lru_resize_test_init()
+ return 0
+ }
+
+-test_124() {
++test_124a() {
+ lru_resize_test_init || return 0
+ cleanup -f || error "failed to unmount"
+ setup
+@@ -4244,7 +4244,7 @@ test_124() {
+ disable_pool_shrink mdc
+
+ NR=2000
+- mkdir $DIR/$tdir
++ mkdir $DIR/$tdir > /dev/null 2>&1
+
+ LRU_SIZE=`cat $NSDIR/lru_size`
+
+@@ -4283,15 +4283,63 @@ enough to cancel $LRU_SIZE_B lock(s)"
+ [ $LRU_SIZE_B -ge $LRU_SIZE_A ] || {
+ error "No locks dropped in "$((SLEEP+SLEEP_ADD))"s. LRU size: $LRU_SIZE_A"
+ lru_resize_enable
++ unlinkmany $DIR/$tdir/f $NR
+ return
+ }
+
+ log "Dropped "$((LRU_SIZE_B-LRU_SIZE_A))" locks in "$((SLEEP+SLEEP_ADD))"s"
+ lru_resize_enable
+ log "unlink $NR files at $DIR/$tdir"
+- unlinkmany $DIR/$tdir/f $NR > /dev/null 2>&1
++ unlinkmany $DIR/$tdir/f $NR
+ }
+-run_test 124 "lru resize ======================================="
++run_test 124a "lru resize ======================================="
++
++test_124b() {
++ lru_resize_test_init || return 0
++ cleanup -f || error "failed to unmount"
++ MOUNTOPT="$MOUNTOPT,nolruresize"
++ setup
++
++ NR=3000
++ mkdir $DIR/$tdir > /dev/null 2>&1
++
++ createmany -o $DIR/$tdir/f $NR
++ log "doing ls -la $DIR/$tdir 3 times (lru resize disabled)"
++ stime=`date +%s`
++ ls -la $DIR/$tdir > /dev/null
++ ls -la $DIR/$tdir > /dev/null
++ ls -la $DIR/$tdir > /dev/null
++ etime=`date +%s`
++ nolruresize_delta=$((etime-stime))
++ log "ls -la time: $nolruresize_delta seconds"
++
++ cleanup -f || error "failed to unmount"
++ MOUNTOPT=`echo $MOUNTOPT | sed "s/nolruresize/lruresize/"`
++ setup
++
++ createmany -o $DIR/$tdir/f $NR
++ log "doing ls -la $DIR/$tdir 3 times (lru resize enabled)"
++ stime=`date +%s`
++ ls -la $DIR/$tdir > /dev/null
++ ls -la $DIR/$tdir > /dev/null
++ ls -la $DIR/$tdir > /dev/null
++ etime=`date +%s`
++ lruresize_delta=$((etime-stime))
++ log "ls -la time: $lruresize_delta seconds"
++
++ if test $lruresize_delta -gt $nolruresize_delta; then
++ log "ls -la is $((lruresize_delta - $nolruresize_delta))s \
++slower with lru resize enabled"
++ elif test $nolruresize_delta -gt $lruresize_delta; then
++ log "ls -la is $((nolruresize_delta - $lruresize_delta))s \
++faster with lru resize enabled"
++ else
++ log "lru resize performs the same with no lru resize"
++ fi
++
++ unlinkmany $DIR/$tdir/f $NR
++}
++run_test 124b "lru resize (performance test) ======================="
+
+ test_125() { # 13358
+ mkdir -p $DIR/d125 || error "mkdir failed"
Added: trunk/debian/patches/bug5491-posix.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug5491-posix.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug5491-posix.dpatch (added)
+++ trunk/debian/patches/bug5491-posix.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug6491-posix.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug5491)
+
+ at DPATCH@
+--- lustre-1.6.3/lustre/ldlm/ldlm_flock.c.origin 2007-06-08 17:49:18.000000000 +0800
++++ lustre-1.6.3/lustre/ldlm/ldlm_flock.c 2007-06-08 17:17:32.000000000 +0800
+@@ -537,8 +537,8 @@ granted:
+ cfs_flock_set_type(getlk, F_UNLCK);
+ }
+ cfs_flock_set_pid(getlk, (pid_t)lock->l_policy_data.l_flock.pid);
+- cfs_flock_set_start(getlk, (off_t)lock->l_policy_data.l_flock.start);
+- cfs_flock_set_end(getlk, (off_t)lock->l_policy_data.l_flock.end);
++ cfs_flock_set_start(getlk, (loff_t)lock->l_policy_data.l_flock.start);
++ cfs_flock_set_end(getlk, (loff_t)lock->l_policy_data.l_flock.end);
+ } else {
+ int noreproc = LDLM_FL_WAIT_NOREPROC;
+
Added: trunk/debian/patches/bug6334-prevent_multiple_mounts.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug6334-prevent_multiple_mounts.dpatch?rev=370&op=file
==============================================================================
--- trunk/debian/patches/bug6334-prevent_multiple_mounts.dpatch (added)
+++ trunk/debian/patches/bug6334-prevent_multiple_mounts.dpatch Fri Oct 12 12:51:40 2007
@@ -1,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bug6334-prevent_multiple_mounts.dpatch by Patrick Winnertz <patrick.winnertz at skolelinux.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch from upstream bugzilla (bug6334)
+
+ at DPATCH@
+Index: lustre/lustre/utils/mkfs_lustre.c
+===================================================================
+--- ./lustre/utils/mkfs_lustre.c
++++ ./lustre/utils/mkfs_lustre.c
+@@ -71,6 +71,7 @@ struct mkfs_opts {
+ static char *progname;
+ static int verbose = 1;
+ static int print_only = 0;
++static int failover = 0;
+
+
+ void usage(FILE *out)
+@@ -549,6 +550,9 @@ int make_lustre_backfs(struct mkfs_opts
+ bz6224 */
+ strscat(mop->mo_mkfsopts, " -O dir_index",
+ sizeof(mop->mo_mkfsopts));
++ if (failover)
++ strscat(mop->mo_mkfsopts, ",mmp",
++ sizeof(mop->mo_mkfsopts));
+ /* ldiskfs2: do not initialize all groups. */
+ if (mop->mo_ldd.ldd_mount_type == LDD_MT_LDISKFS2)
+ strscat(mop->mo_mkfsopts, ",uninit_groups",
+@@ -1079,6 +1083,7 @@ int parse_opts(int argc, char *const arg
+ return rc;
+ /* Must update the mgs logs */
+ mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
++ failover = 1;
+ break;
+ }
+ case 'G':
More information about the Pkg-lustre-svn-commit
mailing list