From 3bb7050e14f8270d9b3e5c98187329b7304e8514 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 14 Sep 2011 09:57:35 +0000 Subject: [PATCH] LVM_WRITE and LVM_READ are 64bit constants Revert John patch, which fixed only 1 place where ~LVM_WRITE was in use and convert ommited LVM_READ/WRITE flags to 64bit constants as well. (Since both 'status' flags for LV and VG are 64bit.) --- WHATS_NEW | 1 - lib/metadata/metadata-exported.h | 4 ++-- lib/metadata/raid_manip.c | 6 +----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 15d239f5a..7f588641b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -3,7 +3,6 @@ Version 2.02.89 - Fix lv_mirror_count to handle mirrored stripes properly. Fix failure to down-convert a mirror to linear due to udev "dev open" conflict Fix mirrored log creation when PE size is small - force log_size >= region_size - Fix improper RAID 64-bit status flag reset when and'ing against 32-bit flag. Fix log size calculation when only a log is being added to a mirror. Work around resume_lv causing error LV scanning during splitmirror operation. Add 7th lv_attr char to show the related kernel target. diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h index 45e515766..2a10ef581 100644 --- a/lib/metadata/metadata-exported.h +++ b/lib/metadata/metadata-exported.h @@ -88,8 +88,8 @@ #define THIN_POOL_DATA UINT64_C(0x0000004000000000) /* LV */ #define THIN_POOL_METADATA UINT64_C(0x0000008000000000) /* LV */ -#define LVM_READ 0x00000100U /* LV VG 32-bit */ -#define LVM_WRITE 0x00000200U /* LV VG 32-bit */ +#define LVM_READ UINT64_C(0x00000100) /* LV, VG */ +#define LVM_WRITE UINT64_C(0x00000200) /* LV, VG */ #define CLUSTERED UINT64_C(0x00000400) /* VG */ //#define SHARED UINT64_C(0x00000800) /* VG */ diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index d1e400262..19808184e 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -971,11 +971,7 @@ int lv_raid_split_and_track(struct logical_volume *lv, if (!_lv_is_on_pvs(seg_lv(seg, s), splittable_pvs)) continue; lv_set_visible(seg_lv(seg, s)); - /* - * LVM_WRITE is 32-bit, if we don't '|' it with - * UINT64_C(0) it will remove all higher order flags - */ - seg_lv(seg, s)->status &= ~(UINT64_C(0) | LVM_WRITE); + seg_lv(seg, s)->status &= ~LVM_WRITE; break; } -- 2.43.5