* Mon Feb 01 2010 Eric Sandeen <sandeen@redhat.com> 3.1.1-2

- Fix mkfs of target with nothing blkid can recognize (#561870)
- Re-enable DEBUG per upstream decision

* Mon Feb 01 2010 Eric Sandeen <sandeen@redhat.com> 3.1.1-1
- New upstream release
- Fix fd validity test for device-less mkfs invocation

* Sun Jan 17 2010 Eric Sandeen <sandeen@redhat.com> 3.1.0-2
- Post-release mkfs fixes (#555847)
This commit is contained in:
Eric Sandeen 2010-02-05 20:25:06 +00:00
parent cf07289c17
commit a229c91465
4 changed files with 112 additions and 15 deletions

View File

@ -1,3 +1,27 @@
From: Eric Sandeen <sandeen@sandeen.net>
Date: Mon, 1 Feb 2010 16:13:36 +0000 (-0600)
Subject: xfsprogs: fix build with latest glibc headers
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=66210ef2f6aa5821a4c9cebc28414a265ee16019
xfsprogs: fix build with latest glibc headers
glibc in rawhide has some changes...
* Tue Jan 12 2010 Andreas Schwab <schwab@redhat.com> - 2.11.90-8
- Update from master.
- More POSIX conformance fixes.
* Mon Jan 11 2010 Andreas Schwab <schwab@redhat.com> - 2.11.90-6
- Update from master.
- POSIX conformance fixes (BZ#11125).
which seem to break the xfsprogs build. I'm no feature test macro
guru, but the following gets it going again for me.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
diff --git a/include/builddefs.in b/include/builddefs.in
index ca8f172..cc75b5d 100644
--- a/include/builddefs.in

View File

@ -0,0 +1,73 @@
From: Christoph Hellwig <hch@lst.de>
Date: Fri, 5 Feb 2010 07:52:52 +0000 (+0100)
Subject: mkfs.xfs: fix detection of empty devices
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=c2b707cf506c83ad4ab38c97c11cf358cc0bec88
mkfs.xfs: fix detection of empty devices
We currently fail to detect that a device does indeed not contain any
signature and we are indeed fine to proceed with it due to mishandling
the return value of blkid_do_fullprobe. Fix that up and add some
better diagnostics of the blkid detection.
from RH bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=561870
# dd if=/dev/zero of=k bs=1MB count=2 seek=20; mkfs.xfs k
# mkfs.xfs: probe of k failed, cannot detect existing filesystem.
# mkfs.xfs: Use the -f option to force overwrite
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
---
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 9baf116..2d09e36 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -322,24 +322,40 @@ check_overwrite(
if (!pr)
goto out;
- if (blkid_probe_enable_partitions(pr, 1))
+ ret = blkid_probe_enable_partitions(pr, 1);
+ if (ret < 0)
goto out;
- if (blkid_do_fullprobe(pr))
+ ret = blkid_do_fullprobe(pr);
+ if (ret < 0)
goto out;
- ret = 0;
+ /*
+ * Blkid returns 1 for nothing found and 0 when it finds a signature,
+ * but we want the exact opposite, so reverse the return value here.
+ *
+ * In addition print some useful diagnostics about what actually is
+ * on the device.
+ */
+ if (ret) {
+ ret = 0;
+ goto out;
+ }
+
if (!blkid_probe_lookup_value(pr, "TYPE", &type, NULL)) {
fprintf(stderr,
_("%s: %s appears to contain an existing "
"filesystem (%s).\n"), progname, device, type);
- ret = 1;
} else if (!blkid_probe_lookup_value(pr, "PTTYPE", &type, NULL)) {
fprintf(stderr,
_("%s: %s appears to contain a partition "
"table (%s).\n"), progname, device, type);
- ret = 1;
+ } else {
+ fprintf(stderr,
+ _("%s: %s appears to contain something weird "
+ "according to blkid\n"), progname, device);
}
+ ret = 1;
out:
if (pr)

View File

@ -1,14 +1,16 @@
Date: Sat, 30 Jan 2010 14:52:26 -0500
From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: [PATCH] mkfs.xfs: fix fd validity check in get_topology
From: Christoph Hellwig <hch@lst.de>
Date: Sun, 31 Jan 2010 08:57:46 +0000 (+0100)
Subject: mkfs.xfs: fix fd validity check in get_topology
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=85112c3a23927f299f04c193f5924249d7dd80bf
mkfs.xfs: fix fd validity check in get_topology
Only negatie return values from open mean we failed to open the device.
Without this check we do not print the usage message when no device is
specified. This leads to a weird failure in xfstests 122.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.ent>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
Index: xfsprogs-dev/mkfs/xfs_mkfs.c
@ -24,10 +26,3 @@ Index: xfsprogs-dev/mkfs/xfs_mkfs.c
platform_findsizes(dfile, fd, &dummy, &bsz);
close(fd);
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

View File

@ -1,7 +1,7 @@
Summary: Utilities for managing the XFS filesystem
Name: xfsprogs
Version: 3.1.1
Release: 1%{?dist}
Release: 2%{?dist}
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
# in source, with no mention of version.
# doc/COPYING file specifies what is GPL and what is LGPL
@ -20,6 +20,7 @@ Conflicts: xfsdump < 3.0.1
Patch0: xfsprogs-3.1.0-glibc-fixes.patch
Patch1: xfsprogs-3.1.1-fd-test-fix.patch
Patch2: xfsprogs-3.1.1-empty-blkid-fix.patch
%description
A set of commands to use the XFS filesystem, including mkfs.xfs.
@ -66,10 +67,10 @@ in building or running the xfstests QA suite.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
export tagname=CC DEBUG=-DNDEBUG
# xfsprogs abuses libexecdir
export tagname=CC
%configure \
--enable-readline=yes \
--enable-blkid=yes
@ -193,6 +194,10 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/xfs/xfs_types.h
%changelog
* Mon Feb 01 2010 Eric Sandeen <sandeen@redhat.com> 3.1.1-2
- Fix mkfs of target with nothing blkid can recognize (#561870)
- Re-enable DEBUG per upstream decision
* Mon Feb 01 2010 Eric Sandeen <sandeen@redhat.com> 3.1.1-1
- New upstream release
- Fix fd validity test for device-less mkfs invocation