Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Thu, 13 Oct 2005 22:37:23 +0000 (22:37 +0000)
committeradilger <adilger>
Thu, 13 Oct 2005 22:37:23 +0000 (22:37 +0000)
- add user_xattr to lov.sh, uml.sh client mount options
- don't run xattr sanity test 102 when not root or mounted with user_xattr
- add nouser_xattr mount option to allow user_xattr to be unset
- add check for linux/xattr_acl.h + compat (doesn't exist on BG/L)
- fix test 56, 65a with default striping on parent directory
- add ChangeLog entry for gmnalnid support to llmount.c
- add ChangeLog entry for xattr support
b=7979, b=8592, b=9504, b=9505

17 files changed:
lustre/ChangeLog
lustre/autoconf/lustre-core.m4
lustre/llite/file.c
lustre/llite/xattr.c
lustre/lov/lov_obd.c
lustre/mds/handler.c
lustre/obdfilter/lproc_obdfilter.c
lustre/tests/ll_dirstripe_verify.c
lustre/tests/local.sh
lustre/tests/lov.sh
lustre/tests/oos.sh
lustre/tests/oos2.sh
lustre/tests/sanity.sh
lustre/tests/sanityN.sh
lustre/tests/uml.sh
lustre/utils/liblustreapi.c
lustre/utils/llmount.c

index d422b47..90acce8 100644 (file)
@@ -164,6 +164,13 @@ Description: bind OST threads to NUMA nodes to improve performance
 Details    : all OST threads are uniformly bound to CPUs on a single NUMA
             node and do their allocations there to localize memory access
 
+Severity   : enhancement
+Bugzilla   : 7979
+Description: llmount can determine client NID directly from Myrinet (GM)
+Details    : the client NID code from gmnalnid was moved directly into
+            llmount, removing the need to use this or specifying the
+            client NID explicitly when mounting GM clients with zeroconf
+
 Severity   : minor
 Frequency  : if client is started with down MDS
 Bugzilla   : 7184
@@ -177,7 +184,8 @@ Details    : Having an LWI_INTR() wait event (interruptible, but no timeout)
 Severity   : minor
 Frequency  : rare
 Bugzilla   : 5047
-Description: data loss during concurrent not-page-aligned writes.
+Description: data loss during non-page-aligned writes to a single file from
+            both multiple nodes and multiple threads on one node at same time
 Details    : updates to KMS and lsm weren't protected by common lock. Resulting
             inconsistency led to false short-reads, that were cached and later
             used by ->prepare_write() to fill in partially written page,
@@ -188,16 +196,22 @@ Frequency  : always, if lconf --abort_recovery used
 Bugzilla   : 7047
 Description: lconf --abort_recovery fails with 'Operation not supported'
 Details    : lconf was attempting to abort recovery on the MDT device and not
-                the MDS device
+            the MDS device
 
 Severity   : enhancement
-Frequency  : always
 Bugzilla   : 9445
 Description: remove cleanup logs
 Details    : replace lconf-generated cleanup logs with lustre internal
-             cleanup routines.  Eliminates the need for client-cleanup and
+            cleanup routines.  Eliminates the need for client-cleanup and
             mds-cleanup logs.
-       
+
+Severity   : enhancement
+Bugzilla   : 8592
+Description: add support for EAs (user and system) on lustre filesystems
+Details    : it is now possible to store extended attributes in the Lustre
+            client filesystem, and with the user_xattr mount option it
+            is possible to allow users to store EAs on their files also
+
 ------------------------------------------------------------------------------
 
 08-26-2005  Cluster File Systems, Inc. <info@clusterfs.com>
index f630bb2..0ec1f9c 100644 (file)
@@ -395,6 +395,26 @@ AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
 ])
 
 #
+# LC_STRUCT_STATFS
+#
+# AIX does not have statfs.f_namelen
+#
+AC_DEFUN([LC_STRUCT_STATFS],
+[AC_MSG_CHECKING([if struct statfs has a f_namelen field])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/vfs.h>
+],[
+       struct statfs sfs;
+       sfs.f_namelen = 1;
+],[
+       AC_MSG_RESULT([yes])
+       AC_DEFINE(HAVE_STATFS_NAMELEN, 1, [struct statfs has a namelen field])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
+#
 # LC_PROG_LINUX
 #
 # Lustre linux kernel checks
@@ -416,6 +436,7 @@ LC_FUNC_REGISTER_CACHE
 LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
 LC_FUNC_DEV_SET_RDONLY
 LC_FUNC_FILEMAP_FDATAWRITE
+LC_STRUCT_STATFS
 ])
 
 #
