aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-kcopyd.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-05-29 08:02:58 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-05-29 08:02:58 -0400
commita705a34a565a5445bf731bd8006d51ea4d2b4236 (patch)
tree84d4761ff62398110a44e630085bc43a97bae805 /drivers/md/dm-kcopyd.c
parent6f13f6fba76edc7d0e7580c5deee829d59a41b2f (diff)
dm kcopyd: avoid pointless job splitting
Don't split SUB_JOB_SIZE jobs If the job size equals SUB_JOB_SIZE, there is no point in splitting it. Splitting it just unnecessarily wastes time, because the split job size is SUB_JOB_SIZE too. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-kcopyd.c')
-rw-r--r--drivers/md/dm-kcopyd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index 1bb73a13ca40..505b6f5cd385 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -578,7 +578,7 @@ int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
578 job->fn = fn; 578 job->fn = fn;
579 job->context = context; 579 job->context = context;
580 580
581 if (job->source.count < SUB_JOB_SIZE) 581 if (job->source.count <= SUB_JOB_SIZE)
582 dispatch_job(job); 582 dispatch_job(job);
583 583
584 else { 584 else {