From: Mikulas Patocka <[email-masked]>

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 <[email-masked]>
Signed-off-by: Alasdair G Kergon <[email-masked]>

Index: linux-2.6.39/drivers/md/dm-kcopyd.c
===================================================================
--- linux-2.6.39.orig/drivers/md/dm-kcopyd.c
+++ linux-2.6.39/drivers/md/dm-kcopyd.c
@@ -578,7 +578,7 @@ int dm_kcopyd_copy(struct dm_kcopyd_clie
 	job->fn = fn;
 	job->context = context;
 
-	if (job->source.count < SUB_JOB_SIZE)
+	if (job->source.count <= SUB_JOB_SIZE)
 		dispatch_job(job);
 
 	else {