From a1d4ec1d6ee73f2022cfedc1d81bac27ce675f14 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 27 Jan 2011 00:21:37 +0000 Subject: [PATCH] Use O_DIRECT when reading block devices. --- WHATS_NEW | 1 + lib/filters/filter.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index f00e9041f..ab682c3c8 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Always use O_DIRECT when opening block devices to check for partitioning. Version 2.02.82 - 24th January 2011 =================================== diff --git a/lib/filters/filter.c b/lib/filters/filter.c index 58d7c79f1..6f775eeb6 100644 --- a/lib/filters/filter.c +++ b/lib/filters/filter.c @@ -147,7 +147,7 @@ static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute__((un } /* Check it's accessible */ - if (!dev_open_flags(dev, O_RDONLY, 0, 1)) { + if (!dev_open_flags(dev, O_RDONLY, 1, 1)) { log_debug("%s: Skipping: open failed", name); return 0; }