From: Li Zefan Date: Thu, 8 Dec 2011 01:08:40 +0000 (-0500) Subject: Btrfs: check if the to-be-added device is writable X-Git-Tag: v3.2-rc5~28^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5d16333612718569ffd26064270e535cb9c3928;p=pandora-kernel.git Btrfs: check if the to-be-added device is writable If we call ioctl(BTRFS_IOC_ADD_DEV) directly, we'll succeed in adding a readonly device to a btrfs filesystem, and btrfs will write to that device, emitting kernel errors: [ 3109.833692] lost page write due to I/O error on loop2 [ 3109.833720] lost page write due to I/O error on loop2 ... Signed-off-by: Li Zefan Signed-off-by: Chris Mason --- Reading git-diff-tree failed