mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user