Skip to content

Commit

Permalink
nvme: do not include meta data for PRACT=1 and MD=8 (version 2)
Browse files Browse the repository at this point in the history
No meta data is transferred for PRACT=1 and MD=8:
  5.2.2.1 Protection Information and Write Commands
  5.2.2.2 Protection Informatio and Read Commands

commit 8dcac74 (nvme: do not include meta data for PRACT=1 and MD=8)
the condition in if sentence is wrong, mixed up pract with prinfo.

Signed-off-by: Bean Li <[email protected]>
  • Loading branch information
Bean Li authored and igaw committed Feb 6, 2024
1 parent 4526708 commit f1fde3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -7295,7 +7295,7 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char
* 5.2.2.1 Protection Information and Write Commands
* 5.2.2.2 Protection Information and Read Commands
*/
if (!(cfg.prinfo == 0x1 && ms == 8))
if (!((cfg.prinfo & 0x8) != 0 && ms == 8))
logical_block_size += ms;
}

Expand Down

0 comments on commit f1fde3f

Please sign in to comment.