Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ec9b3dcecc8fe153…
Commit: ec9b3dcecc8fe153a8838419f3ad9f0f7b7d5ad3
Parent: 24ffd5244feca36ef26d4c1453ee680508466475
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Sep 30 11:11:18 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Sep 30 11:11:18 2013 +0200
udev: make subsystem rules responsible for importing subsystem flags
Each subsystem rule that needs to import any of DM_SUBSYSTEM_UDEV_FLAG*
flags is responsible for doing so. This simply moves control of these
flags from general 10-dm.rules to any subsystem rule using these flags
as each subsystem knows better how to handle these flags on its own.
---
WHATS_NEW_DM | 1 +
udev/10-dm.rules.in | 8 --------
2 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index e0ad76c..8456edd 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.82 -
=====================================
+ Make subsystem udev rules responsible for importing DM_SUBSYSTEM_UDEV_FLAG*.
Version 1.02.81 - 23rd September 2013
=====================================
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index bc9681f..f7088f1 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -54,14 +54,6 @@ IMPORT{db}="DM_UDEV_LOW_PRIORITY_FLAG"
IMPORT{db}="DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG"
IMPORT{db}="DM_UDEV_PRIMARY_SOURCE_FLAG"
IMPORT{db}="DM_UDEV_FLAG7"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG0"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG1"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG2"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG3"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG4"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG5"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG6"
-IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG7"
IMPORT{db}="DM_UDEV_RULES_VSN"
LABEL="dm_flags_done"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=acdc731e83f7ba64…
Commit: acdc731e83f7ba646a5e3c55398032464605ee58
Parent: d6516d2f7900aa233c2a96e171b355bec7e54395
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Sep 26 11:30:07 2013 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Sep 26 11:30:07 2013 -0500
RAID: Fix _sufficient_pes_free calculation for RAID
lib/metadata/lv_manip.c:_sufficient_pes_free() was calculating the
required space for RAID allocations incorrectly due to double
accounting. This resulted in failure to allocate when available
space was tight.
When RAID data and metadata areas are allocated together, the total
amount is stored in ah->new_extents and ah->alloc_and_split_meta is
set. '_sufficient_pes_free' was adding the necessary metadata extents
to ah->new_extents without ever checking ah->alloc_and_split_meta.
This often led to double accounting of the metadata extents. This
patch checks 'ah->alloc_and_split_meta' to perform proper calculations
for RAID.
This error is only present in the function that checks for the needed
space, not in the functions that do the actual allocation.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7750d2e..3a307c9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.103 -
======================================
+ Fix RAID calculation for sufficient allocatable space.
Conversion from linear to mirror or RAID1 now honors mirror_segtype_default.
Add thin-performance configuration profile.
Add lvm.conf allocation/thin_pool_chunk_size_calculation option.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index f945b79..3789566 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -1162,7 +1162,7 @@ static int _sufficient_pes_free(struct alloc_handle *ah, struct dm_list *pvms,
{
uint32_t area_extents_needed = (extents_still_needed - allocated) * ah->area_count / ah->area_multiple;
uint32_t parity_extents_needed = (extents_still_needed - allocated) * ah->parity_count / ah->area_multiple;
- uint32_t metadata_extents_needed = ah->metadata_area_count * RAID_METADATA_AREA_LEN; /* One each */
+ uint32_t metadata_extents_needed = (ah->alloc_and_split_meta) ? 0 : ah->metadata_area_count * RAID_METADATA_AREA_LEN; /* One each */
uint32_t total_extents_needed = area_extents_needed + parity_extents_needed + metadata_extents_needed;
uint32_t free_pes = pv_maps_size(pvms);