nvmet.h (6b16f5d12202a23d875915349cc031c07fe1b3ec) nvmet.h (55eb942eda2ccbbbea61db4c1a774ba22b618046)
1/*
2 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

--- 51 unchanged lines hidden (view full) ---

60 struct block_device *bdev;
61 struct file *file;
62 u32 nsid;
63 u32 blksize_shift;
64 loff_t size;
65 u8 nguid[16];
66 uuid_t uuid;
67
1/*
2 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

--- 51 unchanged lines hidden (view full) ---

60 struct block_device *bdev;
61 struct file *file;
62 u32 nsid;
63 u32 blksize_shift;
64 loff_t size;
65 u8 nguid[16];
66 uuid_t uuid;
67
68 bool buffered_io;
68 bool enabled;
69 struct nvmet_subsys *subsys;
70 const char *device_path;
71
72 struct config_group device_group;
73 struct config_group group;
74
75 struct completion disable_done;

--- 188 unchanged lines hidden (view full) ---

264 size_t transfer_len;
265
266 struct nvmet_port *port;
267
268 void (*execute)(struct nvmet_req *req);
269 const struct nvmet_fabrics_ops *ops;
270};
271
69 bool enabled;
70 struct nvmet_subsys *subsys;
71 const char *device_path;
72
73 struct config_group device_group;
74 struct config_group group;
75
76 struct completion disable_done;

--- 188 unchanged lines hidden (view full) ---

265 size_t transfer_len;
266
267 struct nvmet_port *port;
268
269 void (*execute)(struct nvmet_req *req);
270 const struct nvmet_fabrics_ops *ops;
271};
272
273extern struct workqueue_struct *buffered_io_wq;
274
272static inline void nvmet_set_status(struct nvmet_req *req, u16 status)
273{
274 req->rsp->status = cpu_to_le16(status << 1);
275}
276
277static inline void nvmet_set_result(struct nvmet_req *req, u32 result)
278{
279 req->rsp->result.u32 = cpu_to_le32(result);

--- 107 unchanged lines hidden ---
275static inline void nvmet_set_status(struct nvmet_req *req, u16 status)
276{
277 req->rsp->status = cpu_to_le16(status << 1);
278}
279
280static inline void nvmet_set_result(struct nvmet_req *req, u32 result)
281{
282 req->rsp->result.u32 = cpu_to_le32(result);

--- 107 unchanged lines hidden ---