Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d30cc05 authored by hyeongseok.kim's avatar hyeongseok.kim Committed by Paul Lawrence
Browse files

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: default avatarhyeongseok.kim <hyeongseok@gmail.com>
Cc: hyeongseok.kim <hyeongseok.kim@lge.com>
Change-Id: Ic7c33d94a016d0ad5a75514eae1056c328c9c1ba
(cherry picked from commit ca986e448cf2f92f1bb672fe9bc0b651fa6b76c5)
Signed-off-by: default avatarPaul Lawrence <paullawrence@google.com>
parent a531490d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}