Re: [PATCH] Btrfs-progs: convert: do not clear nodatasum flag in inode item

2017-06-28 Thread Lakshmipathi.G
Could you please add also a test-script for this interesting issue under tests/convert-tests (If its not already there)?. thanks. Cheers, Lakshmipathi.G http://www.giis.co.in http://www.webminal.org On Thu, Jun 29, 2017 at 2:59 AM, Liu Bo wrote: > With the current

[PATCH v2 13/13] btrfs: clean up extraneous computations in add_delayed_refs

2017-06-28 Thread Edmund Nadolski
Repeating the same computation in multiple places is not necessary. Signed-off-by: Edmund Nadolski Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git

[PATCH v2 12/13] btrfs: allow backref search checks for shared extents

2017-06-28 Thread Edmund Nadolski
When called with a struct share_check, find_parent_nodes() will detect a shared extent and immediately return with BACKREF_SHARED_FOUND. Signed-off-by: Edmund Nadolski Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 161

[PATCH v2 08/13] btrfs: convert prelimary reference tracking to use rbtrees

2017-06-28 Thread Edmund Nadolski
It's been known for a while that the use of multiple lists that are periodically merged was an algorithmic problem within btrfs. There are several workloads that don't complete in any reasonable amount of time (e.g. btrfs/130) and others that cause soft lockups. The solution is to use a pair of

[PATCH v2 11/13] btrfs: add cond_resched() calls when resolving backrefs

2017-06-28 Thread Edmund Nadolski
Since backref resolution is CPU-intensive, the cond_resched calls should help alleviate soft lockup occurences. Signed-off-by: Edmund Nadolski Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v2 09/13] btrfs: add a node counter to each of the rbtrees

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney This patch adds counters to each of the rbtrees so that we can tell how large they are growing for a given workload. These counters will be exported by tracepoints in the next patch. Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 6

[PATCH v2 10/13] btrfs: backref, add tracepoints for prelim_ref insertion and merging

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney This patch adds a tracepoint event for prelim_ref insertion and merging. For each, the ref being inserted or merged and the count of tree nodes is issued. Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 117

[PATCH v2 05/13] btrfs: backref, cleanup __ namespace abuse

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney We typically use __ to indicate a helper routine that shouldn't be called directly without understanding the proper context required to do so. We use static functions to indicate that a function is private to a particular C file. The backref code uses static

[PATCH v2 03/13] btrfs: backref, constify some arguments

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney This constifies a few buffers used in the backref code. Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/backref.c

[PATCH v2 07/13] btrfs: remove ref_tree implementation from backref.c

2017-06-28 Thread Edmund Nadolski
Commit afce772e87c3 ("btrfs: fix check_shared for fiemap ioctl") added the ref_tree code in backref.c to reduce backref searching for shared extents under the FIEMAP ioctl. This code will not be compatible with the upcoming rbtree changes for improved backref searching, so this patch removes the

[PATCH v2 02/13] btrfs: constify tracepoint arguments

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney Tracepoint arguments are all read-only. If we mark the arguments as const, we're able to keep or convert those arguments to const where appropriate. Signed-off-by: Jeff Mahoney --- fs/btrfs/async-thread.c | 6 +-

[PATCH v2 01/13] btrfs: struct-funcs, constify readers

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney We have reader helpers for most of the on-disk structures that use an extent_buffer and pointer as offset into the buffer that are read-only. We should mark them as const and, in turn, allow consumers of these interfaces to mark the buffers const as well. No

[PATCH v2 06/13] btrfs: btrfs_check_shared should manage its own transaction

2017-06-28 Thread Edmund Nadolski
Commit afce772e87c3 ("btrfs: fix check_shared for fiemap ioctl") added transaction semantics around calls to btrfs_check_shared() in order to provide accurate accounting of delayed refs. The transaction management should be done inside btrfs_check_shared(), so that callers do not need to manage

[PATCH v2 00/13] use rbtrees for preliminary backrefs

2017-06-28 Thread Edmund Nadolski
This patch series attempts to improve the performance of backref searches by changing the prelim_refs implementation to use rbtrees instead of lists. This also aims to reduce the soft lockup occurences that can result when a backref search consumes too much cpu time. Test runs of btrfs/130 show

[PATCH v2 04/13] btrfs: backref, add unode_aux_to_inode_list helper

2017-06-28 Thread Edmund Nadolski
From: Jeff Mahoney Replacing the double cast and ternary conditional with a helper makes the code easier on the eyes. Signed-off-by: Jeff Mahoney --- fs/btrfs/backref.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH] btrfs: Keep one more workspace around

2017-06-28 Thread Nick Terrell
> Is there a version I should be testing? Not yet, I'm working on v2 of the patch set, which will be ready soon. > I got a bunch of those: > [10170.448783] kworker/u8:6: page allocation stalls for 60720ms, order:0, > mode:0x14000c2(GFP_KERNEL|__GFP_HIGHMEM), nodemask=(null) > [10170.448819]

Re: [PATCH] lib/zstd: use div_u64() to let it build on 32-bit

