From: Madan Valluri Date: Wed, 31 Jan 2007 04:11:16 +0000 (+0000) Subject: xfs_repair - 031 QA failure with platform that don't use the uuid field in the super... X-Git-Tag: v2.9.0~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e321f6295d0077bf1bca22bfcefff2cf8d14b355;p=thirdparty%2Fxfsprogs-dev.git xfs_repair - 031 QA failure with platform that don't use the uuid field in the super block. Darwin has uuid. --- diff --git a/libxfs/darwin.c b/libxfs/darwin.c index ee93c2cbf..3bf1eb482 100644 --- a/libxfs/darwin.c +++ b/libxfs/darwin.c @@ -22,6 +22,7 @@ #include #include +int platform_has_uuid = 1; extern char *progname; int diff --git a/libxfs/freebsd.c b/libxfs/freebsd.c index 883d0d604..abae71b98 100644 --- a/libxfs/freebsd.c +++ b/libxfs/freebsd.c @@ -22,6 +22,7 @@ #include #include +int platform_has_uuid = 1; extern char *progname; int diff --git a/libxfs/init.h b/libxfs/init.h index e0cf92d84..1cb2b587f 100644 --- a/libxfs/init.h +++ b/libxfs/init.h @@ -34,5 +34,6 @@ extern int platform_direct_blockdev (void); extern int platform_align_blockdev (void); extern int platform_aio_init (int aio_count); extern int platform_nproc(void); +extern int platform_has_uuid; #endif /* LIBXFS_INIT_H */ diff --git a/libxfs/irix.c b/libxfs/irix.c index 081d636a4..99d75b8e8 100644 --- a/libxfs/irix.c +++ b/libxfs/irix.c @@ -21,6 +21,7 @@ #include #include +int platform_has_uuid = 0; extern char *progname; extern __int64_t findsize(char *); diff --git a/libxfs/linux.c b/libxfs/linux.c index de64d333d..ef59c77db 100644 --- a/libxfs/linux.c +++ b/libxfs/linux.c @@ -26,6 +26,7 @@ #include #include +int platform_has_uuid = 1; extern char *progname; static int max_block_alignment; diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index 040356a0c..b26b0e1ca 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -258,13 +258,14 @@ xlog_find_head( uint first_half_cycle, last_half_cycle; uint stop_on_cycle; int error, log_bbnum = log->l_logBBsize; + extern int platform_has_uuid; /* Is the end of the log device zeroed? */ if ((error = xlog_find_zeroed(log, &first_blk)) == -1) { *return_head_blk = first_blk; /* Is the whole lot zeroed? */ - if (!first_blk) { + if (!first_blk && platform_has_uuid) { /* Linux XFS shouldn't generate totally zeroed logs - * mkfs etc write a dummy unmount record to a fresh * log so we can store the uuid in there