diff options
author | Mike Snitzer <snitzer@redhat.com> | 2010-08-11 23:14:12 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2010-08-11 23:14:12 -0400 |
commit | f8facb61b5095488a4d78fa78116ef4f4b82bc4d (patch) | |
tree | 5ee747721c27a8ac1cb68bb05862bfdfea185d9b /drivers/md/dm-zero.c | |
parent | b441a262e7d1c56fbe21794c91d7a9c83809113f (diff) |
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>
Diffstat (limited to 'drivers/md/dm-zero.c')
-rw-r--r-- | drivers/md/dm-zero.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-zero.c b/drivers/md/dm-zero.c index bbc97030c0c2..cc2b3cb81946 100644 --- a/drivers/md/dm-zero.c +++ b/drivers/md/dm-zero.c | |||
@@ -22,6 +22,11 @@ static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
22 | return -EINVAL; | 22 | return -EINVAL; |
23 | } | 23 | } |
24 | 24 | ||
25 | /* | ||
26 | * Silently drop discards, avoiding -EOPNOTSUPP. | ||
27 | */ | ||
28 | ti->num_discard_requests = 1; | ||
29 | |||
25 | return 0; | 30 | return 0; |
26 | } | 31 | } |
27 | 32 | ||