From: Dan Williams Date: Tue, 11 May 2010 22:25:37 +0000 (+1000) Subject: md: set mddev readonly flag on blkdev BLKROSET ioctl X-Git-Tag: v2.6.35-rc1~440^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2218350465e7e0931676b4849b594c978437bce;p=pandora-kernel.git md: set mddev readonly flag on blkdev BLKROSET ioctl When the user sets the block device to readwrite then the mddev should follow suit. Otherwise, the BUG_ON in md_write_start() will be set to trigger. The reverse direction, setting mddev->ro to match a set readonly request, can be ignored because the blkdev level readonly flag precludes the need to have mddev->ro set correctly. Nevermind the fact that setting mddev->ro to 1 may fail if the array is in use. Cc: Signed-off-by: Dan Williams Signed-off-by: NeilBrown --- Reading git-diff-tree failed