From: Milan Broz Date: Thu, 24 Apr 2008 20:42:36 +0000 (+0100) Subject: dm snapshot: reduce default memory allocation X-Git-Tag: v2.6.26-rc1~1064^2~22 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8ee2767a5903fde549fd3597690f64c8d951051a;p=linux-2.6-omap-h63xx.git dm snapshot: reduce default memory allocation Limit the amount of memory allocated per snapshot on systems with a large page size. (The larger default chunk size on these systems compensates for the smaller number of pages reserved.) Signed-off-by: Milan Broz Signed-off-by: Alasdair G Kergon --- diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 4dc8a43c034..08047fb1cac 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -36,9 +36,9 @@ #define SNAPSHOT_COPY_PRIORITY 2 /* - * Each snapshot reserves this many pages for io + * Reserve 1MB for each snapshot initially (with minimum of 1 page). */ -#define SNAPSHOT_PAGES 256 +#define SNAPSHOT_PAGES (((1UL << 20) >> PAGE_SHIFT) ? : 1) static struct workqueue_struct *ksnapd; static void flush_queued_bios(struct work_struct *work);