Commit f8facb61b5095488a4d78fa78116ef4f4b82bc4d

Authored by Mike Snitzer
Committed by Alasdair G Kergon
1 parent b441a262e7

dm: zero silently drop discards

Have the zero target silently drop a discard rather than fail the
request with -EOPNOTSUPP.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

drivers/md/dm-zero.c
... ... @@ -22,6 +22,11 @@
22 22 return -EINVAL;
23 23 }
24 24  
  25 + /*
  26 + * Silently drop discards, avoiding -EOPNOTSUPP.
  27 + */
  28 + ti->num_discard_requests = 1;
  29 +
25 30 return 0;
26 31 }
27 32