diff options
author | Matias Bjørling <m@bjorling.me> | 2016-07-07 09:54:14 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-07-07 08:51:52 -0600 |
commit | 077d2389994197277f4f7662b13d11b2f67646a7 (patch) | |
tree | 1bd9690d5a449a78def55930963de35e699ca49e /include/linux/lightnvm.h | |
parent | 12624af26e59095a1b5216670028390177aa5820 (diff) | |
download | linux-stable-077d2389994197277f4f7662b13d11b2f67646a7.tar.gz linux-stable-077d2389994197277f4f7662b13d11b2f67646a7.tar.bz2 linux-stable-077d2389994197277f4f7662b13d11b2f67646a7.zip |
lightnvm: remove open/close statistics for gennvm
The responsibility of the media manager is not to keep track of
open/closed blocks. This is better maintained within a target,
that already manages this information on writes.
Remove the statistics and merge the states NVM_BLK_ST_OPEN and
NVM_BLK_ST_CLOSED.
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.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index cee4c8de34d5..8b51d5767331 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -269,24 +269,15 @@ struct nvm_lun { int lun_id; int chnl_id; - /* It is up to the target to mark blocks as closed. If the target does - * not do it, all blocks are marked as open, and nr_open_blocks - * represents the number of blocks in use - */ - unsigned int nr_open_blocks; /* Number of used, writable blocks */ - unsigned int nr_closed_blocks; /* Number of used, read-only blocks */ - unsigned int nr_free_blocks; /* Number of unused blocks */ - unsigned int nr_bad_blocks; /* Number of bad blocks */ - spinlock_t lock; + unsigned int nr_free_blocks; /* Number of unused blocks */ struct nvm_block *blocks; }; enum { NVM_BLK_ST_FREE = 0x1, /* Free block */ - NVM_BLK_ST_OPEN = 0x2, /* Open block - read-write */ - NVM_BLK_ST_CLOSED = 0x4, /* Closed block - read-only */ + NVM_BLK_ST_TGT = 0x2, /* Block in use by target */ NVM_BLK_ST_BAD = 0x8, /* Bad block */ }; |