Drop obsolete dm fix
The bug was apparently fixed differently upstream by this change in 2.6.31: commit 8cbeb67ad50f7d68e5e83be2cb2284de8f9c03b5 Author: Mikulas Patocka <mpatocka@redhat.com> Date: Mon Jun 22 10:12:14 2009 +0100 dm: avoid unsupported spanning of md stripe boundaries svn path=/dists/trunk/linux/; revision=20560
This commit is contained in:
parent
631523075f
commit
ff8c74676b
|
@ -1,49 +0,0 @@
|
|||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Sun, 28 Nov 2010 23:46:46 +0000
|
||||
Subject: [PATCH] dm: Deal with merge_bvec_fn in component devices better
|
||||
Bug-Debian: http://bugs.debian.org/604457
|
||||
Forwarded: http://mid.gmane.org/1378051306.25743.18.camel@deadeye.wl.decadent.org.uk
|
||||
|
||||
This is analogous to commit 627a2d3c29427637f4c5d31ccc7fcbd8d312cd71,
|
||||
which does the same for md-devices at the top of the stack. The
|
||||
following explanation is taken from that commit. Thanks to Neil Brown
|
||||
<neilb@suse.de> for the advice.
|
||||
|
||||
If a component device has a merge_bvec_fn then as we never call it
|
||||
we must ensure we never need to. Currently this is done by setting
|
||||
max_sector to 1 PAGE, however this does not stop a bio being created
|
||||
with several sub-page iovecs that would violate the merge_bvec_fn.
|
||||
|
||||
So instead set max_segments to 1 and set the segment boundary to the
|
||||
same as a page boundary to ensure there is only ever one single-page
|
||||
segment of IO requested at a time.
|
||||
|
||||
This can particularly be an issue when 'xen' is used as it is
|
||||
known to submit multiple small buffers in a single bio.
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
---
|
||||
--- a/drivers/md/dm-table.c
|
||||
+++ b/drivers/md/dm-table.c
|
||||
@@ -536,13 +536,15 @@ int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
|
||||
(unsigned long long) start << SECTOR_SHIFT);
|
||||
|
||||
/*
|
||||
- * Check if merge fn is supported.
|
||||
- * If not we'll force DM to use PAGE_SIZE or
|
||||
- * smaller I/O, just to be safe.
|
||||
+ * If we don't call merge_bvec_fn, we must never risk
|
||||
+ * violating it, so limit max_phys_segments to 1 lying within
|
||||
+ * a single page.
|
||||
*/
|
||||
- if (dm_queue_merge_is_compulsory(q) && !ti->type->merge)
|
||||
- blk_limits_max_hw_sectors(limits,
|
||||
- (unsigned int) (PAGE_SIZE >> 9));
|
||||
+ if (dm_queue_merge_is_compulsory(q) && !ti->type->merge) {
|
||||
+ limits->max_segments = 1;
|
||||
+ limits->seg_boundary_mask = PAGE_CACHE_SIZE - 1;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_set_device_limits);
|
|
@ -60,7 +60,6 @@ bugfix/arm/omap-musb-choice.patch
|
|||
# Miscellaneous bug fixes
|
||||
bugfix/mips/disable-advansys.patch
|
||||
bugfix/powerpc/lpar-console.patch
|
||||
bugfix/all/dm-Deal-with-merge_bvec_fn-in-component-devices-bett.patch
|
||||
bugfix/arm/ixp4xx_iobe.patch
|
||||
features/all/cpu-devices/Partially-revert-cpufreq-Add-support-for-x86-cpuinfo.patch
|
||||
bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
|
||||
|
|
Loading…
Reference in New Issue