Re: [PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-04-09 Thread Qu Wenruo
于 2014年04月09日 12:33, Anand Jain 写道: A bit of background of btrfs fi show. As such original btrfs fi show had too many problems since btrfs-progs wasn't much consulting btrfs-kernel to determine various mounted device status. This was a serious problem sometime back. Various patches brings

Re: [PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-04-09 Thread Anand Jain
As mentioned at the beginning, I prefer to remove the device remove test in testcase, then the patch can be reverted without any complain from me. Thats a wrong approach as well. The test case 003 is a very real case at the data centers. Especially the iscsi/san luns go offline/online all

Re: [PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-04-08 Thread Anand Jain
Below shows the bug cascading to this patch. And now to fix this I think we shouldn't fix/workaround in the btrfs-progs again!, fix it in the btrfs-kernel (or leave it open until suitable fix is found, I tried and failed. but don't fix it in a wrong way). If you want to help to fix this

Re: [PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-04-08 Thread Anand Jain
A bit of background of btrfs fi show. As such original btrfs fi show had too many problems since btrfs-progs wasn't much consulting btrfs-kernel to determine various mounted device status. This was a serious problem sometime back. Various patches brings btrfs-progs to communicate with kernel

Re: [PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-02-09 Thread Qu Wenruo
On Fri, 07 Feb 2014 17:34:46 +0800, Anand Jain wrote: IMO btrfs-progs shouldn't add its intelligence to know if disk is missing. If btrfs-kernel doesn't know when disk is missing that's a bug to fix in btrfs-kernel. yes that indeed true as of now in btrfs-kernel. btrfs kernel has no idea

Re: [PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-02-07 Thread Anand Jain
IMO btrfs-progs shouldn't add its intelligence to know if disk is missing. If btrfs-kernel doesn't know when disk is missing that's a bug to fix in btrfs-kernel. yes that indeed true as of now in btrfs-kernel. btrfs kernel has no idea when disk goes missing, just -EIO doesn't tell btrfs

[PATCH 1/2] btrfs-progs: Add missing devices check for mounted btrfs.

2014-02-06 Thread Qu Wenruo
In btrfs/003 of xfstest, it will check whether btrfs fi show can find missing devices. But before the patch, btrfs-progs will not check whether device missing if given a mounted btrfs mountpoint/block device. This patch fixes the bug and will pass btrfs/003. Signed-off-by: Qu Wenruo