mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
dm: error return error for discards
Have the error target respond to a discard request with a hard -EIO rather than fail the request with -EOPNOTSUPP. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
parent
3fd5d48027
commit
38e1b257fd
1 changed files with 5 additions and 0 deletions
|
@ -113,6 +113,11 @@ void dm_unregister_target(struct target_type *tt)
|
||||||
*/
|
*/
|
||||||
static int io_err_ctr(struct dm_target *tt, unsigned int argc, char **args)
|
static int io_err_ctr(struct dm_target *tt, unsigned int argc, char **args)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Return error for discards instead of -EOPNOTSUPP
|
||||||
|
*/
|
||||||
|
tt->num_discard_requests = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue