Re: [PATCH 0/4] factor __btrfs_open_devices()

2017-11-15 Thread Anand Jain



On 11/16/2017 01:03 AM, David Sterba wrote:

On Thu, Nov 09, 2017 at 11:45:22PM +0800, Anand Jain wrote:

This is in preparation to help bring the missing device back to the
alloc list dynamically. As of now if we run 'btrfs dev scan '
on a mounted FS, nothing happens, there is no code which handles this
condition. So the idea is to fix it by running through the device open
process for the reappeared missing device.

So this patch separates device open steps into a separate function so that
it can be called for a device, instead of for all the devices in the
dev_list. As this function is in the critical mount section, and to show
the src code changes as clearly as possible, I have created 4 no-functional
changes patches, which can be merged together if needed.


The splitting is fine, I've only merged 2 and 4 to one, but otherwise
it's clear from each patch if there are no functional changes. 1,3,2+4
added to next, thanks.


Thanks indeed. (git-diff showed changes which didn't make sense,
I had to split, merge is fine).

Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] factor __btrfs_open_devices()

2017-11-15 Thread David Sterba
On Thu, Nov 09, 2017 at 11:45:22PM +0800, Anand Jain wrote:
> This is in preparation to help bring the missing device back to the
> alloc list dynamically. As of now if we run 'btrfs dev scan '
> on a mounted FS, nothing happens, there is no code which handles this
> condition. So the idea is to fix it by running through the device open
> process for the reappeared missing device.
> 
> So this patch separates device open steps into a separate function so that
> it can be called for a device, instead of for all the devices in the
> dev_list. As this function is in the critical mount section, and to show
> the src code changes as clearly as possible, I have created 4 no-functional
> changes patches, which can be merged together if needed.

The splitting is fine, I've only merged 2 and 4 to one, but otherwise
it's clear from each patch if there are no functional changes. 1,3,2+4
added to next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] factor __btrfs_open_devices()

2017-11-09 Thread Anand Jain
This is in preparation to help bring the missing device back to the
alloc list dynamically. As of now if we run 'btrfs dev scan '
on a mounted FS, nothing happens, there is no code which handles this
condition. So the idea is to fix it by running through the device open
process for the reappeared missing device.

So this patch separates device open steps into a separate function so that
it can be called for a device, instead of for all the devices in the
dev_list. As this function is in the critical mount section, and to show
the src code changes as clearly as possible, I have created 4 no-functional
changes patches, which can be merged together if needed.

Anand Jain (4):
  btrfs: set fs_devices->seed directly
  btrfs: let variable required be declared inside the loop
  btrfs: move check for device generation to the last
  btrfs: factor __btrfs_open_devices() to create btrfs_open_one_device()

 fs/btrfs/volumes.c | 125 +
 1 file changed, 69 insertions(+), 56 deletions(-)

-- 
2.13.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html