]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
do some additional cleanup after autoconf has run. v2.3.0
authorNathan Scott <nathans@sgi.com>
Tue, 3 Sep 2002 02:15:45 +0000 (02:15 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 3 Sep 2002 02:15:45 +0000 (02:15 +0000)
Makefile
VERSION
bmap/xfs_bmap.c
debian/changelog
doc/CHANGES
growfs/xfs_growfs.c
mkfs/xfs_mkfs.c
rtcp/xfs_rtcp.c

index b37c0b95448185c7e28d5297f923565ec12bf67b..728a9032a1822b47c58453f3911fcc7b4d0dc34f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -85,4 +85,5 @@ install-dev: default
 
 realclean distclean: clean
        rm -f $(LDIRT) $(CONFIGURE)
+       rm -rf autom4te.cache
        [ ! -d Logs ] || rmdir Logs
diff --git a/VERSION b/VERSION
index 1dff2c48a7d4a335fa46f16f1ddffd3b05c5ce53..5acbc3844faef62c59eb30c0cd8948063b77613d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,6 +2,6 @@
 # This file is used by configure to get version information
 #
 PKG_MAJOR=2
-PKG_MINOR=2
-PKG_REVISION=3
+PKG_MINOR=3
+PKG_REVISION=0
 PKG_BUILD=0
index f70c95e3cb4f6b2f1652d6c8938191cae2799eb2..aa3fe360ba355fa2aeb247cbe2570e1b843f5909 100644 (file)
@@ -129,7 +129,7 @@ dofile(char *fname)
        struct getbmapx *map;
        int             map_size;
        int             loop = 0;
-       xfs_fsop_geom_t fsgeo;
+       xfs_fsop_geom_v1_t fsgeo;
 
        fd = open(fname, O_RDONLY);
        if (fd < 0) {
@@ -147,7 +147,7 @@ dofile(char *fname)
         }
 
        if (vflag) {
-               if (ioctl(fd, XFS_IOC_FSGEOMETRY, &fsgeo) < 0) {
+               if (ioctl(fd, XFS_IOC_FSGEOMETRY_V1, &fsgeo) < 0) {
                        fprintf(stderr, "%s: can't get geometry [\"%s\"]: %s\n",
                                progname, fname, strerror(errno));
                        close(fd);
index 85cfca34c717a51af979b1e967c2aeacd6f6defc..702454e2ba8523dce0639f381d7bc9d0b5a52fc7 100644 (file)
@@ -1,3 +1,11 @@
+xfsprogs (2.3.0-1) unstable; urgency=low
+
+  * New upstream release
+  * Improve backwards compatibility of tools using the XFS geometry
+    ioctl for older kernel versions which don't support the new ioctl
+
+ -- Nathan Scott <nathans@debian.org>  Tue,  3 Sep 2002 09:55:48 +1000
+
 xfsprogs (2.2.1-1) unstable; urgency=low
 
   * New upstream release
index 8d0122b030f5b1ad1671dc0481efe433a113a559..b3c68a3cc9d55861317059c4ce25541faf286c5e 100644 (file)
@@ -1,3 +1,9 @@
+xfsprogs-2.3.0 (03 September 2002)
+       - Several changes to geometry ioctl callers which will make
+         the tools useable on older kernel versions too.
+       - Mainly affects xfs_bmap and xfs_growfs.
+       - Do some additional cleanup after autoconf has run.
+
 xfsprogs-2.2.3 (28 August 2002)
        - Update libdisk for a few other filesystems.
        - Fix call to lvdisplay on LVM volumes so that lvdisplay
index 1c3320acaef4c84cc847d67186831a5c08fa948d..ab883cd51a982ceb6f54028b25e84f6e3557e568 100644 (file)
@@ -270,10 +270,20 @@ main(int argc, char **argv)
 
        /* get the current filesystem size & geometry */
        if (ioctl(ffd, XFS_IOC_FSGEOMETRY, &geo) < 0) {
-               fprintf(stderr, "%s: cannot determine geometry of filesystem"
-                       " mounted at %s: %s\n",
-                       progname, fname, strerror(errno));
-               exit(1);
+               /*
+                * OK, new ioctl barfed - back off and try earlier version
+                * as we're probably running an older kernel version.
+                * Only field added in the v2 geometry ioctl is "logsunit"
+                * so we'll zero that out for later display (as zero).
+                */
+               geo.logsunit = 1;       /* 1 BB */
+               if (ioctl(ffd, XFS_IOC_FSGEOMETRY_V1, &geo) < 0) {
+                       fprintf(stderr,
+                               "%s: cannot determine geometry of filesystem"
+                               " mounted at %s: %s\n",
+                               progname, fname, strerror(errno));
+                       exit(1);
+               }
        }
        isint = geo.logstart > 0;
        unwritten = geo.flags & XFS_FSOP_GEOM_FLAGS_EXTFLG ? 1 : 0;
@@ -462,7 +472,7 @@ main(int argc, char **argv)
                }
        }
 
-       if (ioctl(ffd, XFS_IOC_FSGEOMETRY, &ngeo) < 0) {
+       if (ioctl(ffd, XFS_IOC_FSGEOMETRY_V1, &ngeo) < 0) {
                fprintf(stderr, "%s: ioctl failed - XFS_IOC_FSGEOMETRY: %s\n",
                        progname, strerror(errno));
                exit(1);
index 34106f68082d3dfce67cbf2309f491d2da5c75c2..d67e978623fc8e332eaf97141a0f8e2d81cf6c32 100644 (file)
@@ -1218,7 +1218,7 @@ main(int argc, char **argv)
        }
 
        /* if lsu or lsunit was specified, automatically use v2 logs */
-       if (lsu || lsunit) {
+       if ((lsu || lsunit) && logversion == 1) {
                fprintf(stderr, "log stripe unit specified, using v2 logs\n");
                logversion = 2;
        }
index 3d28c587a83507854c9332d4074c1b22683827ff..a59ffae1623a82b8df7ae7833f4f5da68b98e98a 100644 (file)
@@ -388,7 +388,7 @@ int
 xfsrtextsize( char *path)
 {
        int fd, rval, rtextsize;
-       xfs_fsop_geom_t geo;
+       xfs_fsop_geom_v1_t geo;
 
        fd = open( path, O_RDONLY );
        if ( fd < 0 ) {
@@ -396,12 +396,12 @@ xfsrtextsize( char *path)
                perror(path);
                return -1;
        }
-       rval = ioctl(fd, XFS_IOC_FSGEOMETRY, &geo );
+       rval = ioctl( fd, XFS_IOC_FSGEOMETRY_V1, &geo );
        close(fd);
+       if ( rval < 0 )
+               return -1;
 
        rtextsize = geo.rtextsize * geo.blocksize;
 
-       if ( rval < 0 )
-               return -1;
        return rtextsize;
 }