Revision bbfa57c0f2243a7c31fd248d22e9861a2802cad5 authored by Sebastian Riemer on 21 February 2013, 02:28:09 UTC, committed by NeilBrown on 21 February 2013, 02:28:09 UTC
If an fsync occurs on a read-only array, we need to send a
completion for the IO and may not increment the active IO count.
Otherwise, we hit a bug trace and can't stop the MD array anymore.

By advice of Christoph Hellwig we return success upon a flush
request but we return -EROFS for other writes.
We detect flush requests by checking if the bio has zero sectors.

This patch is suitable to any -stable kernel to which it applies.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: NeilBrown <neilb@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Riemer <sebastian.riemer@profitbricks.com>
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: NeilBrown <neilb@suse.de>
1 parent 19f949f
History
File Mode Size
arch-v10
arch-v32
boot
configs
include
kernel
mm
Kconfig -rw-r--r-- 16.2 KB
Kconfig.debug -rw-r--r-- 1.2 KB
Makefile -rw-r--r-- 2.5 KB

back to top