* 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:
parent
367c280d92
commit
cf07289c17
|
@ -1 +1 @@
|
||||||
xfsprogs-3.1.0.tar.gz
|
xfsprogs-3.1.1.tar.gz
|
||||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
07c1ff6a4a44b58ee5ffdabca33a4493 xfsprogs-3.1.0.tar.gz
|
c2308b46ee707597ac50aae418d321b8 xfsprogs-3.1.1.tar.gz
|
||||||
|
|
|
@ -1,149 +0,0 @@
|
||||||
From: Eric Sandeen <sandeen@sandeen.net>
|
|
||||||
Date: Fri, 15 Jan 2010 17:45:10 +0000 (-0600)
|
|
||||||
Subject: mkfs: fix mkfs sectorsize setting when blkid fails
|
|
||||||
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=7355966f018edd0d56b47dc5d7bac7950ed49683
|
|
||||||
|
|
||||||
mkfs: fix mkfs sectorsize setting when blkid fails
|
|
||||||
|
|
||||||
When trying to mkfs something that blkid doesn't grok:
|
|
||||||
|
|
||||||
# mkfs.xfs fsfile
|
|
||||||
warning: unable to probe device toplology for device fsfile
|
|
||||||
illegal sector size 0
|
|
||||||
Usage: mkfs.xfs
|
|
||||||
...
|
|
||||||
|
|
||||||
mkfs fails. :(
|
|
||||||
|
|
||||||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
||||||
Reviewed-by: Alex Elder <aelder@sgi.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
From: Eric Sandeen <sandeen@sandeen.net>
|
|
||||||
Date: Fri, 15 Jan 2010 19:25:20 +0000 (-0600)
|
|
||||||
Subject: mkfs: fix mkfs.xfs -dfile,name=$NAME for new files
|
|
||||||
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=063aab8b3b597d4714fee03a657c58906900cf8e
|
|
||||||
|
|
||||||
mkfs: fix mkfs.xfs -dfile,name=$NAME for new files
|
|
||||||
|
|
||||||
# /sbin/mkfs.xfs -dfile,name=grrr,size=100g
|
|
||||||
mkfs.xfs: Use the -f option to force overwrite.
|
|
||||||
|
|
||||||
check_overwrite is failing, because blkid_new_probe_from_filename()
|
|
||||||
is failing, because the (new) image file is 0 length.
|
|
||||||
|
|
||||||
It's easy to test for 0 length, and if found, there is
|
|
||||||
nothing to overwrite so return 0.
|
|
||||||
|
|
||||||
Also, if testing itself failed for some reason, print
|
|
||||||
a message to that effect:
|
|
||||||
|
|
||||||
# mkfs/mkfs.xfs -dfile,name=newfile,size=1g
|
|
||||||
mkfs.xfs: probe of newfile failed, cannot detect existing filesystem.
|
|
||||||
mkfs.xfs: Use the -f option to force overwrite.
|
|
||||||
|
|
||||||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
||||||
Reviewed-by: Alex Elder <aelder@sgi.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
From: Eric Sandeen <sandeen@sandeen.net>
|
|
||||||
Date: Sun, 17 Jan 2010 16:31:58 +0000 (-0600)
|
|
||||||
Subject: mkfs: get size of device properly
|
|
||||||
X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=d943b1140e566223bfd424ca4e24b3c1f3781037
|
|
||||||
|
|
||||||
mkfs: get size of device properly
|
|
||||||
|
|
||||||
Test device node size properly in check_overwrite, st_size
|
|
||||||
is only valid for regular files.
|
|
||||||
|
|
||||||
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
||||||
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
||||||
---
|
|
||||||
|
|
||||||
Index: xfsprogs-3.1.0/mkfs/xfs_mkfs.c
|
|
||||||
===================================================================
|
|
||||||
--- xfsprogs-3.1.0.orig/mkfs/xfs_mkfs.c
|
|
||||||
+++ xfsprogs-3.1.0/mkfs/xfs_mkfs.c
|
|
||||||
@@ -283,27 +283,52 @@ calc_stripe_factors(
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_BLKID
|
|
||||||
+/*
|
|
||||||
+ * Check for existing filesystem or partition table on device.
|
|
||||||
+ * Returns:
|
|
||||||
+ * 1 for existing fs or partition
|
|
||||||
+ * 0 for nothing found
|
|
||||||
+ * -1 for internal error
|
|
||||||
+ */
|
|
||||||
static int
|
|
||||||
check_overwrite(
|
|
||||||
char *device)
|
|
||||||
{
|
|
||||||
const char *type;
|
|
||||||
- blkid_probe pr;
|
|
||||||
- int ret = 0;
|
|
||||||
+ blkid_probe pr = NULL;
|
|
||||||
+ int ret;
|
|
||||||
+ int fd;
|
|
||||||
+ long long size;
|
|
||||||
+ int bsz;
|
|
||||||
|
|
||||||
if (!device || !*device)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
+ ret = -1; /* will reset on success of all setup calls */
|
|
||||||
+
|
|
||||||
+ fd = open(device, O_RDONLY);
|
|
||||||
+ if (fd < 0)
|
|
||||||
+ goto out;
|
|
||||||
+ platform_findsizes(device, fd, &size, &bsz);
|
|
||||||
+ close(fd);
|
|
||||||
+
|
|
||||||
+ /* nothing to overwrite on a 0-length device */
|
|
||||||
+ if (size == 0) {
|
|
||||||
+ ret = 0;
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
pr = blkid_new_probe_from_filename(device);
|
|
||||||
if (!pr)
|
|
||||||
- return -1;
|
|
||||||
+ goto out;
|
|
||||||
|
|
||||||
if (blkid_probe_enable_partitions(pr, 1))
|
|
||||||
- goto out_free_probe;
|
|
||||||
+ goto out;
|
|
||||||
|
|
||||||
if (blkid_do_fullprobe(pr))
|
|
||||||
- goto out_free_probe;
|
|
||||||
+ goto out;
|
|
||||||
|
|
||||||
+ ret = 0;
|
|
||||||
if (!blkid_probe_lookup_value(pr, "TYPE", &type, NULL)) {
|
|
||||||
fprintf(stderr,
|
|
||||||
_("%s: %s appears to contain an existing "
|
|
||||||
@@ -316,8 +341,13 @@ check_overwrite(
|
|
||||||
ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-out_free_probe:
|
|
||||||
- blkid_free_probe(pr);
|
|
||||||
+out:
|
|
||||||
+ if (pr)
|
|
||||||
+ blkid_free_probe(pr);
|
|
||||||
+ if (ret == -1)
|
|
||||||
+ fprintf(stderr,
|
|
||||||
+ _("%s: probe of %s failed, cannot detect "
|
|
||||||
+ "existing filesystem.\n"), progname, device);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1574,7 +1604,7 @@ main(
|
|
||||||
* Unless specified manually on the command line use the
|
|
||||||
* advertised sector size of the device.
|
|
||||||
*/
|
|
||||||
- sectorsize = ft.sectorsize;
|
|
||||||
+ sectorsize = ft.sectorsize ? ft.sectorsize : XFS_MIN_SECTORSIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ft.sectoralign || !ssflag) {
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
|
||||||
|
Index: xfsprogs-dev/mkfs/xfs_mkfs.c
|
||||||
|
===================================================================
|
||||||
|
--- xfsprogs-dev.orig/mkfs/xfs_mkfs.c 2010-01-30 20:44:03.505255109 +0100
|
||||||
|
+++ xfsprogs-dev/mkfs/xfs_mkfs.c 2010-01-30 20:44:20.579255807 +0100
|
||||||
|
@@ -455,7 +455,7 @@ static void get_topology(libxfs_init_t *
|
||||||
|
&ft->dsunit, &ft->dswidth, &ft->sectoralign);
|
||||||
|
fd = open(dfile, O_RDONLY);
|
||||||
|
/* If this fails we just fall back to BBSIZE */
|
||||||
|
- if (fd) {
|
||||||
|
+ if (fd >= 0) {
|
||||||
|
platform_findsizes(dfile, fd, &dummy, &bsz);
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
_______________________________________________
|
||||||
|
xfs mailing list
|
||||||
|
xfs@oss.sgi.com
|
||||||
|
http://oss.sgi.com/mailman/listinfo/xfs
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Summary: Utilities for managing the XFS filesystem
|
Summary: Utilities for managing the XFS filesystem
|
||||||
Name: xfsprogs
|
Name: xfsprogs
|
||||||
Version: 3.1.0
|
Version: 3.1.1
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
|
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
|
||||||
# in source, with no mention of version.
|
# in source, with no mention of version.
|
||||||
# doc/COPYING file specifies what is GPL and what is LGPL
|
# doc/COPYING file specifies what is GPL and what is LGPL
|
||||||
|
@ -19,7 +19,7 @@ Obsoletes: xfs-cmds <= %{version}
|
||||||
Conflicts: xfsdump < 3.0.1
|
Conflicts: xfsdump < 3.0.1
|
||||||
|
|
||||||
Patch0: xfsprogs-3.1.0-glibc-fixes.patch
|
Patch0: xfsprogs-3.1.0-glibc-fixes.patch
|
||||||
Patch1: xfsprogs-3.1.0-mkfs-fixes.patch
|
Patch1: xfsprogs-3.1.1-fd-test-fix.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
||||||
|
@ -193,7 +193,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_includedir}/xfs/xfs_types.h
|
%{_includedir}/xfs/xfs_types.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Jan 17 2010 Eric Sandeen <sandeen@redhat.com> 3.1.0-2
|
* 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)
|
- Post-release mkfs fixes (#555847)
|
||||||
|
|
||||||
* Wed Jan 13 2010 Eric Sandeen <sandeen@redhat.com> 3.1.0-1
|
* Wed Jan 13 2010 Eric Sandeen <sandeen@redhat.com> 3.1.0-1
|
||||||
|
|
Loading…
Reference in New Issue