aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-05-29 08:03:11 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-05-29 08:03:11 -0400
commit5f43ba2950414dc0abf4ac44c397d88069056746 (patch)
treef80df9947ef30f965d9c33e649d1856f1e47220f /drivers/md/dm-raid1.c
parentbda8efec5c706a672e0714d341a342e811f0262a (diff)
dm kcopyd: reserve fewer pages
Reserve just the minimum of pages needed to process one job. Because we allocate pages from page allocator, we don't need to reserve a large number of pages. The maximum job size is SUB_JOB_SIZE and we calculate the number of reserved pages based on this. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r--drivers/md/dm-raid1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 53089aa11387..9defad045418 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -22,7 +22,6 @@
22#define DM_MSG_PREFIX "raid1" 22#define DM_MSG_PREFIX "raid1"
23 23
24#define MAX_RECOVERY 1 /* Maximum number of regions recovered in parallel. */ 24#define MAX_RECOVERY 1 /* Maximum number of regions recovered in parallel. */
25#define DM_KCOPYD_PAGES 64
26 25
27#define DM_RAID1_HANDLE_ERRORS 0x01 26#define DM_RAID1_HANDLE_ERRORS 0x01
28#define errors_handled(p) ((p)->features & DM_RAID1_HANDLE_ERRORS) 27#define errors_handled(p) ((p)->features & DM_RAID1_HANDLE_ERRORS)
@@ -1116,7 +1115,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv)
1116 goto err_destroy_wq; 1115 goto err_destroy_wq;
1117 } 1116 }
1118 1117
1119 r = dm_kcopyd_client_create(DM_KCOPYD_PAGES, &ms->kcopyd_client); 1118 r = dm_kcopyd_client_create(&ms->kcopyd_client);
1120 if (r) 1119 if (r)
1121 goto err_destroy_wq; 1120 goto err_destroy_wq;
1122 1121