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

o Add check for > 65k extents in a single lv.

This commit is contained in:
Joe Thornber 2002-01-24 17:16:36 +00:00
parent 0cf2445bb7
commit 2fe9b1387b

View File

@ -356,6 +356,17 @@ static int _pv_setup(struct format_instance *fi, struct physical_volume *pv,
return 1; return 1;
} }
static int _lv_setup(struct format_instance *fi, struct logical_volume *lv)
{
if (lv->le_count > 65536UL) {
log_err("Format 1 logical volumes cannot contain more than "
"65536 extents.");
return 0;
}
return 1;
}
static int _pv_write(struct format_instance *fi, struct physical_volume *pv) static int _pv_write(struct format_instance *fi, struct physical_volume *pv)
{ {
struct pool *mem; struct pool *mem;
@ -454,6 +465,7 @@ static struct format_handler _format1_ops = {
pv_read: _pv_read, pv_read: _pv_read,
pv_setup: _pv_setup, pv_setup: _pv_setup,
pv_write: _pv_write, pv_write: _pv_write,
lv_setup: _lv_setup,
vg_read: _vg_read, vg_read: _vg_read,
vg_setup: _vg_setup, vg_setup: _vg_setup,
vg_write: _vg_write, vg_write: _vg_write,