2017-06-28 Thread Adam Borowski
On Tue, Jun 27, 2017 at 05:27:51AM +, Nick Terrell wrote: > Adam, I’ve applied the same patch in my tree. I’ll send out the update [1] > once it's reviewed, since I also reduced the stack usage of functions > using over 1 KB of stack space. > > I have userland tests set up mocking the linux

[PATCH] Btrfs-progs: convert: do not clear nodatasum flag in inode item

2017-06-28 Thread Liu Bo
With the current btrfs-convert, if we convert a ext4 without data checksum, it'd not set nodatasum flag in inode item, nor create csum item, reading file ends up with checksum errors. Signed-off-by: Liu Bo --- convert/source-ext2.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: Lock between userspace and btrfs-cleaner on extent_buffer

2017-06-28 Thread Sargun Dhillon
On Wed, Jun 28, 2017 at 2:55 PM, Jeff Mahoney wrote: > On 6/27/17 5:12 PM, Jeff Mahoney wrote: >> On 6/13/17 9:05 PM, Sargun Dhillon wrote: >>> On Thu, Jun 8, 2017 at 11:34 AM, Sargun Dhillon wrote: I have a deadlock caught in the wild between two processes

Re: Lock between userspace and btrfs-cleaner on extent_buffer

2017-06-28 Thread Jeff Mahoney
On 6/27/17 5:12 PM, Jeff Mahoney wrote: > On 6/13/17 9:05 PM, Sargun Dhillon wrote: >> On Thu, Jun 8, 2017 at 11:34 AM, Sargun Dhillon wrote: >>> I have a deadlock caught in the wild between two processes -- >>> btrfs-cleaner, and userspace process (Docker). Here, you can see

[PATCH] btrfs: Add qgroup_auto_cleanup mount flag to automatically cleanup qgroups

2017-06-28 Thread Sargun Dhillon
This patch introduces a new mount option - qgroup_auto_cleanup. The purpose of this mount option is to cause btrfs to automatically delete qgroups on subvolume deletion. This only cleans up the associated level-0 qgroup, and not qgroups that are above it. Since this behaviour is API-changing it

Re: [PULL] Btrfs for 4.13, part 1

2017-06-28 Thread David Sterba
On Tue, Jun 27, 2017 at 12:00:20PM +0100, Filipe Manana wrote: > On Mon, Jun 26, 2017 at 5:58 PM, Chris Mason wrote: > > On 06/23/2017 11:16 AM, David Sterba wrote: > >> this is the main batch for 4.13. There are some user visible changes, see > >> below. The core updates improve

Re: How to fix errors that check --mode lomem finds, but --mode normal doesn't?

2017-06-28 Thread Marc MERLIN
[cc trimmed] On Wed, Jun 28, 2017 at 03:10:27PM +0800, Lu Fengqi wrote: > Because the output is abnormal, except for the relevant DIR_ITEM and > DIR_INDEX, I can't find the above mentiond INODE_ITEM and EXTENT_DATA. > I wonder if the file system is online when this command is executed? If > so,

Re: [PULL] Btrfs for 4.13, part 1

2017-06-28 Thread David Sterba
On Mon, Jun 26, 2017 at 08:53:14AM +0800, Qu Wenruo wrote: > At 06/26/2017 05:34 AM, Jeff Mahoney wrote: > > On 6/24/17 6:05 AM, Wang Shilong wrote: > >> Sorry for bikeshedding. > >> > >> On Fri, Jun 23, 2017 at 11:16 PM, David Sterba wrote: > >>> Hi, > >>> > >>> this is the

Re: [PULL] Btrfs for 4.13, part 1

2017-06-28 Thread David Sterba
On Sat, Jun 24, 2017 at 06:05:03PM +0800, Wang Shilong wrote: > Sorry for bikeshedding. No problem, I won't read the rest of the mail then. (IOW, don't write such things if you want people to read your mail.) > On Fri, Jun 23, 2017 at 11:16 PM, David Sterba wrote: > > Hi, > >

Re: [PATCH] Btrfs-progs: man: nodesize must be power of 2 now

2017-06-28 Thread David Sterba
On Tue, Jun 27, 2017 at 03:25:45PM -0600, Liu Bo wrote: > This updates mkfs.btrfs's man page with the new limitation that nodesize must > be a power of 2 as well. > > Signed-off-by: Liu Bo Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] fstests: btrfs: reorder the arguments of btrfs replace in btrfs/027

2017-06-28 Thread David Sterba
On Wed, Jun 28, 2017 at 01:45:31PM +0800, Lu Fengqi wrote: > The option parser only accept options before non-option argument. > Although David Sterba has submitted commit df8c7225ba00 ("btrfs: reorder > arguments so that options come first"), but this case seems to be left out. > >

Re: [PATCH v4 0/6] Chunk level degradable check

2017-06-28 Thread David Sterba
On Wed, Jun 28, 2017 at 01:43:29PM +0800, Qu Wenruo wrote: > The patchset can be fetched from my github repo: > https://github.com/adam900710/linux/tree/degradable > > The patchset is based on David's for-4.13-part1 branch. Thanks. After a quick skim of the patchset, looks good to me for

