1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Fix PE_ALIGN for pagesize over 32KB.

This commit is contained in:
Alasdair Kergon 2006-08-17 19:53:36 +00:00
parent b5d761e1d2
commit 94d501edd9
3 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.09 -
==================================
Fix PE_ALIGN for pagesize over 32KB.
Separate out LVM1_PE_ALIGN and pe_align().
Add lvm_getpagesize wrapper.
Add --maxphysicalvolumes to vgchange.

View File

@ -1193,7 +1193,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
list_iterate_items(mda, &info->mdas) {
mdac = (struct mda_context *) mda->metadata_locn;
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 >
(pv->pe_start << SECTOR_SHIFT))) {
pv->pe_start = (mdac->area.start + mdac->area.size)

View File

@ -24,9 +24,11 @@
#include "pv_alloc.h"
#include "activate.h"
#include <sys/param.h>
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,