diff options
author | Wenwei Tao <ww.tao0320@gmail.com> | 2016-03-03 15:06:37 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-18 18:10:37 -0700 |
commit | 4c9dacb82d5aa36aa2568df60d897f2eb3d8819b (patch) | |
tree | bd8e6a81aed966d79e50fc5cee3273c88a1a52ce /drivers/lightnvm/gennvm.h | |
parent | 3681c85dffda70e551dead31c8d102bd69033fe8 (diff) | |
download | talos-obmc-linux-4c9dacb82d5aa36aa2568df60d897f2eb3d8819b.tar.gz talos-obmc-linux-4c9dacb82d5aa36aa2568df60d897f2eb3d8819b.zip |
lightnvm: specify target's logical address area
We can create more than one target on a lightnvm
device by specifying its begin lun and end lun.
But only specify the physical address area is not
enough, we need to get the corresponding non-
intersection logical address area division from
the backend device's logcial address space.
Otherwise the targets on the device might use
the same logical addresses cause incorrect
information in the device's l2p table.
Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm/gennvm.h')
-rw-r--r-- | drivers/lightnvm/gennvm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/lightnvm/gennvm.h b/drivers/lightnvm/gennvm.h index 9c24b5b32dac..04d7c23cfc61 100644 --- a/drivers/lightnvm/gennvm.h +++ b/drivers/lightnvm/gennvm.h @@ -39,8 +39,14 @@ struct gen_nvm { int nr_luns; struct gen_lun *luns; + struct list_head area_list; }; +struct gennvm_area { + struct list_head list; + sector_t begin; + sector_t end; /* end is excluded */ +}; #define gennvm_for_each_lun(bm, lun, i) \ for ((i) = 0, lun = &(bm)->luns[0]; \ (i) < (bm)->nr_luns; (i)++, lun = &(bm)->luns[(i)]) |