summaryrefslogtreecommitdiffstats
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2016-11-28 22:39:05 +0100
committerJens Axboe <axboe@fb.com>2016-11-29 12:12:51 -0700
commit8176117b82e49e043d045f214ba7a892fba6b827 (patch)
tree313d9fbd1d0df7ae9aac03b6f84d01159d3025bf /include/linux/lightnvm.h
parentde93434fcf74d41754a48e45365a5914e00bc0be (diff)
downloadlinux-8176117b82e49e043d045f214ba7a892fba6b827.tar.gz
linux-8176117b82e49e043d045f214ba7a892fba6b827.tar.bz2
linux-8176117b82e49e043d045f214ba7a892fba6b827.zip
lightnvm: manage lun partitions internally in mm
LUNs are exclusively owned by targets implementing a block device FTL. Doing this reservation requires at the moment a 2-way callback gennvm <-> target. The reason behind this is that LUNs were not assumed to always be exclusively owned by targets. However, this design decision goes against I/O determinism QoS (two targets would mix I/O on the same parallel unit in the device). This patch makes LUN reservation as part of the target creation on the media manager. This makes that LUNs are always exclusively owned by the target instantiated on top of them. LUN stripping and/or sharing should be implemented on the target itself or the layers on top. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r--include/linux/lightnvm.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 33940bdc18a9..89c695483d55 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -210,6 +210,7 @@ struct nvm_id {
struct nvm_target {
struct list_head list;
+ struct list_head lun_list;
struct nvm_dev *dev;
struct nvm_tgt_type *type;
struct gendisk *disk;
@@ -273,6 +274,7 @@ struct nvm_lun {
int lun_id;
int chnl_id;
+ struct list_head list;
spinlock_t lock;
/* lun block lists */
@@ -521,8 +523,6 @@ typedef int (nvmm_submit_io_fn)(struct nvm_dev *, struct nvm_rq *);
typedef int (nvmm_erase_blk_fn)(struct nvm_dev *, struct nvm_block *, int);
typedef void (nvmm_mark_blk_fn)(struct nvm_dev *, struct ppa_addr, int);
typedef struct nvm_lun *(nvmm_get_lun_fn)(struct nvm_dev *, int);
-typedef int (nvmm_reserve_lun)(struct nvm_dev *, int);
-typedef void (nvmm_release_lun)(struct nvm_dev *, int);
typedef void (nvmm_lun_info_print_fn)(struct nvm_dev *);
typedef int (nvmm_get_area_fn)(struct nvm_dev *, sector_t *, sector_t);
@@ -550,8 +550,6 @@ struct nvmm_type {
/* Configuration management */
nvmm_get_lun_fn *get_lun;
- nvmm_reserve_lun *reserve_lun;
- nvmm_release_lun *release_lun;
/* Statistics */
nvmm_lun_info_print_fn *lun_info_print;