Re: [PATCH 0/5] v3 block subsystem refcounter conversions

2017-06-28 Thread Jens Axboe
On 06/28/2017 05:58 AM, Reshetova, Elena wrote: > >> Subject: Re: [PATCH 0/5] v3 block subsystem refcounter conversions >> >> On Tue, Jun 27, 2017 at 6:26 AM, Jens Axboe wrote: >>> On 06/27/2017 05:39 AM, Elena Reshetova wrote: Changes in v3: No changes in patches

RE: [PATCH 0/5] v3 block subsystem refcounter conversions

2017-06-28 Thread Reshetova, Elena
> Subject: Re: [PATCH 0/5] v3 block subsystem refcounter conversions > > On Tue, Jun 27, 2017 at 6:26 AM, Jens Axboe wrote: > > On 06/27/2017 05:39 AM, Elena Reshetova wrote: > >> Changes in v3: > >> No changes in patches apart from trivial rebases, but now by > >> default

[bug report] Btrfs: replace tree->mapping with tree->private_data

2017-06-28 Thread Dan Carpenter
Hello Josef Bacik, The patch c6100a4b4e3d: "Btrfs: replace tree->mapping with tree->private_data" from May 5, 2017, leads to the following static checker warning: fs/btrfs/extent_io.c:3424 __extent_writepage_io() error: we previously assumed 'tree->ops' could be null (see line

[PATCH] btrfs-progs: mkfs: Replace number with enum

2017-06-28 Thread Gu Jinxiang
For code maintainability and scalability, replace hardcoded constant with a meaningful enum. Signed-off-by: Gu Jinxiang --- mkfs/common.c | 47 --- mkfs/common.h | 14 +- 2 files changed, 37 insertions(+), 24

Re: [QUESTION] xfstest generic/015 run failed

2017-06-28 Thread Nikolay Borisov
On 28.06.2017 08:59, Dai Xiang wrote: > Hi! I test on my host and find below issue, i want to know how can fix it? > > root@ubuntu ~/xfstests# ./check generic/015 > FSTYP -- btrfs > PLATFORM -- Linux/x86_64 ubuntu 4.12.0-rc6 I don't observe this failure on rc6/rc7 -- To

[PATCH v3] btrfs: remove unused sectorsize member

2017-06-28 Thread Nikolay Borisov
The sectorsize member of btrfs_block_group_cache is unused. So remove it, this reduces the number of holes in the struct. With patch: /* size: 856, cachelines: 14, members: 40 */ /* sum members: 837, holes: 4, sum holes: 19 */ /* bit holes: 1, sum bit holes: 29 bits */ /* last cacheline: 24 bytes

[PATCH RESEND 2/2] btrfs-progs: Add some check for sectorsize and nodesize

2017-06-28 Thread Gu Jinxiang
Add some check for sectorsize and nodesize, make it consistent with kernel. Signed-off-by: Gu Jinxiang --- convert/main.c | 6 +- fsfeatures.h | 2 +- mkfs/main.c| 8 +--- utils.c| 21 +++-- 4 files changed, 22 insertions(+), 15

[PATCH RESEND 1/2] btrfs-progs: Replace number with a exsiting macro

2017-06-28 Thread Gu Jinxiang
Use macro SZ_4K to replace number 4096 when define macro BTRFS_SUPER_INFO_SIZE. Signed-off-by: Gu Jinxiang --- disk-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-io.h b/disk-io.h index dfe4cf0..5c293eb 100644 --- a/disk-io.h +++ b/disk-io.h

Re: How to fix errors that check --mode lomem finds, but --mode normal doesn't?

2017-06-28 Thread Lu Fengqi
On Tue, Jun 27, 2017 at 04:11:46PM -0700, Marc MERLIN wrote: >On Mon, Jun 26, 2017 at 06:46:16PM +0800, Lu Fengqi wrote: >> Thanks for the updated information. I'm sorry that the false alert make >> you feel nervous. > >If you can help me find out whether those are real errors that I need to fix

Re: [PULL] Btrfs for 4.13, part 1

2017-06-28 Thread Nikolay Borisov
On 23.06.2017 18:16, David Sterba wrote: > Hi, > > this is the main batch for 4.13. There are some user visible changes, see > below. The core updates improve error handling (mostly related to bios), with > the usual incremental work on the GFP_NOFS (mis)use removal. All patches have > been in

btrfs-progs: Replace number with a exsiting macro

2017-06-28 Thread Gu Jinxiang
Use macro SZ_4K to replace number 4096 when define macro BTRFS_SUPER_INFO_SIZE. Signed-off-by: Gu Jinxiang --- disk-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-io.h b/disk-io.h index dfe4cf0..5c293eb 100644 --- a/disk-io.h +++ b/disk-io.h

btrfs-progs: Add some check for sectorsize and nodesize

2017-06-28 Thread Gu Jinxiang
Add some check for sectorsize and nodesize, make it consistent with kernel. Signed-off-by: Gu Jinxiang --- convert/main.c | 6 +- fsfeatures.h | 2 +- mkfs/main.c| 8 +--- utils.c| 21 +++-- 4 files changed, 22 insertions(+), 15