diff options
| author | Rakesh Pandit <rakesh@tuxera.com> | 2017-10-13 08:45:59 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2017-10-13 10:34:57 -0400 |
| commit | c79819bc0877e4cbed8013b1abc9697e8805b21b (patch) | |
| tree | 8a8b9b3418bc6babc6134e24788d7f3005c384f7 /drivers/lightnvm/pblk-core.c | |
| parent | c5493845b7b303315118fb4ab96654bf7cb897f0 (diff) | |
lightnvm: pblk: print incompatible line version correctly
Correct it by converting little endian to cpu endian and also define
a macro for line version so that maintenance is easy.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-core.c')
| -rw-r--r-- | drivers/lightnvm/pblk-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 027c42bb1ab9..8536d38ef97e 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c | |||
| @@ -978,7 +978,7 @@ static int pblk_line_init_metadata(struct pblk *pblk, struct pblk_line *line, | |||
| 978 | memcpy(smeta_buf->header.uuid, pblk->instance_uuid, 16); | 978 | memcpy(smeta_buf->header.uuid, pblk->instance_uuid, 16); |
| 979 | smeta_buf->header.id = cpu_to_le32(line->id); | 979 | smeta_buf->header.id = cpu_to_le32(line->id); |
| 980 | smeta_buf->header.type = cpu_to_le16(line->type); | 980 | smeta_buf->header.type = cpu_to_le16(line->type); |
| 981 | smeta_buf->header.version = cpu_to_le16(1); | 981 | smeta_buf->header.version = SMETA_VERSION; |
| 982 | 982 | ||
| 983 | /* Start metadata */ | 983 | /* Start metadata */ |
| 984 | smeta_buf->seq_nr = cpu_to_le64(line->seq_nr); | 984 | smeta_buf->seq_nr = cpu_to_le64(line->seq_nr); |
