projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fd5d48
)
dm: error return error for discards
author
Mike Snitzer
<snitzer@redhat.com>
Thu, 12 Aug 2010 03:14:14 +0000
(
04:14
+0100)
committer
Alasdair G Kergon
<agk@redhat.com>
Thu, 12 Aug 2010 03:14:14 +0000
(
04:14
+0100)
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>
drivers/md/dm-target.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-target.c
b/drivers/md/dm-target.c
index 11dea11dc0b649e16594e071163f79647c274293..8da366cf381cdbd2f7d1b830bd7ecbe1191a5df1 100644
(file)
--- a/
drivers/md/dm-target.c
+++ b/
drivers/md/dm-target.c
@@
-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)
{
+ /*
+ * Return error for discards instead of -EOPNOTSUPP
+ */
+ tt->num_discard_requests = 1;
+
return 0;
}