: LVM1 Snapshots
PATCH 1/1 : LVM1 Snapshots
Marcelo,
this patch fixes an LVM1 snapshot sector calculation causing a larger number of pages in the call to expand_kiobuf() than needed, which causes snapshot creates to fail on large memory systems and on ia64.
Please apply.
Regards,
Heinz -- The LVM Guy --
drivers/md/lvm-snap.c.orig renamed from drivers/md/lvm-snap.c +5 -3
@@ -554,15 +554,17 @@ int lvm_snapshot_alloc(lv_t * lv_snap) { - int ret; + int ret, max_sectors; /* allocate kiovec to do chunk io */ ret = alloc_kiovec(1, &lv_snap->lv_iobuf); if (ret) goto out; - ret = lvm_snapshot_alloc_iobuf_pages(lv_snap->lv_iobuf, - KIO_MAX_SECTORS); + max_sectors = KIO_MAX_SECTORS << (PAGE_SHIFT - 9); + + ret = + lvm_snapshot_alloc_iobuf_pages(lv_snap->lv_iobuf, max_sectors); if (ret) goto out_free_kiovec;
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat GmbH
Consulting Development Engineer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-