mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add lvm_getpagesize wrapper.
This commit is contained in:
parent
e95d828454
commit
916490f8bf
@ -1,5 +1,6 @@
|
||||
Version 2.02.09 -
|
||||
==================================
|
||||
Add lvm_getpagesize wrapper.
|
||||
Add --maxphysicalvolumes to vgchange.
|
||||
|
||||
Version 2.02.08 - 15th August 2006
|
||||
|
@ -41,6 +41,7 @@
|
||||
../lib/misc/lvm-exec.h
|
||||
../lib/misc/lvm-file.h
|
||||
../lib/misc/lvm-string.h
|
||||
../lib/misc/lvm-wrappers.h
|
||||
../lib/misc/sharedlib.h
|
||||
../lib/regex/matcher.h
|
||||
../lib/report/report.h
|
||||
|
@ -78,6 +78,7 @@ SOURCES =\
|
||||
misc/lvm-exec.c \
|
||||
misc/lvm-file.c \
|
||||
misc/lvm-string.c \
|
||||
misc/lvm-wrappers.c \
|
||||
mm/memlock.c \
|
||||
regex/matcher.c \
|
||||
regex/parse_rx.c \
|
||||
|
@ -187,7 +187,7 @@ int read_config_fd(struct config_tree *cft, struct device *dev,
|
||||
use_mmap = 0;
|
||||
|
||||
if (use_mmap) {
|
||||
mmap_offset = offset % getpagesize();
|
||||
mmap_offset = offset % lvm_getpagesize();
|
||||
/* memory map the file */
|
||||
p->fb = mmap((caddr_t) 0, size + mmap_offset, PROT_READ,
|
||||
MAP_PRIVATE, dev_fd(dev), offset - mmap_offset);
|
||||
|
@ -176,7 +176,7 @@ static int _aligned_io(struct device_area *where, void *buffer,
|
||||
}
|
||||
|
||||
if (!block_size)
|
||||
block_size = getpagesize();
|
||||
block_size = lvm_getpagesize();
|
||||
|
||||
_widen_region(block_size, where, &widened);
|
||||
|
||||
|
@ -1005,7 +1005,7 @@ static int _mda_setup(const struct format_type *fmt,
|
||||
uint64_t start1, mda_size1; /* First area - start of disk */
|
||||
uint64_t start2, mda_size2; /* Second area - end of disk */
|
||||
uint64_t wipe_size = 8 << SECTOR_SHIFT;
|
||||
size_t pagesize = getpagesize();
|
||||
size_t pagesize = lvm_getpagesize();
|
||||
|
||||
if (!pvmetadatacopies) {
|
||||
/* Space available for PEs */
|
||||
|
@ -83,6 +83,6 @@ struct mda_context {
|
||||
#define FMTT_VERSION 1
|
||||
#define MDA_HEADER_SIZE 512
|
||||
#define LVM2_LABEL "LVM2 001"
|
||||
#define MDA_SIZE_MIN (8 * (unsigned) getpagesize())
|
||||
#define MDA_SIZE_MIN (8 * (unsigned) lvm_getpagesize())
|
||||
|
||||
#endif
|
||||
|
@ -29,7 +29,7 @@
|
||||
#define MAX_STRIPES 128U
|
||||
#define SECTOR_SHIFT 9L
|
||||
#define SECTOR_SIZE ( 1L << SECTOR_SHIFT )
|
||||
#define STRIPE_SIZE_MIN ( (unsigned) getpagesize() >> SECTOR_SHIFT) /* PAGESIZE in sectors */
|
||||
#define STRIPE_SIZE_MIN ( (unsigned) lvm_getpagesize() >> SECTOR_SHIFT) /* PAGESIZE in sectors */
|
||||
#define STRIPE_SIZE_MAX ( 512L * 1024L >> SECTOR_SHIFT) /* 512 KB in sectors */
|
||||
#define STRIPE_SIZE_LIMIT ((UINT_MAX >> 2) + 1)
|
||||
#define PV_MIN_SIZE ( 512L * 1024L >> SECTOR_SHIFT) /* 512 KB in sectors */
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "log.h"
|
||||
#include "intl.h"
|
||||
#include "lvm-types.h"
|
||||
#include "lvm-wrappers.h"
|
||||
|
||||
#include <libdevmapper.h>
|
||||
|
||||
|
@ -58,7 +58,7 @@ static int _default_priority;
|
||||
|
||||
static void _touch_memory(void *mem, size_t size)
|
||||
{
|
||||
size_t pagesize = getpagesize();
|
||||
size_t pagesize = lvm_getpagesize();
|
||||
void *pos = mem;
|
||||
void *end = mem + size - sizeof(long);
|
||||
|
||||
|
@ -102,7 +102,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
|
||||
int argc, char **argv)
|
||||
{
|
||||
int region_size;
|
||||
int pagesize = getpagesize();
|
||||
int pagesize = lvm_getpagesize();
|
||||
|
||||
memset(lp, 0, sizeof(*lp));
|
||||
|
||||
|
@ -249,7 +249,7 @@ static int _read_mirror_params(struct lvcreate_params *lp,
|
||||
{
|
||||
int argc = *pargc;
|
||||
int region_size;
|
||||
int pagesize = getpagesize();
|
||||
int pagesize = lvm_getpagesize();
|
||||
|
||||
if (argc && (unsigned) argc < lp->mirrors) {
|
||||
log_error("Too few physical volumes on "
|
||||
|
Loading…
Reference in New Issue
Block a user