aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/queue.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-04-15 04:52:57 +0000
committerJens Axboe <[email protected]>2022-04-18 01:49:59 +0000
commit44abff2c0b970ae3d310b97617525dc01f248d7c (patch)
tree9a1df22b92f1b310de70804605325b2367dfd52e /drivers/mmc/core/queue.c
parentblock: add a bdev_discard_granularity helper (diff)
downloadkernel-44abff2c0b970ae3d310b97617525dc01f248d7c.tar.gz
kernel-44abff2c0b970ae3d310b97617525dc01f248d7c.zip
block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD
Secure erase is a very different operation from discard in that it is a data integrity operation vs hint. Fully split the limits and helper infrastructure to make the separation more clear. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Acked-by: Christoph Böhmwalder <[email protected]> [drbd] Acked-by: Ryusuke Konishi <[email protected]> [nifs2] Acked-by: Jaegeuk Kim <[email protected]> [f2fs] Acked-by: Coly Li <[email protected]> [bcache] Acked-by: David Sterba <[email protected]> [btrfs] Acked-by: Chao Yu <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/mmc/core/queue.c')
-rw-r--r--drivers/mmc/core/queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index cac6315010a3..a3d446005571 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -189,7 +189,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
if (card->pref_erase > max_discard)
q->limits.discard_granularity = SECTOR_SIZE;
if (mmc_can_secure_erase_trim(card))
- blk_queue_flag_set(QUEUE_FLAG_SECERASE, q);
+ blk_queue_max_secure_erase_sectors(q, max_discard);
}
static unsigned short mmc_get_max_segments(struct mmc_host *host)