From 0765fcbe34d2c42df37f713abf809ca0d3fe3d6e Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Fri, 7 May 2010 22:09:56 +0000 Subject: [PATCH] * Fri May 07 2010 Eric Sandeen 3.1.2-1 - New upstream release --- .cvsignore | 2 +- sources | 2 +- xfsprogs-3.1.0-glibc-fixes.patch | 50 ------------- xfsprogs-3.1.1-btree-locking.patch | 108 --------------------------- xfsprogs-3.1.1-empty-blkid-fix.patch | 73 ------------------ xfsprogs-3.1.1-fd-test-fix.patch | 28 ------- xfsprogs.spec | 17 ++--- 7 files changed, 7 insertions(+), 273 deletions(-) delete mode 100644 xfsprogs-3.1.0-glibc-fixes.patch delete mode 100644 xfsprogs-3.1.1-btree-locking.patch delete mode 100644 xfsprogs-3.1.1-empty-blkid-fix.patch delete mode 100644 xfsprogs-3.1.1-fd-test-fix.patch diff --git a/.cvsignore b/.cvsignore index ed52f5a..da84d3b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xfsprogs-3.1.1.tar.gz +xfsprogs-3.1.2.tar.gz diff --git a/sources b/sources index b4b3f38..88caeaa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c2308b46ee707597ac50aae418d321b8 xfsprogs-3.1.1.tar.gz +86d10178ee6897cb099c97303e6d9da0 xfsprogs-3.1.2.tar.gz diff --git a/xfsprogs-3.1.0-glibc-fixes.patch b/xfsprogs-3.1.0-glibc-fixes.patch deleted file mode 100644 index 7af0229..0000000 --- a/xfsprogs-3.1.0-glibc-fixes.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Eric Sandeen -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 - 2.11.90-8 -- Update from master. - - More POSIX conformance fixes. - -* Mon Jan 11 2010 Andreas Schwab - 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 -Reviewed-by: Christoph Hellwig ---- - -diff --git a/include/builddefs.in b/include/builddefs.in -index ca8f172..cc75b5d 100644 ---- a/include/builddefs.in -+++ b/include/builddefs.in -@@ -102,7 +102,7 @@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall - # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl - - ifeq ($(PKG_PLATFORM),linux) --PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS) -+PCFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 $(GCCFLAGS) - DEPENDFLAGS = -D__linux__ - endif - ifeq ($(PKG_PLATFORM),darwin) -diff --git a/include/linux.h b/include/linux.h -index dbfb4cf..b342e55 100644 ---- a/include/linux.h -+++ b/include/linux.h -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - #include - #include - #include - diff --git a/xfsprogs-3.1.1-btree-locking.patch b/xfsprogs-3.1.1-btree-locking.patch deleted file mode 100644 index 291d6d1..0000000 --- a/xfsprogs-3.1.1-btree-locking.patch +++ /dev/null @@ -1,108 +0,0 @@ -From: Dave Chinner -Date: Sun, 14 Mar 2010 22:52:08 +0000 (+1100) -Subject: xfsprogs: duplicate extent btrees in xfs_repair need locking -X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=853a75b3b30b0556fb5f100d4087f1ce46769bd1 - -xfsprogs: duplicate extent btrees in xfs_repair need locking - -The per-ag duplicate extent btrees can be search concurrently from multiple -threads. This occurs when inode extent lists are being processed and inodes -with extents in the same AG are checked concurrently. The btrees have an -internal traversal cursor, so doing concurrent searches can result in the -cursor being corrupted for both searches. - -Add an external lock for each duplicate extent tree and use it for searches, -inserts and deletes to ensure that we don't trash the state of any operation. - -Signed-off-by: Dave Chinner -Reviewed-by: Christoph Hellwig ---- - -diff --git a/repair/incore_ext.c b/repair/incore_ext.c -index a362e5a..60dd4c4 100644 ---- a/repair/incore_ext.c -+++ b/repair/incore_ext.c -@@ -74,6 +74,7 @@ static rt_ext_flist_t rt_ext_flist; - static avl64tree_desc_t *rt_ext_tree_ptr; /* dup extent tree for rt */ - - static struct btree_root **dup_extent_trees; /* per ag dup extent trees */ -+static pthread_mutex_t *dup_extent_tree_locks; - - static avltree_desc_t **extent_bno_ptrs; /* - * array of extent tree ptrs -@@ -108,7 +109,9 @@ void - release_dup_extent_tree( - xfs_agnumber_t agno) - { -+ pthread_mutex_lock(&dup_extent_tree_locks[agno]); - btree_clear(dup_extent_trees[agno]); -+ pthread_mutex_unlock(&dup_extent_tree_locks[agno]); - } - - int -@@ -117,12 +120,16 @@ add_dup_extent( - xfs_agblock_t startblock, - xfs_extlen_t blockcount) - { -+ int ret; - #ifdef XR_DUP_TRACE - fprintf(stderr, "Adding dup extent - %d/%d %d\n", agno, startblock, - blockcount); - #endif -- return btree_insert(dup_extent_trees[agno], startblock, -+ pthread_mutex_lock(&dup_extent_tree_locks[agno]); -+ ret = btree_insert(dup_extent_trees[agno], startblock, - (void *)(uintptr_t)(startblock + blockcount)); -+ pthread_mutex_unlock(&dup_extent_tree_locks[agno]); -+ return ret; - } - - int -@@ -132,13 +139,22 @@ search_dup_extent( - xfs_agblock_t end_agbno) - { - unsigned long bno; -+ int ret; - -- if (!btree_find(dup_extent_trees[agno], start_agbno, &bno)) -- return 0; /* this really shouldn't happen */ -- if (bno < end_agbno) -- return 1; -- return (uintptr_t)btree_peek_prev(dup_extent_trees[agno], NULL) > -+ pthread_mutex_lock(&dup_extent_tree_locks[agno]); -+ if (!btree_find(dup_extent_trees[agno], start_agbno, &bno)) { -+ ret = 0; -+ goto out; /* this really shouldn't happen */ -+ } -+ if (bno < end_agbno) { -+ ret = 1; -+ goto out; -+ } -+ ret = (uintptr_t)btree_peek_prev(dup_extent_trees[agno], NULL) > - start_agbno; -+out: -+ pthread_mutex_unlock(&dup_extent_tree_locks[agno]); -+ return ret; - } - - -@@ -856,6 +872,10 @@ incore_ext_init(xfs_mount_t *mp) - if (!dup_extent_trees) - do_error(_("couldn't malloc dup extent tree descriptor table\n")); - -+ dup_extent_tree_locks = calloc(agcount, sizeof(pthread_mutex_t)); -+ if (!dup_extent_tree_locks) -+ do_error(_("couldn't malloc dup extent tree descriptor table\n")); -+ - if ((extent_bno_ptrs = malloc(agcount * - sizeof(avltree_desc_t *))) == NULL) - do_error( -@@ -879,6 +899,7 @@ incore_ext_init(xfs_mount_t *mp) - - for (i = 0; i < agcount; i++) { - btree_init(&dup_extent_trees[i]); -+ pthread_mutex_init(&dup_extent_tree_locks[i], NULL); - avl_init_tree(extent_bno_ptrs[i], &avl_extent_tree_ops); - avl_init_tree(extent_bcnt_ptrs[i], &avl_extent_bcnt_tree_ops); - } - diff --git a/xfsprogs-3.1.1-empty-blkid-fix.patch b/xfsprogs-3.1.1-empty-blkid-fix.patch deleted file mode 100644 index dcafabf..0000000 --- a/xfsprogs-3.1.1-empty-blkid-fix.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Christoph Hellwig -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 -Reviewed-by: Eric Sandeen ---- - -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) - diff --git a/xfsprogs-3.1.1-fd-test-fix.patch b/xfsprogs-3.1.1-fd-test-fix.patch deleted file mode 100644 index 6a9a5f3..0000000 --- a/xfsprogs-3.1.1-fd-test-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Christoph Hellwig -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. - -Reviewed-by: Eric Sandeen -Signed-off-by: Christoph Hellwig ---- - -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); - } diff --git a/xfsprogs.spec b/xfsprogs.spec index f23354f..9f065bb 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing the XFS filesystem Name: xfsprogs -Version: 3.1.1 -Release: 7%{?dist} +Version: 3.1.2 +Release: 1%{?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 @@ -18,11 +18,6 @@ Provides: xfs-cmds Obsoletes: xfs-cmds <= %{version} 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 -Patch3: xfsprogs-3.1.1-btree-locking.patch - %description A set of commands to use the XFS filesystem, including mkfs.xfs. @@ -66,11 +61,6 @@ in building or running the xfstests QA suite. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - %build export tagname=CC DEBUG=-DNDEBUG %configure \ @@ -195,6 +185,9 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/xfs/xfs_types.h %changelog +* Fri May 07 2010 Eric Sandeen 3.1.2-1 +- New upstream release + * Thu Apr 01 2010 Eric Sandeen 3.1.1-7 - make devel pkg require libuuid-devel (#576296)