Re: [PATCH 1/5 v2] Btrfs-progs: fix closing of devices

2013-06-21 Thread Liu Bo
On Tue, Jun 11, 2013 at 12:52:36AM +0100, Filipe David Borba Manana wrote: If a device could not be opened in volumes.c:read_one_dev(), a btrfs_device instance was allocated and added to the list of devices of the fs - however this device instance had its fd, name and label fields not

Re: [PATCH 1/5 v2] Btrfs-progs: fix closing of devices

2013-06-21 Thread Liu Bo
On Tue, Jun 11, 2013 at 12:52:36AM +0100, Filipe David Borba Manana wrote: If a device could not be opened in volumes.c:read_one_dev(), a btrfs_device instance was allocated and added to the list of devices of the fs - however this device instance had its fd, name and label fields not

Re: [PATCH 1/5 v2] Btrfs-progs: fix closing of devices

2013-06-21 Thread Filipe David Manana
On Fri, Jun 21, 2013 at 5:11 PM, Liu Bo bo.li@oracle.com wrote: --- a/volumes.c +++ b/volumes.c @@ -116,6 +116,7 @@ static int device_list_add(const char *path, /* we can safely leave the fs_devices entry around */ return -ENOMEM;

[PATCH 1/5 v2] Btrfs-progs: fix closing of devices

2013-06-10 Thread Filipe David Borba Manana
If a device could not be opened in volumes.c:read_one_dev(), a btrfs_device instance was allocated and added to the list of devices of the fs - however this device instance had its fd, name and label fields not initialized. This is problematic in disk-io.c:close_all_devices() as it tried to sync,