From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 2/8 v4] common/rc: add _require_bmap
Date: Tue, 3 Feb 2015 15:07:14 -0800 [thread overview]
Message-ID: <1423004840-45315-3-git-send-email-jaegeuk@kernel.org> (raw)
In-Reply-To: <1423004840-45315-1-git-send-email-jaegeuk@kernel.org>
This is to detect whether the filesystem tool supports bmap or not.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/config | 2 ++
common/rc | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/common/config b/common/config
index 235f4a1..9fb3703 100644
--- a/common/config
+++ b/common/config
@@ -168,6 +168,7 @@ if [ -n "$__XFSDUMP_PROG" ]; then
else
export XFSDUMP_PROG=""
fi
+export BMAP_XFS_PROG="`set_prog_path xfs_bmap`"
export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
export GETFATTR_PROG="`set_prog_path getfattr`"
@@ -220,6 +221,7 @@ case "$HOSTOS" in
export MKFS_UDF_PROG="`set_prog_path mkudffs`"
export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
export MKFS_F2FS_PROG="`set_prog_path mkfs.f2fs`"
+ export BMAP_F2FS_PROG="`set_prog_path fibmap.f2fs`"
export BTRFS_UTIL_PROG="`set_prog_path btrfs`"
export BTRFS_SHOW_SUPER_PROG="`set_prog_path btrfs-show-super`"
export XFS_FSR_PROG="`set_prog_path xfs_fsr`"
diff --git a/common/rc b/common/rc
index 438cd51..d413721 100644
--- a/common/rc
+++ b/common/rc
@@ -2331,6 +2331,24 @@ _require_scratch_shutdown()
_scratch_unmount
}
+# Does bmap work on this fs?
+_require_bmap()
+{
+ case "$FSTYP" in
+ xfs)
+ _require_command $BMAP_XFS_PROG
+ export BMAP_PROG=$BMAP_XFS_PROG
+ ;;
+ f2fs)
+ _require_command $BMAP_F2FS_PROG
+ export BMAP_PROG=$BMAP_F2FS_PROG
+ ;;
+ *)
+ _notrun "$FSTYP does not support bmap"
+ ;;
+ esac
+}
+
# arg 1 is dev to remove and is output of the below eg.
# ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
_devmgt_remove()
--
2.1.1
next prev parent reply other threads:[~2015-02-03 23:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 23:07 [PATCH 0/8 v4] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
2015-02-03 23:07 ` [PATCH 1/8 v4] common/rc: add _require_scratch_shtudown Jaegeuk Kim
2015-02-05 2:01 ` Dave Chinner
2015-02-03 23:07 ` Jaegeuk Kim [this message]
2015-02-05 2:05 ` [PATCH 2/8 v4] common/rc: add _require_bmap Dave Chinner
2015-02-03 23:07 ` [PATCH 3/8 v4] common/rc: add _require_norecovery Jaegeuk Kim
2015-02-05 2:08 ` Dave Chinner
2015-02-03 23:07 ` [PATCH 4/8 v4] tests/xfs: convert 10 xfs's tests to be generic ones Jaegeuk Kim
2015-02-05 2:11 ` Dave Chinner
2015-02-03 23:07 ` [PATCH 5/8 v4] tests/generic: relocate xfs's tests into tests/generic/ Jaegeuk Kim
2015-02-05 2:19 ` Dave Chinner
2015-02-03 23:07 ` [PATCH 6/8 v4] common/rc: define dump.f2fs and logstate for f2fs Jaegeuk Kim
2015-02-05 2:48 ` Dave Chinner
2015-02-03 23:07 ` [PATCH 7/8 v4] tests/xfs: add f2fs testcase and convert them being generic Jaegeuk Kim
2015-02-05 3:12 ` Dave Chinner
2015-02-03 23:07 ` [PATCH 8/8 v4] tests/generic: relocate four xfs's tests into tests/generic/ Jaegeuk Kim
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=1423004840-45315-3-git-send-email-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).