Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-08-03 Thread Filipe Manana
On Fri, Aug 3, 2018 at 8:29 AM, Anand Jain wrote: > > > On 08/03/2018 02:36 PM, Anand Jain wrote: >> >> >> >> >> On 07/31/2018 07:47 PM, Filipe Manana wrote: >>> >>> On Tue, Jul 31, 2018 at 11:12 AM, Anand Jain >>> wrote: On 07/27/2018 08:04 AM, Naohiro Aota wrote: > >

Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-08-03 Thread Anand Jain
On 08/03/2018 02:36 PM, Anand Jain wrote: On 07/31/2018 07:47 PM, Filipe Manana wrote: On Tue, Jul 31, 2018 at 11:12 AM, Anand Jain wrote: On 07/27/2018 08:04 AM, Naohiro Aota wrote: When btrfs hits error after modifying fs_devices in btrfs_init_new_device() (such as btrfs_add_dev_it

Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-08-02 Thread Anand Jain
On 07/31/2018 07:47 PM, Filipe Manana wrote: On Tue, Jul 31, 2018 at 11:12 AM, Anand Jain wrote: On 07/27/2018 08:04 AM, Naohiro Aota wrote: When btrfs hits error after modifying fs_devices in btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it leaves everything as

Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-08-02 Thread David Sterba
On Fri, Jul 27, 2018 at 09:04:55AM +0900, Naohiro Aota wrote: > When btrfs hits error after modifying fs_devices in > btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it > leaves everything as is, but frees allocated btrfs_device. As a result, > fs_devices->devices and fs_devic

Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-07-31 Thread Filipe Manana
On Tue, Jul 31, 2018 at 11:12 AM, Anand Jain wrote: > > > On 07/27/2018 08:04 AM, Naohiro Aota wrote: >> >> When btrfs hits error after modifying fs_devices in >> btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it >> leaves everything as is, but frees allocated btrfs_device.

Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-07-31 Thread Anand Jain
On 07/27/2018 08:04 AM, Naohiro Aota wrote: When btrfs hits error after modifying fs_devices in btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it leaves everything as is, but frees allocated btrfs_device. As a result, fs_devices->devices and fs_devices->alloc_list contai

Re: [PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-07-30 Thread Filipe Manana
On Fri, Jul 27, 2018 at 1:04 AM, Naohiro Aota wrote: > When btrfs hits error after modifying fs_devices in > btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it > leaves everything as is, but frees allocated btrfs_device. As a result, > fs_devices->devices and fs_devices->allo

[PATCH] btrfs: revert fs_devices state on error of btrfs_init_new_device()

2018-07-26 Thread Naohiro Aota
When btrfs hits error after modifying fs_devices in btrfs_init_new_device() (such as btrfs_add_dev_item() returns error), it leaves everything as is, but frees allocated btrfs_device. As a result, fs_devices->devices and fs_devices->alloc_list contain already freed btrfs_device, leading to later us