]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: avoid livelock caused by non-aligned writes.
authorNeilBrown <neilb@suse.de>
Tue, 12 Aug 2014 23:48:45 +0000 (09:48 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 18 Aug 2014 04:49:41 +0000 (14:49 +1000)
commitc68f8649a9b085688f0c2a632ed55687108907d7
tree073b8b6428f90c68e457fcbdfce5f12ea6ad42ac
parentca09702717581356bb91e5bbfbb244eda384a004
md/raid5: avoid livelock caused by non-aligned writes.

If a stripe in a raid6 array received a write to each data block while
the array is degraded, and if any of these writes to a missing device
are not page-aligned, then a live-lock happens.

In this case the P and Q blocks need to be read so that the part of
the missing block which is *not* being updated by the write can be
constructed.  Due to a logic error, these blocks are not loaded, so
the update cannot proceed and the stripe is 'handled' repeatedly in an
infinite loop.

This bug is unlikely as most writes are page aligned.  However as it
can lead to a livelock it is suitable for -stable.  It was introduced
in 3.16.

Cc: stable@vger.kernel.org (v3.16)
Fixed: cb5601e4bf092664820f84146bf4c5b624316934
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c