aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorJavier González <javier@cnexlabs.com>2018-03-29 18:05:20 -0400
committerJens Axboe <axboe@kernel.dk>2018-03-29 19:29:09 -0400
commit32ef9412c1142c64b372b83d3740f234f4226317 (patch)
tree5622acbfa881736acb380c2cc819013ea7baf136 /include/linux/lightnvm.h
parentbb845ae45c3d669ee814ce9f0ed51f2915ee55a0 (diff)
lightnvm: pblk: implement get log report chunk
In preparation of pblk supporting 2.0, implement the get log report chunk in pblk. Also, define the chunk states as given in the 2.0 spec. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r--include/linux/lightnvm.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index da45efa09bb2..6e0859b9d4d2 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -232,6 +232,19 @@ struct nvm_addrf {
232 u64 rsv_mask[2]; 232 u64 rsv_mask[2];
233}; 233};
234 234
235enum {
236 /* Chunk states */
237 NVM_CHK_ST_FREE = 1 << 0,
238 NVM_CHK_ST_CLOSED = 1 << 1,
239 NVM_CHK_ST_OPEN = 1 << 2,
240 NVM_CHK_ST_OFFLINE = 1 << 3,
241
242 /* Chunk types */
243 NVM_CHK_TP_W_SEQ = 1 << 0,
244 NVM_CHK_TP_W_RAN = 1 << 1,
245 NVM_CHK_TP_SZ_SPEC = 1 << 4,
246};
247
235/* 248/*
236 * Note: The structure size is linked to nvme_nvm_chk_meta such that the same 249 * Note: The structure size is linked to nvme_nvm_chk_meta such that the same
237 * buffer can be used when converting from little endian to cpu addressing. 250 * buffer can be used when converting from little endian to cpu addressing.