Lines Matching refs:blkconf
51 npdg = ns->blkconf.discard_granularity / ns->lbasz; in nvme_ns_init_format()
53 ret = bdrv_get_info(blk_bs(ns->blkconf.blk), &bdi); in nvme_ns_init_format()
54 if (ret >= 0 && bdi.cluster_size > ns->blkconf.discard_granularity) { in nvme_ns_init_format()
100 ds = 31 - clz32(ns->blkconf.logical_block_size); in nvme_ns_init()
162 if (!blkconf_blocksizes(&ns->blkconf, errp)) { in nvme_ns_init_blk()
166 read_only = !blk_supports_write_perm(ns->blkconf.blk); in nvme_ns_init_blk()
167 if (!blkconf_apply_backend_options(&ns->blkconf, read_only, false, errp)) { in nvme_ns_init_blk()
171 if (ns->blkconf.discard_granularity == -1) { in nvme_ns_init_blk()
172 ns->blkconf.discard_granularity = in nvme_ns_init_blk()
173 MAX(ns->blkconf.logical_block_size, MIN_DISCARD_GRANULARITY); in nvme_ns_init_blk()
176 ns->size = blk_getlength(ns->blkconf.blk); in nvme_ns_init_blk()
551 if (!ns->blkconf.blk) { in nvme_ns_check_constraints()
620 if (ns->params.zrwas % ns->blkconf.logical_block_size) { in nvme_ns_check_constraints()
624 ns->params.zrwas, ns->blkconf.logical_block_size); in nvme_ns_check_constraints()
629 ns->params.zrwafg = ns->blkconf.logical_block_size; in nvme_ns_check_constraints()
688 blk_drain(ns->blkconf.blk); in nvme_ns_drain()
693 blk_flush(ns->blkconf.blk); in nvme_ns_shutdown()
803 DEFINE_BLOCK_PROPERTIES(NvmeNamespace, blkconf),