mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-23 23:33:15 +03:00
Do not allow users to change the name of RAID sub-LVs or the name of the
RAID LV if it is tracking changes for a split image.
This commit is contained in:
@@ -26,6 +26,22 @@
|
||||
|
||||
#define RAID_REGION_SIZE 1024
|
||||
|
||||
int lv_is_raid_with_tracking(const struct logical_volume *lv)
|
||||
{
|
||||
uint32_t s;
|
||||
struct lv_segment *seg;
|
||||
|
||||
if (lv->status & RAID) {
|
||||
seg = first_seg(lv);
|
||||
|
||||
for (s = 0; s < seg->area_count; s++)
|
||||
if (lv_is_visible(seg_lv(seg, s)) &&
|
||||
!(seg_lv(seg, s)->status & LVM_WRITE))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t lv_raid_image_count(const struct logical_volume *lv)
|
||||
{
|
||||
struct lv_segment *seg = first_seg(lv);
|
||||
|
||||
Reference in New Issue
Block a user