projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b441a26
)
dm: zero silently drop discards
author
Mike Snitzer
<snitzer@redhat.com>
Thu, 12 Aug 2010 03:14:12 +0000
(
04:14
+0100)
committer
Alasdair G Kergon
<agk@redhat.com>
Thu, 12 Aug 2010 03:14:12 +0000
(
04:14
+0100)
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>
drivers/md/dm-zero.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-zero.c
b/drivers/md/dm-zero.c
index bbc97030c0c200eb35160beddb0342693c7c7250..cc2b3cb819465c4f6becb14897d998ebfb976572 100644
(file)
--- 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)
return -EINVAL;
}
+ /*
+ * Silently drop discards, avoiding -EOPNOTSUPP.
+ */
+ ti->num_discard_requests = 1;
+
return 0;
}