summaryrefslogtreecommitdiffstats
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-05-06 20:03:19 +0200
committerJens Axboe <axboe@fb.com>2016-05-06 12:51:10 -0600
commitdf414b33bb1eb3a0ae52ccd4ecfec9323a4f89dc (patch)
tree9fa28d0008a66a5a82b485f196e44394f8ddc46c /include/linux/lightnvm.h
parent04a8aa173bd9410849526a80dcf733da9c3e142d (diff)
downloadblackbird-obmc-linux-df414b33bb1eb3a0ae52ccd4ecfec9323a4f89dc.tar.gz
blackbird-obmc-linux-df414b33bb1eb3a0ae52ccd4ecfec9323a4f89dc.zip
lightnvm: add is_cached entry to struct ppa_addr
A target requires a method to identify PPAs that are either cached in memory or on disk. This can efficiently be maintained within the PPA. The target host-side translation table can then lookup a PPA and know from the PPA if it is cached or on disk. In the case it is cached, it is the responsibility of the target to maintain this cache. 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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 3c53911e5758..3a810d7bd25e 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -18,7 +18,7 @@ enum {
#define NVM_SEC_BITS (8)
#define NVM_PL_BITS (8)
#define NVM_LUN_BITS (8)
-#define NVM_CH_BITS (8)
+#define NVM_CH_BITS (7)
struct ppa_addr {
/* Generic structure for all addresses */
@@ -30,8 +30,14 @@ struct ppa_addr {
u64 pl : NVM_PL_BITS;
u64 lun : NVM_LUN_BITS;
u64 ch : NVM_CH_BITS;
+ u64 reserved : 1;
} g;
+ struct {
+ u64 line : 63;
+ u64 is_cached : 1;
+ } c;
+
u64 ppa;
};
};
OpenPOWER on IntegriCloud