lightnvm: pblk: improve naming for internal req.
Each request type sent to the LightNVM subsystem requires different metadata. Until now, we have tailored this metadata based on write, read and erase commands. However, pblk uses different metadata for internal writes that do not hit the write buffer. Instead of abusing the metadata for reads, create a new request type - internal write to improve code readability. In the process, create internal values for each I/O type instead of abusing the READ/WRITE macros, as suggested by Christoph. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

orang tua
875d94f3a4
melakukan
e2cddf2082
@@ -55,11 +55,16 @@
|
||||
for ((i) = 0, rlun = &(pblk)->luns[0]; \
|
||||
(i) < (pblk)->nr_luns; (i)++, rlun = &(pblk)->luns[(i)])
|
||||
|
||||
#define ERASE 2 /* READ = 0, WRITE = 1 */
|
||||
|
||||
/* Static pool sizes */
|
||||
#define PBLK_GEN_WS_POOL_SIZE (2)
|
||||
|
||||
enum {
|
||||
PBLK_READ = READ,
|
||||
PBLK_WRITE = WRITE,/* Write from write buffer */
|
||||
PBLK_WRITE_INT, /* Internal write - no write buffer */
|
||||
PBLK_ERASE,
|
||||
};
|
||||
|
||||
enum {
|
||||
/* IO Types */
|
||||
PBLK_IOTYPE_USER = 1 << 0,
|
||||
@@ -1132,7 +1137,7 @@ static inline int pblk_set_progr_mode(struct pblk *pblk, int type)
|
||||
|
||||
flags = geo->plane_mode >> 1;
|
||||
|
||||
if (type == WRITE)
|
||||
if (type == PBLK_WRITE)
|
||||
flags |= NVM_IO_SCRAMBLE_ENABLE;
|
||||
|
||||
return flags;
|
||||
|
Reference in New Issue
Block a user