Re: [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update

2017-02-02 Thread Qu Wenruo
At 02/03/2017 01:08 PM, Christoph Anton Mitterer wrote: Hey Qu. I'm sending this off-list for privacy reasons of the contained file- names / hash sums. It doesn't contained anything particularly secret, nevertheless, please try to avoid spreading it too far around and delete it once you

[PATCH 1/2] Btrfs: create helper for processing bits on contiguous pages

2017-02-02 Thread Liu Bo
This introduces a new helper which can be used to process pages bits. Signed-off-by: Liu Bo --- fs/btrfs/extent_io.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c

[PATCH 2/2] Btrfs: use helper to simplify lock/unlock pages

2017-02-02 Thread Liu Bo
Since we have a helper to set page bits, let lock_delalloc_pages and __unlock_for_delalloc use it. Signed-off-by: Liu Bo --- fs/btrfs/extent_io.c | 122 ++- fs/btrfs/extent_io.h | 3 +- 2 files changed, 54 insertions(+), 71

Re: [REVERT][v4.10][V2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2017-02-02 Thread Joseph Salisbury
On 02/02/2017 03:57 PM, Greg KH wrote: > On Thu, Feb 02, 2017 at 02:58:16PM -0500, Joseph Salisbury wrote: >> On 02/02/2017 01:23 PM, Greg KH wrote: >>> On Thu, Feb 02, 2017 at 12:38:33PM -0500, Joseph Salisbury wrote: Hello, Please consider reverting commit

Re: [REVERT][v4.10][V2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2017-02-02 Thread Greg KH
On Thu, Feb 02, 2017 at 02:58:16PM -0500, Joseph Salisbury wrote: > On 02/02/2017 01:23 PM, Greg KH wrote: > > On Thu, Feb 02, 2017 at 12:38:33PM -0500, Joseph Salisbury wrote: > >> Hello, > >> > >> Please consider reverting commit > >> 4c63c2454eff996c5e27991221106eb511f7db38 in the next v4.x.y

[REVERT][v4.10][V2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2017-02-02 Thread Joseph Salisbury
On 02/02/2017 01:23 PM, Greg KH wrote: > On Thu, Feb 02, 2017 at 12:38:33PM -0500, Joseph Salisbury wrote: >> Hello, >> >> Please consider reverting commit >> 4c63c2454eff996c5e27991221106eb511f7db38 in the next v4.x.y release. > What release can I remove it from? > > It isn't in 4.4.y, and 4.9.y

Re: [PATCH] Btrfs: remove duplicated find_get_pages_contig

2017-02-02 Thread David Sterba
On Thu, Feb 02, 2017 at 11:11:15AM -0800, Liu Bo wrote: > On Thu, Feb 02, 2017 at 07:42:43PM +0100, David Sterba wrote: > > On Mon, Jan 30, 2017 at 12:26:30PM -0800, Liu Bo wrote: > > > This creates a helper to manipulate page bits to avoid duplicate uses. > > > > This seems too short for what

Re: [PATCH 04/24] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-02-02 Thread Liu Bo
Hi, On Thu, Feb 02, 2017 at 06:34:02PM +0100, Jan Kara wrote: > Provide helper functions for setting up dynamically allocated > backing_dev_info structures for filesystems and cleaning them up on > superblock destruction. Just one concern, will this cause problems for multiple superblock cases

Re: [PATCH] Btrfs: remove duplicated find_get_pages_contig

2017-02-02 Thread Liu Bo
On Thu, Feb 02, 2017 at 07:42:43PM +0100, David Sterba wrote: > On Mon, Jan 30, 2017 at 12:26:30PM -0800, Liu Bo wrote: > > This creates a helper to manipulate page bits to avoid duplicate uses. > > This seems too short for what the patch does. It adds a new page ops bit > that would deserve a

Re: [PATCH v2] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread Liu Bo
On Thu, Feb 02, 2017 at 05:56:33PM +, fdman...@kernel.org wrote: > From: Filipe Manana > > At close_ctree() we free the block groups and then only after we wait for > any running worker kthreads to finish and shutdown the workqueues. This > behaviour is racy and it

Re: [PATCH] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread Liu Bo
On Thu, Feb 02, 2017 at 06:58:03PM +, Filipe Manana wrote: > On Thu, Feb 2, 2017 at 6:53 PM, Liu Bo wrote: > > On Thu, Feb 02, 2017 at 06:32:01PM +, Filipe Manana wrote: > >> On Thu, Feb 2, 2017 at 6:19 PM, Liu Bo wrote: > >> > On Wed, Feb 01,

Re: [PATCH] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread Filipe Manana
On Thu, Feb 2, 2017 at 6:53 PM, Liu Bo wrote: > On Thu, Feb 02, 2017 at 06:32:01PM +, Filipe Manana wrote: >> On Thu, Feb 2, 2017 at 6:19 PM, Liu Bo wrote: >> > On Wed, Feb 01, 2017 at 11:01:28PM +, fdman...@kernel.org wrote: >> >> From: Filipe

Re: [PATCH] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread Liu Bo
On Thu, Feb 02, 2017 at 06:32:01PM +, Filipe Manana wrote: > On Thu, Feb 2, 2017 at 6:19 PM, Liu Bo wrote: > > On Wed, Feb 01, 2017 at 11:01:28PM +, fdman...@kernel.org wrote: > >> From: Filipe Manana > >> > >> At close_ctree() we free the block

Re: [PATCH] Btrfs: remove duplicated find_get_pages_contig

2017-02-02 Thread David Sterba
On Mon, Jan 30, 2017 at 12:26:30PM -0800, Liu Bo wrote: > This creates a helper to manipulate page bits to avoid duplicate uses. This seems too short for what the patch does. It adds a new page ops bit that would deserve a separate patch. Please try to split it to smaller parts. > +static

Re: [PATCH] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread Filipe Manana
On Thu, Feb 2, 2017 at 6:19 PM, Liu Bo wrote: > On Wed, Feb 01, 2017 at 11:01:28PM +, fdman...@kernel.org wrote: >> From: Filipe Manana >> >> At close_ctree() we free the block groups and then only after we wait for >> any running worker kthreads to

Re: Subject: [REVERT][v4.x.y] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2017-02-02 Thread Greg KH
On Thu, Feb 02, 2017 at 12:38:33PM -0500, Joseph Salisbury wrote: > Hello, > > Please consider reverting commit > 4c63c2454eff996c5e27991221106eb511f7db38 in the next v4.x.y release. What release can I remove it from? It isn't in 4.4.y, and 4.9.y doesn't make much sense, unless it's reverted in

Re: [PATCH] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread Liu Bo
On Wed, Feb 01, 2017 at 11:01:28PM +, fdman...@kernel.org wrote: > From: Filipe Manana > > At close_ctree() we free the block groups and then only after we wait for > any running worker kthreads to finish and shutdown the workqueues. This > behaviour is racy and it

Re: [PATCH] Btrfs: kill trans in run_delalloc_nocow and btrfs_cross_ref_exist

2017-02-02 Thread David Sterba
On Mon, Jan 30, 2017 at 12:25:28PM -0800, Liu Bo wrote: > run_delalloc_nocow has used trans in two places where they don't actually need > @trans. > > For btrfs_lookup_file_extent, we search for file extents without COWing > anything, and for btrfs_cross_ref_exist, the only place where we need

[PATCH v2] Btrfs: fix assertion failure when freeing block groups at close_ctree()

2017-02-02 Thread fdmanana
From: Filipe Manana At close_ctree() we free the block groups and then only after we wait for any running worker kthreads to finish and shutdown the workqueues. This behaviour is racy and it triggers an assertion failure when freeing block groups because while we are doing it

[PATCH 0/24 RFC] fs: Convert all embedded bdis into separate ones

2017-02-02 Thread Jan Kara
Hello, this patch series converts all embedded occurences of struct backing_dev_info to use standalone dynamically allocated structures. This makes bdi handling unified across all bdi users and generally removes some boilerplate code from filesystems setting up their own bdi. It also allows us to

Re: [PATCH] Btrfs: pass delayed_refs directly to btrfs_find_delayed_ref_head

2017-02-02 Thread David Sterba
On Mon, Jan 30, 2017 at 12:24:37PM -0800, Liu Bo wrote: > All we need is @delayed_refs, all callers have get it ahead of calling > btrfs_find_delayed_ref_head since lock needs to be acquired firstly, there is > no reason to deference it again inside the function. > > Signed-off-by: Liu Bo

Subject: [REVERT][v4.x.y] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2017-02-02 Thread Joseph Salisbury
Hello, Please consider reverting commit 4c63c2454eff996c5e27991221106eb511f7db38 in the next v4.x.y release. It was included upstream as of v4.7-rc1 This commit introduced a regression, described in the following bug: http://bugs.launchpad.net/bugs/1619918 This new regression was discussed in

Re: [PATCH] Btrfs: remove unused trans in read_block_for_search

2017-02-02 Thread David Sterba
On Mon, Jan 30, 2017 at 12:23:42PM -0800, Liu Bo wrote: > @trans is not used at all, this removes it. > > Signed-off-by: Liu Bo Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message

[PATCH 08/24] btrfs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Chris Mason CC: Josef Bacik CC: David Sterba CC: linux-btrfs@vger.kernel.org Signed-off-by: Jan Kara

[PATCH 04/24] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-02-02 Thread Jan Kara
Provide helper functions for setting up dynamically allocated backing_dev_info structures for filesystems and cleaning them up on superblock destruction. CC: linux-...@lists.infradead.org CC: linux-...@vger.kernel.org CC: Petr Vandrovec CC: linux-ni...@vger.kernel.org CC:

Re: raid1: cannot add disk to replace faulty because can only mount fs as read-only.

2017-02-02 Thread Austin S. Hemmelgarn
On 2017-02-02 09:25, Adam Borowski wrote: On Thu, Feb 02, 2017 at 07:49:50AM -0500, Austin S. Hemmelgarn wrote: This is a severe bug that makes a not all that uncommon (albeit bad) use case fail completely. The fix had no dependencies itself and I don't see what's bad in mounting a RAID

Re: raid1: cannot add disk to replace faulty because can only mount fs as read-only.

2017-02-02 Thread Adam Borowski
On Thu, Feb 02, 2017 at 07:49:50AM -0500, Austin S. Hemmelgarn wrote: > This is a severe bug that makes a not all that uncommon (albeit bad) use > case fail completely. The fix had no dependencies itself and I don't see what's bad in mounting a RAID degraded. Yeah, it provides no redundancy but

Re: btrfs receive leaves new subvolume modifiable during operation

2017-02-02 Thread Austin S. Hemmelgarn
On 2017-02-02 05:52, Graham Cobb wrote: On 02/02/17 00:02, Duncan wrote: If it's a workaround, then many of the Linux procedures we as admins and users use every day are equally workarounds. Setting 007 perms on a dir that doesn't have anything immediately security vulnerable in it, simply to

Re: raid1: cannot add disk to replace faulty because can only mount fs as read-only.

2017-02-02 Thread Austin S. Hemmelgarn
On 2017-02-01 17:48, Duncan wrote: Adam Borowski posted on Wed, 01 Feb 2017 12:55:30 +0100 as excerpted: On Wed, Feb 01, 2017 at 05:23:16AM +, Duncan wrote: Hans Deragon posted on Tue, 31 Jan 2017 21:51:22 -0500 as excerpted: But the current scenario makes it difficult for me to put

Re: [4.7.2] btrfs_run_delayed_refs:2963: errno=-17 Object already exists

2017-02-02 Thread Marc Joliet
On Sunday 28 August 2016 15:29:08 Kai Krakow wrote: > Hello list! Hi list > It happened again. While using VirtualBox the following crash happened, > btrfs check found a lot of errors which it couldn't repair. Earlier > that day my system crashed which may already introduced errors into my >

Re: btrfs receive leaves new subvolume modifiable during operation

2017-02-02 Thread Graham Cobb
On 02/02/17 00:02, Duncan wrote: > If it's a workaround, then many of the Linux procedures we as admins and > users use every day are equally workarounds. Setting 007 perms on a dir > that doesn't have anything immediately security vulnerable in it, simply > to keep other users from even

[PATCH v3] btrfs-progs: fsck-tests: verify 'btrfs check --repair' fixes corrupted nlink field

2017-02-02 Thread Lakshmipathi.G
Signed-off-by: Lakshmipathi.G --- tests/fsck-tests/026-check-inode-link/test.sh | 30 +++ 1 file changed, 30 insertions(+) create mode 100755 tests/fsck-tests/026-check-inode-link/test.sh diff --git