Re: [PATCH 2.6.0-test3] avoid raid1 resync abort
flat view
From: Neil Brown <hidden>
Date: 2003-08-22 06:59:56
On Wednesday August 20, Paul.Clements@SteelEye.com wrote:
Neil, I don't know if you've noticed this one yet, but it looks like we need to set the master_bio->bi_bdev field at the beginning of every resync request. We use this value later on in sync_request_write() to determine whether a write should take place on a particular device. Without the field being properly set, we will end up aborting the resync process. This happens because the master_bios are pulled from a pool, so we eventually end up getting a master_bio that already has our destination disk set in its bi_bdev field. This causes sync_request_write() to fail since it thinks there is nowhere to write the data to.
Thanks. Your analysis looks right.
However it raises a question: why are we cloning a separate bio for
reading instead of jus using the "master bio" ???
I'll have a deeper look at raid1 in a few days and see what I can
find.
NeilBrown