• Home
  • Raw
  • Download

Lines Matching refs:ns

35 bool nvmet_bdev_zns_enable(struct nvmet_ns *ns)  in nvmet_bdev_zns_enable()  argument
37 u8 zasl = nvmet_zasl(bdev_max_zone_append_sectors(ns->bdev)); in nvmet_bdev_zns_enable()
38 struct gendisk *bd_disk = ns->bdev->bd_disk; in nvmet_bdev_zns_enable()
41 if (ns->subsys->zasl) { in nvmet_bdev_zns_enable()
42 if (ns->subsys->zasl > zasl) in nvmet_bdev_zns_enable()
45 ns->subsys->zasl = zasl; in nvmet_bdev_zns_enable()
60 if (ns->bdev->bd_disk->conv_zones_bitmap) in nvmet_bdev_zns_enable()
63 ret = blkdev_report_zones(ns->bdev, 0, bdev_nr_zones(ns->bdev), in nvmet_bdev_zns_enable()
68 ns->blksize_shift = blksize_bits(bdev_logical_block_size(ns->bdev)); in nvmet_bdev_zns_enable()
121 if (nvmet_ns_revalidate(req->ns)) { in nvmet_execute_identify_ns_zns()
122 mutex_lock(&req->ns->subsys->lock); in nvmet_execute_identify_ns_zns()
123 nvmet_ns_changed(req->ns->subsys, req->ns->nsid); in nvmet_execute_identify_ns_zns()
124 mutex_unlock(&req->ns->subsys->lock); in nvmet_execute_identify_ns_zns()
127 if (!bdev_is_zoned(req->ns->bdev)) { in nvmet_execute_identify_ns_zns()
133 zsze = (bdev_zone_sectors(req->ns->bdev) << 9) >> in nvmet_execute_identify_ns_zns()
134 req->ns->blksize_shift; in nvmet_execute_identify_ns_zns()
137 mor = bdev_max_open_zones(req->ns->bdev); in nvmet_execute_identify_ns_zns()
144 mar = bdev_max_active_zones(req->ns->bdev); in nvmet_execute_identify_ns_zns()
160 sector_t sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba); in nvmet_bdev_validate_zone_mgmt_recv()
163 if (sect >= get_capacity(req->ns->bdev->bd_disk)) { in nvmet_bdev_validate_zone_mgmt_recv()
235 zdesc.zcap = nvmet_sect_to_lba(rz->req->ns, z->capacity); in nvmet_bdev_report_zone_cb()
236 zdesc.zslba = nvmet_sect_to_lba(rz->req->ns, z->start); in nvmet_bdev_report_zone_cb()
237 zdesc.wp = nvmet_sect_to_lba(rz->req->ns, z->wp); in nvmet_bdev_report_zone_cb()
257 unsigned int sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba); in nvmet_req_nr_zones_from_slba()
259 return bdev_nr_zones(req->ns->bdev) - bdev_zone_no(req->ns->bdev, sect); in nvmet_req_nr_zones_from_slba()
274 sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba); in nvmet_bdev_zone_zmgmt_recv_work()
298 ret = blkdev_report_zones(req->ns->bdev, start_sect, req_slba_nr_zones, in nvmet_bdev_zone_zmgmt_recv_work()
402 struct block_device *bdev = req->ns->bdev; in nvmet_bdev_zone_mgmt_emulate_all()
458 ret = blkdev_zone_mgmt(req->ns->bdev, REQ_OP_ZONE_RESET, 0, in nvmet_bdev_execute_zmgmt_send_all()
459 get_capacity(req->ns->bdev->bd_disk), in nvmet_bdev_execute_zmgmt_send_all()
480 sector_t sect = nvmet_lba_to_sect(req->ns, req->cmd->zms.slba); in nvmet_bdev_zmgmt_send_work()
482 struct block_device *bdev = req->ns->bdev; in nvmet_bdev_zmgmt_send_work()
531 nvmet_sect_to_lba(req->ns, bio->bi_iter.bi_sector); in nvmet_bdev_zone_append_bio_done()
540 sector_t sect = nvmet_lba_to_sect(req->ns, req->cmd->rw.slba); in nvmet_bdev_execute_zone_append()
557 if (sect >= get_capacity(req->ns->bdev->bd_disk)) { in nvmet_bdev_execute_zone_append()
563 if (!bdev_is_zone_start(req->ns->bdev, sect)) { in nvmet_bdev_execute_zone_append()
571 bio_init(bio, req->ns->bdev, req->inline_bvec, in nvmet_bdev_execute_zone_append()
574 bio = bio_alloc(req->ns->bdev, req->sg_cnt, opf, GFP_KERNEL); in nvmet_bdev_execute_zone_append()