diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-11 22:53:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 22:53:36 -0700 |
| commit | 00d1b0e9990815e31be7e502801f3a421fcccafa (patch) | |
| tree | ef050061841a8981929d1ad72a9ce8ece707da9e /kernel | |
| parent | 9abdc6608d7c5e3cb09c05bd6c726d04dc59ace4 (diff) | |
[PATCH] md: merge_bvec_fn needs to know about partitions.
From: Neil Brown <neilb@cse.unsw.edu.au>
Addresses http://bugme.osdl.org/show_bug.cgi?id=2355
It seems that a merge_bvec_fn needs to be aware of partitioning... who
would have thought it :-(
The following patch should fix the merge_bvec_fn for both linear and raid0.
We teach linear and raid0 about partitions in the merge_bvec_fn.
->merge_bvec_fn needs to make decisions based on the physical geometry of the
device. For raid0, it needs to decide if adding the bvec to the bio will
make the bio span two drives.
To do this, it needs to know where the request is (what the sector number is)
in the whole device.
However when called from bio_add_page, bi_sector is the sector number
relative to the current partition, as generic_make_request hasn't been called
yet.
So raid_mergeable_bvec needs to map bio->bi_sector (which is partition
relative) to a bi_sector which is device relative, so it can perform proper
calculations about when chunk boundaries are.
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
