On Fri, Aug 21, 2015 at 11:21:26AM +0800, Qu Wenruo wrote:
> Offline btrfs tools, like btrfs-image, will infinitely loop when there
> is missing device.
>
> The reason is, for missing device, it's fd will be set to -1, but before
> we reading, we only check the fd validation by checking if it's 0.
Offline btrfs tools, like btrfs-image, will infinitely loop when there
is missing device.
The reason is, for missing device, it's fd will be set to -1, but before
we reading, we only check the fd validation by checking if it's 0.
So in that case, -1 will pass the validation check, and cause pread