public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: xfs@oss.sgi.com
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
Date: Fri, 19 Jun 2009 16:28:21 -0400	[thread overview]
Message-ID: <1245443301-27495-1-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <7D909252-70A0-44C2-A5D7-D56A4B6CD244@sgi.com>

The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
same check for a block device as XFS and UDF, and not the test for
NFS, which was checking for host:/foo/bar/baz when checking for a
scratch device.

Also, the NFS logic was also incorrect, in that it would allow a
zero-length SCRATCH_DEV to continue.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---

Oops, I sent the wrong version of the patch earlier.  Sorry about that!!

      	     	       	       	  - Ted
 common.rc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common.rc b/common.rc
index 581cfba..cfab2cd 100644
--- a/common.rc
+++ b/common.rc
@@ -593,7 +593,7 @@ _supported_os()
 _require_scratch()
 {
     case "$FSTYP" in
-	xfs|udf)
+	xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
 		 if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
 		 then
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
@@ -603,9 +603,9 @@ _require_scratch()
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
 		 fi
 		 ;;
-	nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
+	nfs*)
 		 echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
-		 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
+		 if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]
 		 then
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
 		 fi
-- 
1.6.3.2.1.gb9f7d.dirty

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-06-19 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 17:53 [PATCH 1/3] Skip _check_test_fs unless a test is actually run Theodore Ts'o
2009-06-19 17:53 ` [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional Theodore Ts'o
2009-06-20 17:15   ` Christoph Hellwig
2009-06-19 17:53 ` [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs Theodore Ts'o
2009-06-19 19:16   ` Felix Blyakher
2009-06-19 20:28     ` Theodore Ts'o [this message]
2009-06-20 17:07       ` [PATCH] " Christoph Hellwig
2009-06-19 19:05 ` [PATCH 1/3] Skip _check_test_fs unless a test is actually run Felix Blyakher
2009-06-20 17:02 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245443301-27495-1-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox