Lines Matching refs:ns
33 nvme_ns_cmd_read(struct nvme_namespace *ns, void *payload, uint64_t lba, in nvme_ns_cmd_read() argument
39 lba_count * nvme_ns_get_sector_size(ns), M_NOWAIT, cb_fn, cb_arg); in nvme_ns_cmd_read()
43 nvme_ns_read_cmd(&req->cmd, ns->id, lba, lba_count); in nvme_ns_cmd_read()
45 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_cmd_read()
51 nvme_ns_cmd_read_bio(struct nvme_namespace *ns, struct bio *bp, in nvme_ns_cmd_read_bio() argument
61 lba = bp->bio_offset / nvme_ns_get_sector_size(ns); in nvme_ns_cmd_read_bio()
62 lba_count = bp->bio_bcount / nvme_ns_get_sector_size(ns); in nvme_ns_cmd_read_bio()
63 nvme_ns_read_cmd(&req->cmd, ns->id, lba, lba_count); in nvme_ns_cmd_read_bio()
65 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_cmd_read_bio()
71 nvme_ns_cmd_write(struct nvme_namespace *ns, void *payload, uint64_t lba, in nvme_ns_cmd_write() argument
77 lba_count * nvme_ns_get_sector_size(ns), M_NOWAIT, cb_fn, cb_arg); in nvme_ns_cmd_write()
81 nvme_ns_write_cmd(&req->cmd, ns->id, lba, lba_count); in nvme_ns_cmd_write()
83 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_cmd_write()
89 nvme_ns_cmd_write_bio(struct nvme_namespace *ns, struct bio *bp, in nvme_ns_cmd_write_bio() argument
99 lba = bp->bio_offset / nvme_ns_get_sector_size(ns); in nvme_ns_cmd_write_bio()
100 lba_count = bp->bio_bcount / nvme_ns_get_sector_size(ns); in nvme_ns_cmd_write_bio()
101 nvme_ns_write_cmd(&req->cmd, ns->id, lba, lba_count); in nvme_ns_cmd_write_bio()
103 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_cmd_write_bio()
109 nvme_ns_cmd_deallocate(struct nvme_namespace *ns, void *payload, in nvme_ns_cmd_deallocate() argument
123 cmd->nsid = htole32(ns->id); in nvme_ns_cmd_deallocate()
129 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_cmd_deallocate()
135 nvme_ns_cmd_flush(struct nvme_namespace *ns, nvme_cb_fn_t cb_fn, void *cb_arg) in nvme_ns_cmd_flush() argument
143 nvme_ns_flush_cmd(&req->cmd, ns->id); in nvme_ns_cmd_flush()
144 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_cmd_flush()
153 nvme_ns_dump(struct nvme_namespace *ns, void *virt, off_t offset, size_t len) in nvme_ns_dump() argument
170 lba = offset / nvme_ns_get_sector_size(ns); in nvme_ns_dump()
171 lba_count = len / nvme_ns_get_sector_size(ns); in nvme_ns_dump()
172 nvme_ns_write_cmd(cmd, ns->id, lba, lba_count); in nvme_ns_dump()
174 nvme_ns_flush_cmd(cmd, ns->id); in nvme_ns_dump()
176 nvme_ctrlr_submit_io_request(ns->ctrlr, req); in nvme_ns_dump()