Re: [PATCH 0/6] btrfs: find_device cleanups

2019-01-18 Thread Anand Jain
On 01/19/2019 01:33 AM, David Sterba wrote: On Thu, Jan 17, 2019 at 11:32:27PM +0800, Anand Jain wrote: find_device and its helper functions are as below btrfs_find_device_by_devspec() btrfs_find_device_missing_or_by_path() btrfs_find_device_by_path() btrfs_find_device() find_devic

[PATCH 5/6 v2] btrfs: merge btrfs_find_device() and find_device()

2019-01-18 Thread Anand Jain
Both btrfs_find_device() and find_device() does the same things expect that latter function is not keen in seed device in the scan-context. So merge them. Signed-off-by: Anand Jain --- v2: use bool instead of int. use positive meaning instead of negative. conflict fix: due to 1b3922a8bc7

Re: question about creating a raid10

2019-01-18 Thread Chris Murphy
On Fri, Jan 18, 2019 at 12:02 AM Stefan K wrote: > > > Btrfs raid10 really should not be called raid10. It sets up the wrong > > user expectation entirely. It's more like raid0+1, except even that is > > deceptive because in theory a legit raid0+1 you can lose multiple > > drives on one side of th

Re: question about creating a raid10

2019-01-18 Thread Chris Murphy
On Thu, Jan 17, 2019 at 4:28 PM Tomasz Chmielewski wrote: > > > It is actually more like RAID-1E which is supported by some hardware > > RAID HBA. The difference is that RAID-1E is usually using strict > > sequential block placement algorithm and assumes disks of equal size, > > while btrfs raid10

python-btrfs v10

2019-01-18 Thread Hans van Kranenburg
I just tagged v10 of the python btrfs library. https://github.com/knorrie/python-btrfs/ Somewhere in the next days I'll update pypi and will prepare debian packages for unstable and stretch-backports. Note: I will be converting the branches in git for debian packaging to the DEP14 standard, also

Re: trouble with btrfs lockup

2019-01-18 Thread Krishna Mannem
Thanks for the info, unfortunately because this was a prod environment we had to recreate the vm. We'll respond to this thread with more what you asked for when this happens next because it seems to be a common occurrence for us. On Fri, Jan 18, 2019 at 2:19 PM Liu Bo wrote: > > On Fri, Jan 18, 2

Re: trouble with btrfs lockup

2019-01-18 Thread Liu Bo
On Fri, Jan 18, 2019 at 10:58 AM Krishna Mannem wrote: > > Hi, > > I work on Concourse-CI (https://concourse-ci.org/). It's a container > based CI system where we create volumes using Btrfs. Due to the nature > of Concourse, btrfs subvolumes are short lived ( sometimes a few > seconds if it's a sm

trouble with btrfs lockup

2019-01-18 Thread Krishna Mannem
Hi, I work on Concourse-CI (https://concourse-ci.org/). It's a container based CI system where we create volumes using Btrfs. Due to the nature of Concourse, btrfs subvolumes are short lived ( sometimes a few seconds if it's a small automation task, sometimes hours if its a long build and test sui

Re: [PATCH v2] Btrfs: avoid deadlock with memory reclaim due to allocation of devices

2019-01-18 Thread David Sterba
On Mon, Jan 14, 2019 at 04:21:43PM +0800, Anand Jain wrote: > > > On 01/12/2019 01:17 AM, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > In a few places we are allocating a device using the GFP_KERNEL flag when > > it is not safe to do so, because if reclaim is triggered it can caus

Re: [PATCH 1/2 v14] btrfs: refactor btrfs_free_stale_devices() to get return value

2019-01-18 Thread David Sterba
On Fri, Jan 04, 2019 at 01:31:53PM +0800, Anand Jain wrote: > Preparatory patch to add forget cli. > > Re-factors btrfs_free_stale_devices() to obtain return status. As > this function can fail if it can't find the given path (returns -ENOENT) > or trying to delete a mounted device (returns -EBUSY

Re: [PATCH 0/6] btrfs: find_device cleanups

2019-01-18 Thread David Sterba
On Thu, Jan 17, 2019 at 11:32:27PM +0800, Anand Jain wrote: > find_device and its helper functions are as below > > btrfs_find_device_by_devspec() > btrfs_find_device_missing_or_by_path() > btrfs_find_device_by_path() > btrfs_find_device() > find_device() > > Its quite confusing and too frag

Re: [PATCH 6/6] btrfs: refactor btrfs_find_device() return error code

2019-01-18 Thread David Sterba
On Fri, Jan 18, 2019 at 02:13:26PM +0800, Anand Jain wrote: > > > On 01/17/2019 11:49 PM, David Sterba wrote: > > On Thu, Jan 17, 2019 at 11:32:33PM +0800, Anand Jain wrote: > >> Refactor btrfs_find_device() to return standard error code. > > > > Do you intend to add more error codes? > > No

Re: [PATCH 3/6] btrfs: rename btrfs_find_device_by_path()

2019-01-18 Thread David Sterba
On Fri, Jan 18, 2019 at 02:13:19PM +0800, Anand Jain wrote: > On 01/17/2019 11:54 PM, David Sterba wrote: > > On Thu, Jan 17, 2019 at 11:32:30PM +0800, Anand Jain wrote: > >> btrfs_find_device_by_path() is a helper function, drop the btrfs prefix > >> and the suffix _path is too generic, in fact as

Re: [PATCH] btrfs: honor path->skip_locking in backref code

2019-01-18 Thread David Sterba
On Wed, Jan 16, 2019 at 11:00:57AM -0500, Josef Bacik wrote: > qgroups will do the old roots lookup at delayed ref time, which could be > while walking down the extent root while running a delayed ref. This > should be fine, except we specifically lock eb's in the backref walking > code irrespecti

Re: question about creating a raid10

2019-01-18 Thread Jukka Larja
Stefan K kirjoitti 18.1.2019 klo 9.02: WTF?! really, so with btrfs raid10 I can't lose more than one drive? that sucks, that an advantage of raid 10! and the crazy thing is, thats not documented, not in the manpage nor btrfs wiki and and thats is very important. thats unbelievable .. You sho