Home
last modified time | relevance | path

Searched refs:max_discard_sectors (Results 1 – 25 of 31) sorted by relevance

12

/linux-6.6.21/block/
Dblk-settings.c48 lim->max_discard_sectors = 0; in blk_set_default_limits()
179 unsigned int max_discard_sectors) in blk_queue_max_discard_sectors() argument
181 q->limits.max_hw_discard_sectors = max_discard_sectors; in blk_queue_max_discard_sectors()
182 q->limits.max_discard_sectors = max_discard_sectors; in blk_queue_max_discard_sectors()
505 if (!lim->max_discard_sectors) in queue_limit_discard_alignment()
675 t->max_discard_sectors = min_not_zero(t->max_discard_sectors, in blk_stack_limits()
676 b->max_discard_sectors); in blk_stack_limits()
Dblk-merge.c112 unsigned int max_discard_sectors, granularity; in bio_split_discard() local
121 max_discard_sectors = in bio_split_discard()
122 min(lim->max_discard_sectors, bio_allowed_max_sectors(lim)); in bio_split_discard()
123 max_discard_sectors -= max_discard_sectors % granularity; in bio_split_discard()
125 if (unlikely(!max_discard_sectors)) { in bio_split_discard()
130 if (bio_sectors(bio) <= max_discard_sectors) in bio_split_discard()
133 split_sectors = max_discard_sectors; in bio_split_discard()
Dblk-sysfs.c171 (unsigned long long)q->limits.max_discard_sectors << 9); in queue_discard_max_show()
193 q->limits.max_discard_sectors = max_discard; in queue_discard_max_store()
Dblk.h173 return min(q->limits.max_discard_sectors, in blk_queue_get_max_sectors()
/linux-6.6.21/drivers/md/
Ddm-zero.c64 limits->max_discard_sectors = UINT_MAX; in zero_io_hints()
Ddm-target.c154 limits->max_discard_sectors = UINT_MAX; in io_err_io_hints()
Ddm-clone-target.c2035 else if (dest_limits->max_discard_sectors < clone->region_size) in disable_passdown_if_not_supported()
2053 limits->max_discard_sectors = round_down(UINT_MAX >> SECTOR_SHIFT, clone->region_size); in set_discard_limits()
2062 limits->max_discard_sectors = dest_limits->max_discard_sectors; in set_discard_limits()
Ddm-rq.c219 !clone->q->limits.max_discard_sectors) in dm_done()
Ddm-cache-target.c3380 else if (origin_limits->max_discard_sectors < cache->sectors_per_block) in disable_passdown_if_not_supported()
3397 limits->max_discard_sectors = min_t(sector_t, cache->discard_block_size * 1024, in set_discard_limits()
3407 limits->max_discard_sectors = origin_limits->max_discard_sectors; in set_discard_limits()
Ddm-log-writes.c874 limits->max_discard_sectors = (UINT_MAX >> SECTOR_SHIFT); in log_writes_io_hints()
Ddm-zoned-target.c1004 limits->max_discard_sectors = chunk_sectors; in dmz_io_hints()
/linux-6.6.21/include/uapi/linux/
Dvirtio_blk.h99 __virtio32 max_discard_sectors; member
Dublk_cmd.h353 __u32 max_discard_sectors; member
/linux-6.6.21/drivers/s390/block/
Ddasd_fba.c771 unsigned int max_bytes, max_discard_sectors; in dasd_fba_setup_blk_queue() local
789 max_discard_sectors = max_bytes / logical_block_size; in dasd_fba_setup_blk_queue()
791 blk_queue_max_discard_sectors(q, max_discard_sectors); in dasd_fba_setup_blk_queue()
792 blk_queue_max_write_zeroes_sectors(q, max_discard_sectors); in dasd_fba_setup_blk_queue()
/linux-6.6.21/drivers/block/rnbd/
Drnbd-proto.h149 __le32 max_discard_sectors; member
Drnbd-clt.c1349 le32_to_cpu(rsp->max_discard_sectors)); in setup_request_queue()
1356 le32_to_cpu(rsp->max_discard_sectors)); in setup_request_queue()
1633 le32_to_cpu(rsp->max_discard_sectors), in rnbd_clt_map_device()
Drnbd-srv.c548 rsp->max_discard_sectors = cpu_to_le32(bdev_max_discard_sectors(bdev)); in rnbd_srv_fill_msg_open_rsp()
/linux-6.6.21/drivers/block/
Dloop.c760 u32 granularity, max_discard_sectors; in loop_config_discard() local
772 max_discard_sectors = backingq->limits.max_write_zeroes_sectors; in loop_config_discard()
781 max_discard_sectors = 0; in loop_config_discard()
787 max_discard_sectors = UINT_MAX >> 9; in loop_config_discard()
791 max_discard_sectors = 0; in loop_config_discard()
794 if (max_discard_sectors) { in loop_config_discard()
796 blk_queue_max_discard_sectors(q, max_discard_sectors); in loop_config_discard()
797 blk_queue_max_write_zeroes_sectors(q, max_discard_sectors); in loop_config_discard()
Dublk_drv.c533 blk_queue_max_discard_sectors(q, p->max_discard_sectors); in ublk_dev_param_discard_apply()
563 if (p->max_discard_sectors && p->max_discard_segments != 1) in ublk_validate_params()
/linux-6.6.21/include/linux/
Dblkdev.h303 unsigned int max_discard_sectors; member
900 unsigned int max_discard_sectors);
1206 return bdev_get_queue(bdev)->limits.max_discard_sectors; in bdev_max_discard_sectors()
/linux-6.6.21/drivers/vdpa/vdpa_sim/
Dvdpa_sim_blk.c382 blk_config->max_discard_sectors = in vdpasim_blk_get_config()
/linux-6.6.21/drivers/block/drbd/
Ddrbd_receiver.c1517 unsigned int max_discard_sectors, granularity; in drbd_issue_discard_or_zero_out() local
1528 max_discard_sectors = min(bdev_max_discard_sectors(bdev), (1U << 22)); in drbd_issue_discard_or_zero_out()
1529 max_discard_sectors -= max_discard_sectors % granularity; in drbd_issue_discard_or_zero_out()
1530 if (unlikely(!max_discard_sectors)) in drbd_issue_discard_or_zero_out()
1551 while (nr_sectors >= max_discard_sectors) { in drbd_issue_discard_or_zero_out()
1552 err |= blkdev_issue_discard(bdev, start, max_discard_sectors, in drbd_issue_discard_or_zero_out()
1554 nr_sectors -= max_discard_sectors; in drbd_issue_discard_or_zero_out()
1555 start += max_discard_sectors; in drbd_issue_discard_or_zero_out()
Ddrbd_nl.c1213 unsigned int max_discard_sectors; in decide_on_discard_support() local
1234 max_discard_sectors = drbd_max_discard_sectors(connection); in decide_on_discard_support()
1235 blk_queue_max_discard_sectors(q, max_discard_sectors); in decide_on_discard_support()
1236 blk_queue_max_write_zeroes_sectors(q, max_discard_sectors); in decide_on_discard_support()
1261 unsigned int max_discard = device->rq_queue->limits.max_discard_sectors; in fixup_discard_support()
/linux-6.6.21/drivers/nvme/host/
Dcore.c1730 ctrl->max_discard_sectors = nvme_lba_to_sect(ns, ctrl->dmrsl); in nvme_config_discard()
1732 if (ctrl->max_discard_sectors == 0) { in nvme_config_discard()
1743 if (queue->limits.max_discard_sectors) in nvme_config_discard()
1746 blk_queue_max_discard_sectors(queue, ctrl->max_discard_sectors); in nvme_config_discard()
2916 ctrl->max_discard_sectors = UINT_MAX; in nvme_init_non_mdts_limits()
2919 ctrl->max_discard_sectors = 0; in nvme_init_non_mdts_limits()
Dnvme.h305 u32 max_discard_sectors; member

12