]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/xfs_metadump.sh
xfs_repair: invalidate dirty dir buffers when we zap a directory
[thirdparty/xfsprogs-dev.git] / db / xfs_metadump.sh
1 #!/bin/sh -f
2 #
3 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
4 #
5
6 OPTS=" "
7 DBOPTS=" "
8 USAGE="Usage: xfs_metadump [-aefFogwV] [-m max_extents] [-l logdev] source target"
9
10 while getopts "aefgl:m:owFV" c
11 do
12 case $c in
13 a) OPTS=$OPTS"-a ";;
14 e) OPTS=$OPTS"-e ";;
15 g) OPTS=$OPTS"-g ";;
16 m) OPTS=$OPTS"-m "$OPTARG" ";;
17 o) OPTS=$OPTS"-o ";;
18 w) OPTS=$OPTS"-w ";;
19 f) DBOPTS=$DBOPTS" -f";;
20 l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
21 F) DBOPTS=$DBOPTS" -F";;
22 V) xfs_db -p xfs_metadump -V
23 status=$?
24 exit $status
25 ;;
26 \?) echo $USAGE 1>&2
27 exit 2
28 ;;
29 esac
30 done
31 set -- extra $@
32 shift $OPTIND
33 case $# in
34 2) xfs_db$DBOPTS -i -p xfs_metadump -c "metadump$OPTS $2" $1
35 status=$?
36 ;;
37 *) echo $USAGE 1>&2
38 exit 2
39 ;;
40 esac
41 exit $status