diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2013-02-15 11:02:53 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2013-02-26 11:28:00 +0100 |
commit | b778653f03702a967df11d51d842abb9a9b86068 (patch) | |
tree | 0b92c4c749a5814d0b01f4034726ea475a13336a /lib/format1 | |
parent | 9dbe25709e3805fbbc8024f0be68de2aae815747 (diff) | |
download | lvm2-b778653f03702a967df11d51d842abb9a9b86068.tar.gz |
pv_header_extension: add support for writing PV header extension (flags & Embedding Area)
The PV header extension information (PV header extension version, flags
and list of Embedding Area locations) is stored just beyond the PV header base.
When calculating the Embedding Area start value (ea_start), the same logic is
used as when calculating the pe_start value for Data Area - the value must
follow exactly the same alignment restrictions for its start value
(the alignment detected automatically or provided via command line using
the --dataalignment and --dataalignmentoffset arguments).
The Embedding Area is placed at the very start of the PV, starting at
ea_start. The Data Area starting at pe_start is placed next. The pe_start is
still properly aligned. Due to the pe_start alignment, it's possible that the
resulting Embedding Area size (ea_size) ends up bigger in size than requested
(but never less than requested).
Diffstat (limited to 'lib/format1')
-rw-r--r-- | lib/format1/format1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/format1/format1.c b/lib/format1/format1.c index c90c26611..f3945bc75 100644 --- a/lib/format1/format1.c +++ b/lib/format1/format1.c @@ -379,6 +379,8 @@ static int _format1_pv_setup(const struct format_type *fmt, struct pvcreate_restorable_params rp = {.restorefile = NULL, .id = {{0}}, .idp = NULL, + .ea_start = 0, + .ea_size = 0, .pe_start = 0, .extent_count = 0, .extent_size = vg->extent_size}; |