diff options
author | Keith Busch <[email protected]> | 2023-04-03 13:09:25 -0700 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2023-04-05 17:13:17 +0200 |
commit | d3205ab75e99a47539ec91ef85ba488f4ddfeaa9 (patch) | |
tree | 0ce464a0960034f2dc2af9f919de73ab35bba857 /scripts/gdb/linux/mm.py | |
parent | 38a8c4d1d45006841f0643f4cb29b5e50758837c (diff) |
nvme: fix discard support without oncs
The device can report discard support without setting the ONCS DSM bit.
When not set, the driver clears max_discard_size expecting it to be set
later. We don't know the size until we have the namespace format,
though, so setting it is deferred until configuring one, but the driver
was abandoning the discard settings due to that initial clearing.
Move the max_discard_size calculation above the check for a '0' discard
size.
Fixes: 1a86924e4f46475 ("nvme: fix interpretation of DMRSL")
Reported-by: Laurence Oberman <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Reviewed-by: Niklas Cassel <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Tested-by: Laurence Oberman <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/mm.py')
0 files changed, 0 insertions, 0 deletions