mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Append z to lv_attr if new blocks will be zeroed.
This commit is contained in:
parent
dbb48de507
commit
5081181b5d
@ -308,9 +308,10 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
|
|||||||
{
|
{
|
||||||
percent_t snap_percent;
|
percent_t snap_percent;
|
||||||
struct lvinfo info;
|
struct lvinfo info;
|
||||||
|
struct lv_segment *seg;
|
||||||
char *repstr;
|
char *repstr;
|
||||||
|
|
||||||
if (!(repstr = dm_pool_zalloc(mem, 8))) {
|
if (!(repstr = dm_pool_zalloc(mem, 9))) {
|
||||||
log_error("dm_pool_alloc failed");
|
log_error("dm_pool_alloc failed");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -405,6 +406,13 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
|
|||||||
else
|
else
|
||||||
repstr[6] = '-';
|
repstr[6] = '-';
|
||||||
|
|
||||||
|
if ((lv_is_thin_volume(lv) && (seg = first_seg(lv)) && seg->pool_lv && (seg = first_seg(seg->pool_lv))) ||
|
||||||
|
(lv_is_thin_pool(lv) && (seg = first_seg(lv))) &&
|
||||||
|
seg->zero_new_blocks)
|
||||||
|
repstr[7] = 'z';
|
||||||
|
else
|
||||||
|
repstr[7] = '-';
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return repstr;
|
return repstr;
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,7 @@ struct pv_list *find_pv_in_pv_list(const struct dm_list *pl,
|
|||||||
struct lv_segment *find_seg_by_le(const struct logical_volume *lv, uint32_t le);
|
struct lv_segment *find_seg_by_le(const struct logical_volume *lv, uint32_t le);
|
||||||
|
|
||||||
/* Find pool LV segment given a thin pool data or metadata segment. */
|
/* Find pool LV segment given a thin pool data or metadata segment. */
|
||||||
struct lv_segment *find_pool_seg(struct lv_segment *seg);
|
struct lv_segment *find_pool_seg(const struct lv_segment *seg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove a dev_dir if present.
|
* Remove a dev_dir if present.
|
||||||
|
@ -61,7 +61,7 @@ int detach_pool_lv(struct lv_segment *seg)
|
|||||||
return remove_seg_from_segs_using_this_lv(seg->pool_lv, seg);
|
return remove_seg_from_segs_using_this_lv(seg->pool_lv, seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct lv_segment *find_pool_seg(struct lv_segment *seg)
|
struct lv_segment *find_pool_seg(const struct lv_segment *seg)
|
||||||
{
|
{
|
||||||
struct lv_segment *pool_seg;
|
struct lv_segment *pool_seg;
|
||||||
|
|
||||||
|
@ -94,6 +94,8 @@ for example, mirror images, mirror logs as well as mirrors themselves appear as
|
|||||||
equivalents using the md raid kernel driver all appear as (r).
|
equivalents using the md raid kernel driver all appear as (r).
|
||||||
Snapshots using the original device-mapper driver appear as (s); whereas
|
Snapshots using the original device-mapper driver appear as (s); whereas
|
||||||
snapshots of thin volumes using the new thin provisioning driver appear as (t).
|
snapshots of thin volumes using the new thin provisioning driver appear as (t).
|
||||||
|
.IP 8 3
|
||||||
|
Newly-allocated data blocks are overwritten with blocks of (z)eroes before use.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.I \-\-segments
|
.I \-\-segments
|
||||||
|
Loading…
Reference in New Issue
Block a user