From e46d2018e1b50cde2c846f36609cc30d82cb2007 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 15 Mar 2014 23:07:43 +0000 Subject: [PATCH] Remove patches which are now upstream. --- ...sure-a-significant-number-of-blocks-.patch | 49 ------------------- 0002-tests-fstrim-Remount-the-disk.patch | 26 ---------- libguestfs.spec | 6 --- 3 files changed, 81 deletions(-) delete mode 100644 0001-tests-discard-Ensure-a-significant-number-of-blocks-.patch delete mode 100644 0002-tests-fstrim-Remount-the-disk.patch diff --git a/0001-tests-discard-Ensure-a-significant-number-of-blocks-.patch b/0001-tests-discard-Ensure-a-significant-number-of-blocks-.patch deleted file mode 100644 index c6ed4ee..0000000 --- a/0001-tests-discard-Ensure-a-significant-number-of-blocks-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9b883d3c3ec0ff93bbea776572afb54d2a9b3524 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 14 Mar 2014 09:15:49 +0000 -Subject: [PATCH 1/2] tests/discard: Ensure a significant number of blocks are - freed up on the host. - -It's reasonable to expect megabytes will be freed up and given back to -the host. Previously we just tested that at least 1 block was -released. This test checks that at least 1000 blocks are released -(since stat(2) returns blocks of 512 bytes: 512 bytes * 1000 = approx 0.5 MB). ---- - tests/discard/test-blkdiscard.pl | 2 +- - tests/discard/test-discard.pl | 2 +- - tests/discard/test-fstrim.pl | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/discard/test-blkdiscard.pl b/tests/discard/test-blkdiscard.pl -index 77b72b9..e080350 100755 ---- a/tests/discard/test-blkdiscard.pl -+++ b/tests/discard/test-blkdiscard.pl -@@ -114,4 +114,4 @@ my $trimmed_size = (stat ($disk))[12]; - print "trimmed size:\t$trimmed_size (blocks)\n"; - - die "$0: looks like the blkdiscard operation did not work\n" -- if $trimmed_size >= $full_size; -+ if $full_size - $trimmed_size < 1000; -diff --git a/tests/discard/test-discard.pl b/tests/discard/test-discard.pl -index 3f350b3..5e2f879 100755 ---- a/tests/discard/test-discard.pl -+++ b/tests/discard/test-discard.pl -@@ -114,4 +114,4 @@ print "trimmed size:\t$trimmed_size (blocks)\n"; - #system "du -sh $disk"; - - die "$0: looks like the -o discard mount option did not work\n" -- if $trimmed_size >= $full_size; -+ if $full_size - $trimmed_size < 1000; -diff --git a/tests/discard/test-fstrim.pl b/tests/discard/test-fstrim.pl -index 54451b8..30bb855 100755 ---- a/tests/discard/test-fstrim.pl -+++ b/tests/discard/test-fstrim.pl -@@ -122,4 +122,4 @@ print "trimmed size:\t$trimmed_size (blocks)\n"; - #system "du -sh $disk"; - - die "$0: looks like the fstrim operation did not work\n" -- if $trimmed_size >= $full_size; -+ if $full_size - $trimmed_size < 1000; --- -1.8.5.3 - diff --git a/0002-tests-fstrim-Remount-the-disk.patch b/0002-tests-fstrim-Remount-the-disk.patch deleted file mode 100644 index 761a9d6..0000000 --- a/0002-tests-fstrim-Remount-the-disk.patch +++ /dev/null @@ -1,26 +0,0 @@ -From accf1b66aa835714690a2979e990c49243875dab Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 14 Mar 2014 10:09:47 +0000 -Subject: [PATCH 2/2] tests: fstrim: Remount the disk. - -This makes fstrim work. It's not clear why exactly. ---- - tests/discard/test-fstrim.pl | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/discard/test-fstrim.pl b/tests/discard/test-fstrim.pl -index 30bb855..cec853f 100755 ---- a/tests/discard/test-fstrim.pl -+++ b/tests/discard/test-fstrim.pl -@@ -113,6 +113,8 @@ die "$0: surprising result: full size <= original size\n" - # Remove the file and then try to trim the filesystem. - - $g->rm ("/data"); -+$g->umount ("/"); -+$g->mount_options ("nodiscard", "/dev/sda", "/"); - $g->fstrim ("/"); - $g->sync (); - $g->close (); --- -1.8.5.3 - diff --git a/libguestfs.spec b/libguestfs.spec index 819f47b..43fc00a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -27,9 +27,6 @@ License: LGPLv2+ URL: http://libguestfs.org/ Source0: http://libguestfs.org/download/1.25-development/%{name}-%{version}.tar.gz -Patch1: 0001-tests-discard-Ensure-a-significant-number-of-blocks-.patch -Patch2: 0002-tests-fstrim-Remount-the-disk.patch - # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -673,9 +670,6 @@ for %{name}. %prep %setup -q -%patch1 -p1 -%patch2 -p1 - if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then # For sVirt to work, the local temporary directory we use in the # tests must be labelled the same way as /tmp.