From: Nathan Scott Date: Wed, 23 Jun 2004 05:38:55 +0000 (+0000) Subject: Fix realtime device initialisation in userspace tools. X-Git-Tag: v2.7.0~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39798eb51c4aae16c801e5b4e07e69f3c0d06ecb;p=thirdparty%2Fxfsprogs-dev.git Fix realtime device initialisation in userspace tools. --- diff --git a/VERSION b/VERSION index 85dd2ad26..898d9f9ec 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=6 -PKG_REVISION=16 +PKG_REVISION=17 PKG_BUILD=1 diff --git a/debian/changelog b/debian/changelog index a43290fbb..47aec6e26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -xfsprogs (2.6.16-1) unstable; urgency=low +xfsprogs (2.6.17-1) unstable; urgency=low * New upstream release. - -- Nathan Scott Thu, 17 Jun 2004 15:16:25 +1000 + -- Nathan Scott Wed, 23 Jun 2004 15:05:51 +1000 xfsprogs (2.6.15-1) unstable; urgency=low diff --git a/doc/CHANGES b/doc/CHANGES index 4a81b460d..d6931187d 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,8 @@ +xfsprogs-2.6.17 (23 June 2004) + - Fix use of isset macro, getting realtime devices to + function correctly in xfs_db and xfs_repair. + - Fix initialisation of realtime devices in libxfs. + xfsprogs-2.6.16 (17 June 2004) - Add sendfile command into xfs_io(8) to exercise that functionality. diff --git a/libxfs/init.c b/libxfs/init.c index d8fad03ba..8ad6dfd8b 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -495,7 +495,8 @@ rtmount_inodes(xfs_mount_t *mp) */ static int rtmount_init( - xfs_mount_t *mp) /* file system mount structure */ + xfs_mount_t *mp, /* file system mount structure */ + int flags) { xfs_buf_t *bp; /* buffer for last block of subvolume */ xfs_daddr_t d; /* address of last block of subvolume */ @@ -504,7 +505,7 @@ rtmount_init( sbp = &mp->m_sb; if (sbp->sb_rblocks == 0) return 0; - if (mp->m_rtdev == 0) { + if (mp->m_rtdev == 0 && !(flags & LIBXFS_MOUNT_DEBUGGER)) { fprintf(stderr, _("%s: filesystem has a realtime subvolume\n"), progname); return -1; @@ -515,6 +516,13 @@ rtmount_init( sbp->sb_rbmblocks; mp->m_rsumsize = roundup(mp->m_rsumsize, sbp->sb_blocksize); mp->m_rbmip = mp->m_rsumip = NULL; + + /* + * Allow debugger to be run without the realtime device present. + */ + if (flags & LIBXFS_MOUNT_DEBUGGER) + return 0; + /* * Check that the realtime section is an ok size. */ @@ -660,7 +668,7 @@ libxfs_mount( } /* Initialize realtime fields in the mount structure */ - if (!(flags & LIBXFS_MOUNT_DEBUGGER) && rtmount_init(mp)) { + if (rtmount_init(mp, flags)) { fprintf(stderr, _("%s: realtime device init failed\n"), progname); return NULL; @@ -690,9 +698,7 @@ libxfs_mount( } ASSERT(mp->m_rootip != NULL); } - if ((flags & LIBXFS_MOUNT_ROOTINOS) && - !(flags & LIBXFS_MOUNT_DEBUGGER) && - rtmount_inodes(mp)) + if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) return NULL; return mp; }