mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
Fix PE_ALIGN for pagesize over 32KB.
This commit is contained in:
parent
b5d761e1d2
commit
94d501edd9
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.09 -
|
Version 2.02.09 -
|
||||||
==================================
|
==================================
|
||||||
|
Fix PE_ALIGN for pagesize over 32KB.
|
||||||
Separate out LVM1_PE_ALIGN and pe_align().
|
Separate out LVM1_PE_ALIGN and pe_align().
|
||||||
Add lvm_getpagesize wrapper.
|
Add lvm_getpagesize wrapper.
|
||||||
Add --maxphysicalvolumes to vgchange.
|
Add --maxphysicalvolumes to vgchange.
|
||||||
|
@ -1193,7 +1193,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
|
|||||||
list_iterate_items(mda, &info->mdas) {
|
list_iterate_items(mda, &info->mdas) {
|
||||||
mdac = (struct mda_context *) mda->metadata_locn;
|
mdac = (struct mda_context *) mda->metadata_locn;
|
||||||
if (pv->dev == mdac->area.dev &&
|
if (pv->dev == mdac->area.dev &&
|
||||||
(mdac->area.start < (pv->pe_start << SECTOR_SHIFT)) &&
|
(mdac->area.start <= (pv->pe_start << SECTOR_SHIFT)) &&
|
||||||
(mdac->area.start + mdac->area.size >
|
(mdac->area.start + mdac->area.size >
|
||||||
(pv->pe_start << SECTOR_SHIFT))) {
|
(pv->pe_start << SECTOR_SHIFT))) {
|
||||||
pv->pe_start = (mdac->area.start + mdac->area.size)
|
pv->pe_start = (mdac->area.start + mdac->area.size)
|
||||||
|
@ -24,9 +24,11 @@
|
|||||||
#include "pv_alloc.h"
|
#include "pv_alloc.h"
|
||||||
#include "activate.h"
|
#include "activate.h"
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
unsigned long pe_align(void)
|
unsigned long pe_align(void)
|
||||||
{
|
{
|
||||||
return (65536UL >> SECTOR_SHIFT);
|
return MAX(65536UL, lvm_getpagesize()) >> SECTOR_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _add_pv_to_vg(struct format_instance *fid, struct volume_group *vg,
|
static int _add_pv_to_vg(struct format_instance *fid, struct volume_group *vg,
|
||||||
|
Loading…
Reference in New Issue
Block a user