mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +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
(cherry picked from commit ca986e448c)
Signed-off-by: Paul Lawrence <paullawrence@google.com>
This commit is contained in:
committed by
Paul Lawrence
parent
a531490d00
commit
8d30cc0501
@@ -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