#
PKG_MAJOR=2
PKG_MINOR=6
-PKG_REVISION=14
+PKG_REVISION=15
PKG_BUILD=1
#include "check.h"
#include "command.h"
#include "io.h"
+#include "sb.h"
#include "output.h"
#include "type.h"
#include "init.h"
mp->m_sb.sb_magicnum);
return 0;
}
+ if (!sb_logcheck())
+ return 0;
rt = mp->m_sb.sb_rextents != 0;
dbmap = xmalloc((mp->m_sb.sb_agcount + rt) * sizeof(*dbmap));
inomap = xmalloc((mp->m_sb.sb_agcount + rt) * sizeof(*inomap));
/* workaround craziness in the xlog routines */
int xlog_recover_do_trans(xlog_t *log, xlog_recover_t *t, int p) { return 0; }
-static int
-zero_log(uuid_t *uuidp)
+int
+sb_logcheck(void)
{
xlog_t log;
xfs_daddr_t head_blk, tail_blk;
"of the filesystem before doing this.\n", progname);
return 0;
}
+ return 1;
+}
+
+static int
+sb_logzero(uuid_t *uuidp)
+{
+ if (!sb_logcheck())
+ return 0;
dbprintf("Clearing log and setting UUID\n");
- if (libxfs_log_clear(log.l_dev,
+ if (libxfs_log_clear(
+ (mp->m_sb.sb_logstart == 0) ? x.logdev : x.ddev,
XFS_FSB_TO_DADDR(mp, mp->m_sb.sb_logstart),
(xfs_extlen_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks),
uuidp,
}
/* clear the log (setting uuid) if its not dirty */
- if (!zero_log(&uu))
+ if (!sb_logzero(&uu))
return 0;
dbprintf("writing all SBs\n");
extern const struct field sb_hfld[];
extern void sb_init(void);
+extern int sb_logcheck(void);
extern int sb_size(void *obj, int startoff, int idx);
#
OPTS=" "
-ISFILE=" "
-USAGE="Usage: xfs_check [-fsvV] [-i ino]... [-b bno]... special"
+DBOPTS=" "
+USAGE="Usage: xfs_check [-fsvV] [-l logdev] [-i ino]... [-b bno]... special"
-while getopts "b:fi:stvV" c
+while getopts "b:fi:l:stvV" c
do
case $c in
s) OPTS=$OPTS"-s ";;
V) OPTS=$OPTS"-V ";;
i) OPTS=$OPTS"-i "$OPTARG" ";;
b) OPTS=$OPTS"-b "$OPTARG" ";;
- f) ISFILE=" -f";;
+ f) DBOPTS=$DBOPTS" -f";;
+ l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
\?) echo $USAGE 1>&2
exit 2
;;
set -- extra $@
shift $OPTIND
case $# in
- 1) xfs_db$ISFILE -i -p xfs_check -c "check$OPTS" $1
+ 1) xfs_db$DBOPTS -i -p xfs_check -c "check$OPTS" $1
status=$?
;;
*) echo $USAGE 1>&2
#
OPTS=" "
-ISFILE=" "
-USAGE="Usage: xfs_check64 [-fsvV] [-i ino]... [-b bno]... special"
+DBOPTS=" "
+USAGE="Usage: xfs_check64 [-fsvV] [-l logdev] [-i ino]... [-b bno]... special"
-while getopts "b:fi:stvV" c
+while getopts "b:fi:l:stvV" c
do
case $c in
s) OPTS=$OPTS"-s ";;
V) OPTS=$OPTS"-V ";;
i) OPTS=$OPTS"-i "$OPTARG" ";;
b) OPTS=$OPTS"-b "$OPTARG" ";;
- f) ISFILE=" -f";;
+ f) DBOPTS=" -f";;
+ l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
\?) echo $USAGE 1>&2
exit 2
;;
set -- extra $@
shift $OPTIND
case $# in
- 1) xfs_db64$ISFILE -i -p xfs_check64 -c "check$OPTS" $1
+ 1) xfs_db64$DBOPTS -i -p xfs_check64 -c "check$OPTS" $1
status=$?
;;
*) echo $USAGE 1>&2
#
OPTS=" "
-ISFILE=" "
-USAGE="usage: xfs_ncheck [-sfV] [-i ino]... special"
+DBOPTS=" "
+USAGE="usage: xfs_ncheck [-sfV] [-l logdev] [-i ino]... special"
-while getopts "b:fi:svV" c
+while getopts "b:fi:l:svV" c
do
case $c in
s) OPTS=$OPTS"-s ";;
i) OPTS=$OPTS"-i "$OPTARG" ";;
v) OPTS=$OPTS"-v ";;
V) OPTS=$OPTS"-V ";;
- f) ISFILE=" -f";;
+ f) DBOPTS=$DBOPTS" -f";;
+ l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
\?) echo $USAGE 1>&2
exit 2
;;
set -- extra $@
shift $OPTIND
case $# in
- 1) xfs_db$ISFILE -r -p xfs_ncheck -c "blockget -ns" -c "ncheck$OPTS" $1
+ 1) xfs_db$DBOPTS -r -p xfs_ncheck -c "blockget -ns" -c "ncheck$OPTS" $1
status=$?
;;
*) echo $USAGE 1>&2
#
OPTS=" "
-ISFILE=" "
-USAGE="usage: xfs_ncheck64 [-sfvV] [-i ino]... special"
+DBOPTS=" "
+USAGE="usage: xfs_ncheck64 [-sfvV] [-l logdev] [-i ino]... special"
-
-while getopts "b:fi:svV" c
+while getopts "b:fi:l:svV" c
do
case $c in
s) OPTS=$OPTS"-s ";;
i) OPTS=$OPTS"-i "$OPTARG" ";;
v) OPTS=$OPTS"-v ";;
V) OPTS=$OPTS"-V ";;
- f) ISFILE=" -f";;
+ f) DBOPTS=" -f";;
+ l) DBOPTS=$DBOPTS" -l "$OPTARG" ";;
\?) echo $USAGE 1>&2
exit 2
;;
set -- extra $@
shift $OPTIND
case $# in
- 1) xfs_db64$ISFILE -r -p xfs_ncheck64 -c "blockget -ns" -c "ncheck$OPTS" $1
+ 1) xfs_db64$DBOPTS -r -p xfs_ncheck64 -c "blockget -ns" -c "ncheck$OPTS" $1
status=$?
;;
*) echo $USAGE 1>&2
+xfsprogs (2.6.15-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Nathan Scott <nathans@debian.org> Wed, 09 Jun 2004 21:10:14 +1000
+
xfsprogs (2.6.14-1) unstable; urgency=low
* New upstream release.
+xfsprogs-2.6.15 (09 June 2004)
+ - Make xfs_check test for a dirty log before proceeding to
+ check the filesystem.
+ - Fix couple of minor bugs in xfs_io (readonly handling on
+ writes, off-by-one error in open file error reporting).
+
xfsprogs-2.6.14 (13 May 2004)
- Allow logprint to copy a log to a file (-C) and to dump
a log from beginning to end showing ondisk log record (-d).
xfs_check \- check XFS filesystem consistency
.SH SYNOPSIS
.nf
-\f3xfs_check\f1 [ \f3\-i\f1 ino ] ... [ \f3\-b\f1 bno ] ... \c
-[ \f3\-s\f1 ] [ \f3\-v\f1 ] xfs_special
+\f3xfs_check\f1 [ \f3\-i\f1 ino ] ... [ \f3\-b\f1 bno ] ...
+ [ \f3\-s\f1 ] [ \f3\-v\f1 ] [ \f3\-l\f1 logdev ] xfs_special
.sp .8v
-\f3xfs_check\f1 \f3\-f\f1 [ \f3\-i\f1 ino ] ... [ \f3\-b\f1 bno ] ... \c
-[ \f3\-s\f1 ] [ \f3\-v\f1 ] file
+\f3xfs_check\f1 \f3\-f\f1 [ \f3\-i\f1 ino ] ... [ \f3\-b\f1 bno ] ...
+ [ \f3\-s\f1 ] [ \f3\-v\f1 ] [ \f3\-l\f1 logdev ] file
.fi
.SH DESCRIPTION
.I xfs_check
This might happen if an image copy
of a filesystem has been made into an ordinary file.
.TP
+.B \-l
+Specifies the device special file where the filesystem's external
+log resides.
+Only for those filesystems which use an external log.
+See the
+\f2mkfs.xfs\f1 \f3\-l\f1 option, and refer to
+.IR xfs (5)
+for a detailed description of the XFS log.
+.TP
.B \-s
Specifies that only serious errors should be reported.
Serious errors are those that make it impossible to find major data
xfs_ncheck \- generate pathnames from i-numbers for XFS
.SH SYNOPSIS
.nf
-\f3xfs_ncheck\f1 [ \f3\-i\f1 ino ] ... \c
-[ \f3\-s\f1 ] xfs_special
+\f3xfs_ncheck\f1 [ \f3\-i\f1 ino ] ...
+ [ \f3\-s\f1 ] [ \f3\-l\f1 logdev ] xfs_special
.sp .8v
-\f3xfs_ncheck\f1 \f3\-f\f1 [ \f3\-i\f1 ino ] ... \c
-[ \f3\-s\f1 ] file
+\f3xfs_ncheck\f1 \f3\-f\f1 [ \f3\-i\f1 ino ] ...
+ [ \f3\-s\f1 ] [ \f3\-l\f1 logdev ] file
.fi
.SH DESCRIPTION
.I xfs_ncheck
This might happen if an image copy
of a filesystem has been made into an ordinary file.
.TP
+.B \-l
+Specifies the device special file where the filesystem's external
+log resides.
+Only for those filesystems which use an external log.
+See the
+\f2mkfs.xfs\f1 \f3\-l\f1 option, and refer to
+.IR xfs (5)
+for a detailed description of the XFS log.
+.TP
.B \-s
Limits the report to special files and files with setuserid mode.
This option may be used to detect violations of security policy.