ANDROID: dm-bow: Fix not to skip trim at framented range

If free blocks hole is smaller than discard_granularity,
TRIM to this range can be skipped.
Fix this by changing the granularity to 4kb at dm-bow layer,
not to skip TRIM to every tiny free blocks.

Bug: 154411183
Signed-off-by: hyeongseok.kim <hyeongseok@gmail.com>
Cc: hyeongseok.kim <hyeongseok.kim@lge.com>
Change-Id: Ic7c33d94a016d0ad5a75514eae1056c328c9c1ba
This commit is contained in:
hyeongseok.kim
2020-04-21 08:42:08 +09:00
parent e7b258acf8
commit ca986e448c

View File

@@ -657,6 +657,7 @@ static int dm_bow_ctr(struct dm_target *ti, unsigned int argc, char **argv)
bc->dev->bdev->bd_queue->limits.max_discard_sectors = 1 << 15;
bc->forward_trims = false;
} else {
bc->dev->bdev->bd_queue->limits.discard_granularity = 1 << 12;
bc->forward_trims = true;
}