@@ -508,6 +529,9 @@ AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
 # liblustre/lutil.c
 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
 AC_CHECK_FUNCS([inet_ntoa])
+
+# llite/xattr.c
+AC_CHECK_HEADERS([linux/xattr_acl.h])
 ])
 
 #
index 0c06efc..46a2edb 100644 (file)
@@ -233,7 +233,7 @@ int ll_file_open(struct inode *inode, struct file *file)
                 if (rc) {
                         ll_file_data_put(fd);
                         GOTO(out, rc);
-        }
+                }
         }
 
         lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, LPROC_LL_OPEN);
index b932648..9a16490 100644 (file)
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp_lock.h>
+#ifdef HAVE_LINUX_XATTR_ACL_H
 #include <linux/xattr_acl.h>
+#else
+#define XATTR_NAME_ACL_ACCESS   "system.posix_acl_access"
+#define XATTR_NAME_ACL_DEFAULT  "system.posix_acl_default"
+#endif
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
index 8c12ee6..bff2151 100644 (file)
@@ -596,7 +596,7 @@ static int lov_setup(struct obd_device *obd, obd_count len, void *buf)
          * divisor in a 32-bit kernel, we cannot support a stripe width
          * of 4GB or larger on 32-bit CPUs. */
         count = desc->ld_default_stripe_count;
