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

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