提交 38e1b257 编写于 作者: M Mike Snitzer 提交者: Alasdair G Kergon

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: NMike Snitzer <snitzer@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 3fd5d480
无相关合并请求
...@@ -113,6 +113,11 @@ void dm_unregister_target(struct target_type *tt) ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部