-        if ((count ? count : desc->ld_tgt_count) *
+        if ((count > 0 ? count : desc->ld_tgt_count) *
             desc->ld_default_stripe_size > ~0UL) {
                 CERROR("LOV: stripe width "LPU64"x%u > %lu on 32-bit system\n",
                        desc->ld_default_stripe_size, count, ~0UL);
index a42abb5..cc3cf0e 100644 (file)
@@ -1433,7 +1433,7 @@ int mds_update_server_data(struct obd_device *obd, int force_sync)
 /* mount the file system (secretly).  lustre_cfg parameters are:
  * 1 = device
  * 2 = fstype
- * 3 = flags: failover=f, failout=n, ignored for an MDS
+ * 3 = config name
  * 4 = mount options
  */
 static int mds_setup(struct obd_device *obd, obd_count len, void *buf)
@@ -2197,7 +2197,7 @@ static struct obd_ops mdt_obd_ops = {
         .o_owner           = THIS_MODULE,
         .o_setup           = mdt_setup,
         .o_cleanup         = mdt_cleanup,
-        .o_health_check    = mdt_health_check,        
+        .o_health_check    = mdt_health_check,
 };
 
 static int __init mds_init(void)
@@ -2208,7 +2208,7 @@ static int __init mds_init(void)
         rc = lustre_dquot_init();
         if (rc)
                 return rc;
-        
+
         lprocfs_init_vars(mds, &lvars);
         class_register_type(&mds_obd_ops, lvars.module_vars, LUSTRE_MDS_NAME);
         lprocfs_init_vars(mdt, &lvars);
index 3832d54..397009e 100644 (file)
@@ -265,7 +265,7 @@ static int filter_brw_stats_seq_show(struct seq_file *seq, void *v)
         }
 
         seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
-        seq_printf(seq, "discont pages        rpcs   %% cum %% |");
+        seq_printf(seq, "discont pages         rpcs   %% cum %% |");
         seq_printf(seq, "       rpcs   %% cum %%\n");
 
         read_tot = lprocfs_oh_sum(&filter->fo_r_discont_pages);
@@ -326,7 +326,7 @@ static int filter_brw_stats_seq_show(struct seq_file *seq, void *v)
                 unsigned long w = filter->fo_write_rpc_hist.oh_buckets[i];
                 read_cum += r;
                 write_cum += w;
-                seq_printf(seq, "%u:\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
+                seq_printf(seq, "%u:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
                                  i, r, pct(r, read_tot),
                                  pct(read_cum, read_tot), w,
                                  pct(w, write_tot),
@@ -336,7 +336,7 @@ static int filter_brw_stats_seq_show(struct seq_file *seq, void *v)
         }
 
         seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
-        seq_printf(seq, "io time (jiffies = 1/%ds)     rpcs   %% cum %% |", HZ);
+        seq_printf(seq, "io time (1/%ds)     rpcs   %% cum %% |", HZ);
         seq_printf(seq, "       rpcs   %% cum %%\n");
 
         read_tot = lprocfs_oh_sum(&filter->fo_r_io_time);
@@ -349,7 +349,7 @@ static int filter_brw_stats_seq_show(struct seq_file *seq, void *v)
                 unsigned long w = filter->fo_w_io_time.oh_buckets[i];
                 read_cum += r;
                 write_cum += w;
-                seq_printf(seq, "%10u:\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
+                seq_printf(seq, "%u:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
                                  1 << i, r, pct(r, read_tot),
                                  pct(read_cum, read_tot), w,
                                  pct(w, write_tot),
index c1d18f8..4d36c18 100644 (file)
@@ -52,9 +52,9 @@ int read_proc_entry(char *proc_path, char *buf, int len)
 int compare(struct lov_user_md *lum_dir, struct lov_user_md *lum_file1,
             struct lov_user_md *lum_file2)
 {
-        int stripe_count;
-        int stripe_size;
-        int stripe_offset;
+        int stripe_count = 0;
+        int stripe_size = 0;
+        int stripe_offset = -1;
         int ost_count;
         char buf[128];
         char lov_path[PATH_MAX];
@@ -68,16 +68,18 @@ int compare(struct lov_user_md *lum_dir, struct lov_user_md *lum_file1,
 
         snprintf(lov_path, sizeof(lov_path) - 1, "/proc/fs/lustre/lov/%s", buf);
 
-        stripe_count = (int)lum_dir->lmm_stripe_count;
-        if (stripe_count == 0) {
-                snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/stripecount", lov_path);
+        if (lum_dir == NULL) {
+                snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/stripecount",
+                         lov_path);
                 if (read_proc_entry(tmp_path, buf, sizeof(buf)) <= 0)
-                        return 4;
+                        return 5;
 
                 stripe_count = atoi(buf);
-                if (stripe_count == 0)
-                        stripe_count = 1;
+        } else {
+                stripe_count = (int)lum_dir->lmm_stripe_count;
         }
+        if (stripe_count == 0)
+                stripe_count = 1;
 
         snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/numobd", lov_path);
         if (read_proc_entry(tmp_path, buf, sizeof(buf)) <= 0)
@@ -87,14 +89,16 @@ int compare(struct lov_user_md *lum_dir, struct lov_user_md *lum_file1,
         stripe_count = stripe_count > 0 ? stripe_count : ost_count;
 
         if (lum_file1->lmm_stripe_count != stripe_count) {
-                fprintf(stderr, "stripe count %d != %d\n",
+                fprintf(stderr, "file1 stripe count %d != dir %d\n",
                         lum_file1->lmm_stripe_count, stripe_count);
                 return 7;
         }
 
-        stripe_size = (int)lum_dir->lmm_stripe_size;
+        if (lum_dir != NULL)
+                stripe_size = (int)lum_dir->lmm_stripe_size;
         if (stripe_size == 0) {
-                snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/stripesize", lov_path);
+                snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/stripesize",
+                         lov_path);
                 if (read_proc_entry(tmp_path, buf, sizeof(buf)) <= 0)
                         return 5;
 
@@ -102,24 +106,33 @@ int compare(struct lov_user_md *lum_dir, struct lov_user_md *lum_file1,
         }
 
         if (lum_file1->lmm_stripe_size != stripe_size) {
-                fprintf(stderr, "stripe size %d != %d\n",
+                fprintf(stderr, "file1 stripe size %d != dir %d\n",
                         lum_file1->lmm_stripe_size, stripe_size);
                 return 8;
         }
 
-        stripe_offset = (short int)lum_dir->lmm_stripe_offset;
+        if (lum_dir != NULL)
+                stripe_offset = (short int)lum_dir->lmm_stripe_offset;
         if (stripe_offset != -1) {
                 for (i = 0; i < stripe_count; i++)
                         if (lum_file1->lmm_objects[i].l_ost_idx !=
-                            (stripe_offset + i) % ost_count)
-                                return 9;
+                            (stripe_offset + i) % ost_count) {
+                                fprintf(stderr, "warning: file1 non-sequential "
+                                        "stripe[%d] %d != %d\n", i,
+                                        lum_file1->lmm_objects[i].l_ost_idx,
+                                        (stripe_offset + i) % ost_count);
+                        }
         } else if (lum_file2 != NULL) {
-                int next, idx;
-                next = (lum_file1->lmm_objects[stripe_count-1].l_ost_idx + 1)
-                       ost_count;
+                int next, idx, stripe = stripe_count - 1;
+                next = (lum_file1->lmm_objects[stripe].l_ost_idx + 1) %
+                       ost_count;
                 idx = lum_file2->lmm_objects[0].l_ost_idx;
-                if (idx != next)
-                        return 10;
+                if (idx != next) {
+                        fprintf(stderr, "warning: non-sequential "
+                                "file1 stripe[%d] %d != file2 stripe[0] %d\n",
+                                stripe,
+                                lum_file1->lmm_objects[stripe].l_ost_idx, idx);
+                }
         }
 
         return 0;
@@ -154,9 +167,8 @@ int main(int argc, char **argv)
         rc = ioctl(dirfd(dir), LL_IOC_LOV_GETSTRIPE, lum_dir);
         if (rc) {
                 if (errno == ENODATA) {
-                        lum_dir->lmm_stripe_size = 0;
-                        lum_dir->lmm_stripe_count = 0;
-                        lum_dir->lmm_stripe_offset = -1;
+                        free(lum_dir);
+                        lum_dir = NULL;
                 } else {
                         rc = errno;
                         goto cleanup;
index 5dbd9d1..0b8bd3a 100755 (executable)
@@ -17,7 +17,7 @@ NETTYPE=${NETTYPE:-tcp}
 OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`}
 OSTSIZE=${OSTSIZE:-400000}
 
-CLIENTOPT=${CLIENTOPT:-"user_xattr"}
+CLIENTOPT="user_xattr,${CLIENTOPT:-""}"
 
 # specific journal size for the ost, in MB
 JSIZE=${JSIZE:-0}
@@ -55,8 +55,7 @@ ${LMC} --add ost --node localhost --lov lov1 --fstype $FSTYPE \
        $OST_MOUNT_OPTS --size $OSTSIZE $JARG $OSTOPT || exit 30
 
 # create client config
-[ "x$CLIENTOPT" != "x" ] &&
-    CLIENTOPT="--clientoptions $CLIENTOPT"
+[ "x$CLIENTOPT" != "x" ] && CLIENTOPT="--clientoptions $CLIENTOPT"
 
 ${LMC} --add mtpt --node localhost --path $MOUNT \
        --mds mds1 --lov lov1 $CLIENTOPT || exit 40
index ec76b32..1f7be8b 100755 (executable)
@@ -26,6 +26,8 @@ ECHO_CLIENT=${ECHO_CLIENT:-}
 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-$((OSTCOUNT -1))}
 
+CLIENTOPT="user_xattr,${CLIENTOPT:-""}"
+
 # specific journal size for the ost, in MB
 JSIZE=${JSIZE:-0}
 JARG=""
@@ -57,6 +59,7 @@ done
 
 if [ -z "$ECHO_CLIENT" ]; then
        # create client config
+       [ "x$CLIENTOPT" != "x" ] && CLIENTOPT="--clientoptions $CLIENTOPT"
        ${LMC} --add mtpt --node localhost --path $MOUNT \
                --mds mds1 --lov lov1 $CLIENTOPT || exit 40
        ${LMC} --add mtpt --node client --path $MOUNT2 \
index 907f853..3b2f7e7 100755 (executable)
@@ -78,6 +78,7 @@ rm -f $OOS
 
 if [ $SUCCESS -eq 1 ]; then
        echo "Success!"
+       rm -f $LOG
 else
        exit 1
 fi
index 782784d..b028760 100644 (file)
@@ -78,6 +78,7 @@ rm -f $OOS $OOS2
 
 if [ $SUCCESS -eq 1 ]; then
        echo "Success!"
+       rm -f $LOG $LOG2
 else
        exit 1
 fi
index 40e02f2..4b276a0 100644 (file)
@@ -313,7 +313,7 @@ test_6a() {
 run_test 6a "touch .../f6a; chmod .../f6a ======================"
 
 test_6b() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6b" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        if [ ! -f $DIR/f6a ]; then
                touch $DIR/f6a
                chmod 0666 $DIR/f6a
@@ -324,7 +324,7 @@ test_6b() {
 run_test 6b "$RUNAS chmod .../f6a (should return error) =="
 
 test_6c() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6c" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        touch $DIR/f6c
        chown $RUNAS_ID $DIR/f6c || error
        $CHECKSTAT -t file -u \#$RUNAS_ID $DIR/f6c || error
@@ -332,7 +332,7 @@ test_6c() {
 run_test 6c "touch .../f6c; chown .../f6c ======================"
 
 test_6d() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6d" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        if [ ! -f $DIR/f6c ]; then
                touch $DIR/f6c
                chown $RUNAS_ID $DIR/f6c
@@ -343,7 +343,7 @@ test_6d() {
 run_test 6d "$RUNAS chown .../f6c (should return error) =="
 
 test_6e() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6e" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        touch $DIR/f6e
        chgrp $RUNAS_ID $DIR/f6e || error
        $CHECKSTAT -t file -u \#$UID -g \#$RUNAS_ID $DIR/f6e || error
@@ -351,7 +351,7 @@ test_6e() {
 run_test 6e "touch .../f6e; chgrp .../f6e ======================"
 
 test_6f() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6f" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        if [ ! -f $DIR/f6e ]; then
                touch $DIR/f6e
                chgrp $RUNAS_ID $DIR/f6e
@@ -362,7 +362,7 @@ test_6f() {
 run_test 6f "$RUNAS chgrp .../f6e (should return error) =="
 
 test_6g() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6g" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
         mkdir $DIR/d6g || error
         chmod 777 $DIR/d6g || error
         $RUNAS mkdir $DIR/d6g/d || error
@@ -373,7 +373,7 @@ test_6g() {
 run_test 6g "Is new dir in sgid dir inheriting group?"
 
 test_6h() { # bug 7331
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 6f" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        touch $DIR/f6h || error "touch failed"
        chown $RUNAS_ID:$RUNAS_ID $DIR/f6h || error "initial chown failed"
        $RUNAS -G$RUNAS_ID chown $RUNAS_ID:0 $DIR/f6h && error "chown worked"
@@ -531,7 +531,7 @@ test_19b() {
 run_test 19b "ls -l .../f19 (should return error) =============="
 
 test_19c() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 19c" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        $RUNAS touch $DIR/f19 && error || true
 }
 run_test 19c "$RUNAS touch .../f19 (should return error) =="
@@ -991,7 +991,7 @@ exhaust_all_precreations() {
 }
 
 test_27n() {
-       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping test" && return
+       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping $TESTNAME" && return
 
        reset_enospc
        rm -f $DIR/d27/f27n
@@ -1004,7 +1004,7 @@ test_27n() {
 run_test 27n "create file with some full OSTs =================="
 
 test_27o() {
-       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping test" && return
+       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping $TESTNAME" && return
 
        reset_enospc
        rm -f $DIR/d27/f27o
@@ -1017,7 +1017,7 @@ test_27o() {
 run_test 27o "create file with all full OSTs (should error) ===="
 
 test_27p() {
-       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping test" && return
+       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping $TESTNAME" && return
 
        reset_enospc
        rm -f $DIR/d27/f27p
@@ -1035,7 +1035,7 @@ test_27p() {
 run_test 27p "append to a truncated file with some full OSTs ==="
 
 test_27q() {
-       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping test" && return
+       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping $TESTNAME" && return
 
        reset_enospc
        rm -f $DIR/d27/f27q
@@ -1054,7 +1054,7 @@ test_27q() {
 run_test 27q "append to truncated file with all OSTs full (should error) ==="
 
 test_27r() {
-       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping test" && return
+       [ "$OSTCOUNT" -lt "2" -o -z "$MDS" ] && echo "skipping $TESTNAME" && return
 
        reset_enospc
        rm -f $DIR/d27/f27r
@@ -1515,7 +1515,7 @@ test_36d() {
 run_test 36d "non-root OST utime check (open, utime) ==========="
 
 test_36e() {
-       [ $RUNAS_ID -eq $UID ] && echo "skipping test 36e" && return
+       [ $RUNAS_ID -eq $UID ] && echo "skipping $TESTNAME" && return
        [ ! -d $DIR/d36 ] && mkdir $DIR/d36
        touch $DIR/d36/f36e
        $RUNAS utime $DIR/d36/f36e && error "utime worked, want failure" || true
@@ -1713,6 +1713,7 @@ test_43a() {
         multiop $DIR/d43/multiop Oc && error "expected error, got success"
         kill -USR1 $MULTIPID || return 2
         wait $MULTIPID || return 3
+        rm $TMP/test43.junk
 }
 run_test 43a "open(RDWR) of file being executed should return -ETXTBSY"
 
@@ -1725,6 +1726,7 @@ test_43b() {
         truncate $DIR/d43/multiop 0 && error "expected error, got success"
         kill -USR1 $MULTIPID || return 2
         wait $MULTIPID || return 3
+        rm $TMP/test43.junk
 }
 run_test 43b "truncate of file being executed should return -ETXTBSY"
 
@@ -1977,7 +1979,7 @@ export NUMTEST=70000
 test_51b() {
        NUMFREE=`df -i -P $DIR | tail -n 1 | awk '{ print $4 }'`
        [ $NUMFREE -lt 21000 ] && \
-               echo "skipping test 51b, not enough free inodes ($NUMFREE)" && \
+               echo "skipping $TESTNAME, not enough free inodes ($NUMFREE)" && \
                return
 
        check_kernel_version 40 || NUMTEST=31000
@@ -1989,7 +1991,7 @@ test_51b() {
 run_test 51b "mkdir .../t-0 --- .../t-$NUMTEST ===================="
 
 test_51c() {
-       [ ! -d $DIR/d51b ] && echo "skipping test 51c: $DIR/51b missing" && \
+       [ ! -d $DIR/d51b ] && echo "skipping $TESTNAME: $DIR/51b missing" && \
                return
 
        unlinkmany -d $DIR/d51b/t- $NUMTEST
@@ -2129,7 +2131,7 @@ check_fstype() {
 test_55() {
         rm -rf $DIR/d55
         mkdir $DIR/d55
-        check_fstype && echo "can't find fs $FSTYPE, skipping test 55" && return
+        check_fstype && echo "can't find fs $FSTYPE, skipping $TESTNAME" && return
         mount -t $FSTYPE -o loop,iopen $EXT2_DEV $DIR/d55 || error "mounting"
         touch $DIR/d55/foo
         $IOPENTEST1 $DIR/d55/foo $DIR/d55 || error "running $IOPENTEST1"
@@ -2142,6 +2144,7 @@ run_test 55 "check iopen_connect_dentry() ======================"
 
 test_56() {
         rm -rf $DIR/d56
+        $LSTRIPE -d $DIR
         mkdir $DIR/d56
         mkdir $DIR/d56/dir
         NUMFILES=3
@@ -2381,7 +2384,7 @@ test_65d() {
        touch $DIR/d65/f4 $DIR/d65/f5
        $LVERIFY $DIR/d65 $DIR/d65/f4 $DIR/d65/f5 || error "lverify failed"
 }
-run_test 65d "directory setstripe $STRIPESIZE -1 $sc ======================"
+run_test 65d "directory setstripe $STRIPESIZE -1 $sc =============="
 
 test_65e() {
        mkdir -p $DIR/d65
@@ -2391,7 +2394,7 @@ test_65e() {
        touch $DIR/d65/f6
        $LVERIFY $DIR/d65 $DIR/d65/f6 || error "lverify failed"
 }
-run_test 65e "directory setstripe 0 -1 0 ============="
+run_test 65e "directory setstripe 0 -1 0 ======================="
 
 test_65f() {
        mkdir -p $DIR/d65f
@@ -2403,9 +2406,10 @@ test_65g() {
         mkdir -p $DIR/d65
         $LSTRIPE $DIR/d65 $(($STRIPESIZE * 2)) 0 1 || error "setstripe"
         $LSTRIPE -d $DIR/d65 || error "setstripe"
-        $LFS find -v $DIR/d65 | grep "$DIR/d65/ has no stripe info" || error "no stripe info failed"   
+        $LFS find -v $DIR/d65 | grep "$DIR/d65/ has no stripe info" || \
+               error "delete default stripe failed"    
 }
-run_test 65g "directory setstripe -d ========"
+run_test 65g "directory setstripe -d ==========================="
 
 test_65h() {
         mkdir -p $DIR/d65
@@ -2414,7 +2418,7 @@ test_65h() {
         [ "`$LFS find -v $DIR/d65 | grep "^count"`" == \
           "`$LFS find -v $DIR/d65/dd1 | grep "^count"`" ] || error "stripe info inherit failed"
 }
-run_test 65h "directory stripe info inherit ======"
+run_test 65h "directory stripe info inherit ===================="
  
 test_65i() { # bug6367
         $LSTRIPE $MOUNT 65536 -1 -1
@@ -2427,6 +2431,7 @@ test_65j() { # bug6367
                clean || error "failed to unmount"
                start || error "failed to remount"
        fi
+       $LSTRIPE -d $MOUNT || true
 }
 run_test 65j "get default striping on root directory (bug 6367)="
 
@@ -2441,7 +2446,7 @@ test_66() {
 run_test 66 "update inode blocks count on client ==============="
 
 test_67() { # bug 3285 - supplementary group fails on MDS, passes on client
-       [ "$RUNAS_ID" = "$UID" ] && echo "skipping test 67" && return
+       [ "$RUNAS_ID" = "$UID" ] && echo "skipping $TESTNAME" && return
        check_kernel_version 35 || return 0
        mkdir $DIR/d67
        chmod 771 $DIR/d67
@@ -2479,8 +2484,8 @@ swap_used() {
 # excercise swapping to lustre by adding a high priority swapfile entry
 # and then consuming memory until it is used.
 test_68() {
-       [ "$UID" != 0 ] && echo "skipping test 68 (must run as root)" && return
-       [ "`lsmod|grep obdfilter`" ] && echo "skipping test 68 (local OST)" && \
+       [ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
+       [ "`lsmod|grep obdfilter`" ] && echo "skipping $TESTNAME (local OST)" && \
                return
 
        find_loop_dev
@@ -2508,7 +2513,7 @@ run_test 68 "support swapping to Lustre ========================"
 # #define OBD_FAIL_OST_ENOENT 0x217
 test_69() {
        [ -z "`lsmod|grep obdfilter`" ] &&
-               echo "skipping test 69 (remote OST)" && return
+               echo "skipping $TESTNAME (remote OST)" && return
 
        f="$DIR/f69"
        touch $f
@@ -2564,7 +2569,7 @@ run_test 71 "Running dbench on lustre (don't segment fault) ===="
 
 test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly
        check_kernel_version 43 || return 0
-       [ "$RUNAS_ID" = "$UID" ] && echo "skipping test 72" && return
+       [ "$RUNAS_ID" = "$UID" ] && echo "skipping $TESTNAME" && return
        touch $DIR/f72
        chmod 777 $DIR/f72
        chmod ug+s $DIR/f72
@@ -2697,7 +2702,7 @@ test_101() {
        # randomly read 10000 of 64K chunks from 200M file.
        #
        nreads=10000
-       $RANDOM_READS -f $DIR/f101 -s200000000 -b65536 -C -n$nreads -t 300
+       $RANDOM_READS -f $DIR/f101 -s200000000 -b65536 -C -n$nreads -t 180
 
        discard=0
        for s in $LPROC/llite/*/read_ahead_stats ;do
@@ -2718,6 +2723,8 @@ test_102() {
        rm -f $testfile
         touch $testfile
 
+       [ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
+       [ -z "`mount | grep " $DIR .*\<user_xattr\>"`" ] && echo "skipping $TESTNAME (must have user_xattr)" && return
        echo "set/get xattr..."
         setfattr -n trusted.name1 -v value1 $testfile || error
         [ "`getfattr -n trusted.name1 $testfile 2> /dev/null | \
@@ -2750,6 +2757,8 @@ test_102() {
 
        echo "set lustre specific xattr (should be denied)..."
        setfattr -n "trusted.lov" -v "invalid value" $testfile || true
+
+       rm -f $testfile
 }
 run_test 102 "user xattr test ====================="
 
index f5f4d14..234b12c 100644 (file)
@@ -254,6 +254,7 @@ test_10b() {
        yes "R" | dd of=$TMP/f10b bs=3k count=1 || error "dd random"
        truncate $TMP/f10b 4096 || error "truncate 4096"
        cmp $TMP/f10b $TMP/f10b-lustre || error "file miscompare"
+       rm $TMP/f10b $TMP/f10b-lustre
 }
 run_test 10b "write of file with sub-page size on multiple mounts "
 
@@ -311,6 +312,7 @@ test_14a() {
         multiop $DIR2/d14/multiop Oc && error "expected error, got success"
         kill -USR1 $MULTIPID || return 2
         wait $MULTIPID || return 3
+        rm $TMP/test14.junk
 }
 run_test 14a "open(RDWR) of executing file returns -ETXTBSY ===="
 
@@ -323,6 +325,7 @@ test_14b() { # bug 3192
         truncate $DIR2/d14/multiop 0 && error "expected error, got success"
         kill -USR1 $MULTIPID || return 2
         wait $MULTIPID || return 3
+        rm $TMP/test14.junk
 }
 run_test 14b "truncate of executing file returns -ETXTBSY ======"
 
@@ -336,6 +339,7 @@ test_14c() { # bug 3430
        kill -USR1 $MULTIPID || return 2
        wait $MULTIPID || return 3
        #cmp `which multiop` $DIR1/d14/multiop || error "binary changed"
+       rm $TMP/test14.junk
 }
 run_test 14c "open(O_TRUNC) of executing file return -ETXTBSY =="
 
index a9480a8..0157297 100644 (file)
@@ -22,6 +22,8 @@ OSTFAILOVER=${OSTFAILOVER:-}
 MOUNT=${MOUNT:-/mnt/lustre}
 FSTYPE=${FSTYPE:-ext3}
 
+CLIENTOPT="user_xattr,${CLIENTOPT:-""}"
+
 NETTYPE=${NETTYPE:-tcp}
 NIDTYPE=${NIDTYPE:-$NETTYPE}
 
@@ -119,6 +121,7 @@ for NODE in $OSTNODES; do
 done
 
 # create client config(s)
+[ "x$CLIENTOPT" != "x" ] && CLIENTOPT="--clientoptions $CLIENTOPT"
 echo; echo -n "adding CLIENT on:"
 for NODE in $CLIENTS; do
        echo -n " $NODE"
index c4e7c22..2aead1d 100644 (file)
@@ -309,8 +309,8 @@ void lov_dump_user_lmm_v1(struct lov_user_md_v1 *lum, char *dname, char *fname,
 {
         int i, obdstripe = 0;
 
-        if (*fname != '\0' && obdindex != OBD_NOT_FOUND) {
-                for (i = 0; i < lum->lmm_stripe_count; i++) {
+        if (obdindex != OBD_NOT_FOUND) {
+                for (i = 0; fname[0] && i < lum->lmm_stripe_count; i++) {
                         if (obdindex == lum->lmm_objects[i].l_ost_idx) {
                                 printf("%s/%s\n", dname, fname);
                                 obdstripe = 1;
index 525f995..f9909ac 100644 (file)
@@ -68,14 +68,14 @@ void usage(FILE *out)
                 "\t-n|--nomtab: do not update /etc/mtab after mount\n"
                 "\t-v|--verbose: print verbose config settings\n"
                 "\t-o: filesystem mount options:\n"
-                "\t\tflock/noflock: enable/disable flock support\n"
-                "\t\tnettype={tcp,elan,iibnal,lonal}: network type\n"
                 "\t\tcluster_id=0xNNNN: cluster this node is part of\n"
+                "\t\t{no}flock: enable/disable flock support\n"
                 "\t\tlocal_nid=0xNNNN: client ID (default ipaddr or nodenum)\n"
-                "\t\tserver_nid=0xNNNN: server node ID (default mdsnode)\n"
+                "\t\tnettype={tcp,elan,openib,vib,iib,lo,gm}: network type\n"
                 "\t\tport=NNN: server port (default 988 for tcp)\n"
                 "\t\troute=<gw>[-<gw>]:<low>[-<high>]: portal route to MDS\n"
-                "\t\tuser_xattr: enable manipulating user xattr\n");
+                "\t\tserver_nid=0xNNNN: server node ID (default mdsnode)\n"
+                "\t\t{no}user_xattr: enable/disable manipulating user xattr\n");
         exit(out != stdout);
 }
 
@@ -265,7 +265,7 @@ static const struct opt_map opt_map[] = {
   { "nodev",    0, 0, MS_NODEV,  0 },      /* don't interpret devices */
   { "async",    0, 1, MS_SYNCHRONOUS, 0},  /* asynchronous I/O */
   { "auto",     0, 0, 0, 0         },      /* Can be mounted using -a */
-  { "noauto",   0, 0, 0, 0         },      /* Can  only be mounted explicitly */
+  { "noauto",   0, 0, 0, 0         },      /* Can only be mounted explicitly */
   { "nousers",  0, 1, 0, 0         },      /* Forbid ordinary user to mount */
   { "nouser",   0, 1, 0, 0         },      /* Forbid ordinary user to mount */
   { "noowner",  0, 1, 0, 0         },      /* Device owner has no special privs */
@@ -273,6 +273,8 @@ static const struct opt_map opt_map[] = {
   { "flock",    0, 0, 0, LMD_FLG_FLOCK},   /* Enable flock support */
   { "noflock",  1, 1, 0, LMD_FLG_FLOCK},   /* Disable flock support */
   { "user_xattr", 0, 0, 0, LMD_FLG_USER_XATTR}, /* Enable get/set user xattr */
+  { "nouser_xattr", 1, 1, 0, LMD_FLG_USER_XATTR}, /* Disable user xattr */
+  /* please add new mount options to usage message */
   { NULL,       0, 0, 0, 0         }
 };
 /****************************************************************************/