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>
This commit is contained in:
Mikulas Patocka 2011-05-29 13:02:58 +01:00 committed by Alasdair G Kergon
parent 6f13f6fba7
commit a705a34a56
1 changed files with 1 additions and 1 deletions

View File

@ -578,7 +578,7 @@ int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
job->fn = fn;
job->context = context;
if (job->source.count < SUB_JOB_SIZE)
if (job->source.count <= SUB_JOB_SIZE)
dispatch_job(job);
else {