dm thin: emit "ignore_discard" in status if discards are disabled
PATCH 1/1 dm thin: emit "ignore_discard" in status if discards are disabled
If "ignore_discard" is specified when creating the thin pool device then discard support is disabled for that device. The pool device's status should reflect this fact rather than stating "no_discard_passdown" (which implies discards are enabled but passdown is disabled).
Reported-by Zdenek Kabelac <[email protected]>
Signed-off-by Mike Snitzer <[email protected]>
--- drivers/md/dm-thin.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/md/dm-thin.c +3 -1
@@ -2370,7 +2370,9 @@ static int pool_status(struct dm_target *ti, status_type_t type,else DMEMIT ("rw " ); -if (pool->pf.discard_enabled && pool->pf.discard_passdown) +if (!pool->pf.discard_enabled) +DMEMIT ("ignore_discard" ); +else if (pool->pf.discard_passdown)DMEMIT ("discard_passdown" );else DMEMIT ("no_discard_passdown" );
Signature · 1 line
1.7.1