Blame SOURCES/parted-3.1-libparted-Flush-parent-device-on-open-962611.patch

8dc857
From dc213bf52d640c0219541afb002f71b49a888c7f Mon Sep 17 00:00:00 2001
8dc857
From: "Brian C. Lane" <bcl@redhat.com>
8dc857
Date: Wed, 4 Sep 2013 11:45:44 -0700
8dc857
Subject: [PATCH] libparted: Flush parent device on open (#962611)
8dc857
8dc857
Parted probes for filesystems using geometry offsets into the parent
8dc857
device, not the partition device itself. This means it may get stale
8dc857
information if a partition has just been formatted.
8dc857
8dc857
On kernels before 2.6 this will also flush all partition devices. On 2.6
8dc857
and newer kernels it will only flush the parent device.
8dc857
8dc857
* libparted/arch/linux.c (linux_open): Always call _flush_cache
8dc857
---
8dc857
 libparted/arch/linux.c | 4 +---
8dc857
 1 file changed, 1 insertion(+), 3 deletions(-)
8dc857
8dc857
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
8dc857
index 2c410a0..4af0d5c 100644
8dc857
--- a/libparted/arch/linux.c
8dc857
+++ b/libparted/arch/linux.c
8dc857
@@ -1579,9 +1579,7 @@ retry:
8dc857
                 dev->read_only = 0;
8dc857
         }
8dc857
 
8dc857
-        /* With kernels < 2.6 flush cache for cache coherence issues */
8dc857
-        if (!_have_kern26())
8dc857
-                _flush_cache (dev);
8dc857
+        _flush_cache (dev);
8dc857
 
8dc857
         return 1;
8dc857
 }
8dc857
-- 
8dc857
1.8.3.1
8dc857