Skip to content

Commit

Permalink
lightnvm: add is_cached entry to struct ppa_addr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matias Bjørling authored and Jens Axboe committed May 6, 2016
1 parent 04a8aa1 commit df414b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/linux/lightnvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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;
};
};
Expand Down

0 comments on commit df414b3

Please sign in to comment.