1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Reduce chunksize limit to 512k.

This commit is contained in:
Alasdair Kergon 2005-09-29 15:50:51 +00:00
parent b277f1e95d
commit 2b96712ab7
3 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.01.15 - Version 2.01.15 -
================================= =================================
Reduce chunksize limit to 512k.
Fix chunksize field in reports. Fix chunksize field in reports.
Don't hide snapshots from default 'lvs' output. Don't hide snapshots from default 'lvs' output.
Add is_dm_major() for use in duplicate device detection in lvmcache_add(). Add is_dm_major() for use in duplicate device detection in lvmcache_add().

View File

@ -42,7 +42,7 @@ keep the contents of the original logical volume for backup purposes.
See \fBlvm\fP for common options. See \fBlvm\fP for common options.
.TP .TP
.I \-c, \-\-chunksize ChunkSize .I \-c, \-\-chunksize ChunkSize
Power of 2 chunk size for the snapshot logical volume between 4k and 1024k. Power of 2 chunk size for the snapshot logical volume between 4k and 512k.
.TP .TP
.I \-C, \-\-contiguous y/n .I \-C, \-\-contiguous y/n
Sets or resets the contiguous allocation policy for Sets or resets the contiguous allocation policy for

View File

@ -303,6 +303,7 @@ static int _read_params(struct lvcreate_params *lp, struct cmd_context *cmd,
return 0; return 0;
} }
lp->chunk_size = 2 * arg_uint_value(cmd, chunksize_ARG, 8); lp->chunk_size = 2 * arg_uint_value(cmd, chunksize_ARG, 8);
// FIXME Restrict chunk_size to power of 2 in range PAGE_SIZE up to 512k (=1024)
log_verbose("Setting chunksize to %d sectors.", lp->chunk_size); log_verbose("Setting chunksize to %d sectors.", lp->chunk_size);
if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot"))) { if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot"))) {