Home
last modified time | relevance | path

Searched refs:max_discard (Results 1 – 3 of 3) sorted by relevance

/linux-6.1.9/drivers/mmc/core/
Dqueue.c180 unsigned max_discard; in mmc_queue_setup_discard() local
182 max_discard = mmc_calc_max_discard(card); in mmc_queue_setup_discard()
183 if (!max_discard) in mmc_queue_setup_discard()
186 blk_queue_max_discard_sectors(q, max_discard); in mmc_queue_setup_discard()
189 if (card->pref_erase > max_discard) in mmc_queue_setup_discard()
192 blk_queue_max_secure_erase_sectors(q, max_discard); in mmc_queue_setup_discard()
194 blk_queue_max_write_zeroes_sectors(q, max_discard); in mmc_queue_setup_discard()
Dcore.c1877 unsigned int max_discard, x, y, qty = 0, max_qty, min_qty, timeout; in mmc_do_calc_max_discard() local
1942 max_discard = qty << card->erase_shift; in mmc_do_calc_max_discard()
1944 max_discard = qty + 1; in mmc_do_calc_max_discard()
1946 max_discard = qty * card->erase_size; in mmc_do_calc_max_discard()
1948 return max_discard; in mmc_do_calc_max_discard()
1954 unsigned int max_discard, max_trim; in mmc_calc_max_discard() local
1964 max_discard = mmc_do_calc_max_discard(card, MMC_ERASE_ARG); in mmc_calc_max_discard()
1967 if (max_trim < max_discard || max_discard == 0) in mmc_calc_max_discard()
1968 max_discard = max_trim; in mmc_calc_max_discard()
1969 } else if (max_discard < card->erase_size) { in mmc_calc_max_discard()
[all …]
/linux-6.1.9/block/
Dblk-sysfs.c190 unsigned long max_discard; in queue_discard_max_store() local
191 ssize_t ret = queue_var_store(&max_discard, page, count); in queue_discard_max_store()
196 if (max_discard & (q->limits.discard_granularity - 1)) in queue_discard_max_store()
199 max_discard >>= 9; in queue_discard_max_store()
200 if (max_discard > UINT_MAX) in queue_discard_max_store()
203 if (max_discard > q->limits.max_hw_discard_sectors) in queue_discard_max_store()
204 max_discard = q->limits.max_hw_discard_sectors; in queue_discard_max_store()
206 q->limits.max_discard_sectors = max_discard; in queue_discard_max_store()