Re: On shrinkable caches

2016-06-23 Thread Nikolay Borisov
On 06/23/2016 12:43 PM, David Sterba wrote: > On Mon, Jun 20, 2016 at 02:26:12PM +0300, Nikolay Borisov wrote: >> I have a question regarding the SLAB_RECLAIM_ACCOUNT flag with which >> BTRFS caches are created. Currently there isn't a single usage of >> register_sh

On shrinkable caches

2016-06-20 Thread Nikolay Borisov
Hello, I have a question regarding the SLAB_RECLAIM_ACCOUNT flag with which BTRFS caches are created. Currently there isn't a single usage of register_shrinker under fs/btrfs. Apart from the inode cache which is being shrunk from the generic super_cache_scan I don't think the memory used for

[PATCH] btrfs: Fix slab accounting flags

2016-06-23 Thread Nikolay Borisov
as SLAB_TEMPORARY, to better document the lifetime of the objects (it just translates to SLAB_RECLAIM_ACCOUNT). Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/backref.c | 2 +- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/delayed-ref.c | 8 fs/btrfs/disk-io.c

[PATCH] btrfs: Handle uninitialised inode eviction

2016-06-29 Thread Nikolay Borisov
ads to vfs calling into btrfs_evict_inode. This leads to null pointer dereference. To handle this situation check whether the passed inode has root set and just free it in case it doesn't. Signed-off-by: Nikolay Borisov <ker...@kyup.com> --- fs/btrfs/inode.c | 9 - 1 file changed, 8 i

[PATCH] btrfs: Add ratelimiting to printing facility

2016-07-12 Thread Nikolay Borisov
Currently the btrfs printk infrastructure doesn't implement any kind of ratelimiting. Recently I came accross a case where due to FS corruption an excessive amount of printk caused the softlockup detector to trigger and reset the server. This patch aims to avoid two types of issue: * I want to

[PATCH] btrfs: Ratelimit message printing

2016-07-13 Thread Nikolay Borisov
the "naked" btrfs_info is called. Signed-off-by: Nikolay Borisov <ker...@kyup.com> --- Hello David, How about something like that? fs/btrfs/file-item.c | 2 +- fs/btrfs/super.c | 21 +++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/f

Re: [PATCH] btrfs: Add ratelimiting to printing facility

2016-07-12 Thread Nikolay Borisov
On 07/12/2016 04:20 PM, David Sterba wrote: > On Tue, Jul 12, 2016 at 03:20:12PM +0300, Nikolay Borisov wrote: >> Currently the btrfs printk infrastructure doesn't implement any >> kind of ratelimiting. > > If you count the whole infrastructure, it does. See ctree.h and mac

[PATCH 1/2] btrfs: Ratelimit an info message

2016-07-13 Thread Nikolay Borisov
Recently during a crash it became apparent that this particular message can be printed so many times that it causes the softlockup detector to trigger. Fix it by ratelimiting it --- fs/btrfs/file-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/file-item.c

[PATCH 2/2] btrfs: Add ratelimit to btrfs printing

2016-07-13 Thread Nikolay Borisov
This patch adds ratelimiting to all messages which are not using the _rl version of the various printing APIs in btrf. This is designed to be used as a safety net, since a flood messages might cause the softlockup detector to trigger. To reduce interference between different classes of messages

btrfs_evit_inode doesn't handle not fully initialized inodes.

2016-06-28 Thread Nikolay Borisov
Hello, On kernel 4.4.9 I've observed the following oops: [3248626.755570] BUG: unable to handle kernel NULL pointer dereference at 035c [3248626.755839] IP: [] btrfs_evict_inode+0x2f/0x610 [btrfs] [3248626.756079] PGD 1eaf8d067 PUD 4096a0067 PMD 0 [3248626.756383] Oops: [#1]

Re: [PATCH] btrfs: Fix slab accounting flags

2016-07-05 Thread Nikolay Borisov
After some days of inactivity a gentle ping is in order. On 06/23/2016 09:17 PM, Nikolay Borisov wrote: > BTRFS is using a variety of slab caches to satisfy internal needs. > Those slab caches are always allocated with the SLAB_RECLAIM_ACCOUNT, > meaning allocations from the caches

[RESEND PATCH] btrfs: Fix slab accounting flags

2016-07-10 Thread Nikolay Borisov
as SLAB_TEMPORARY, to better document the lifetime of the objects (it just translates to SLAB_RECLAIM_ACCOUNT). Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> Reviewed-by: David Sterba <dste...@suse.com> --- fs/btrfs/backref.c | 2 +- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/d

[RESEND PATCH] btrfs: Handle uninitialised inode eviction

2016-07-11 Thread Nikolay Borisov
ads to vfs calling into btrfs_evict_inode. This leads to null pointer dereference. To handle this situation check whether the passed inode has root set and just free it in case it doesn't. Signed-off-by: Nikolay Borisov <ker...@kyup.com> Reviewed-by: Josef Bacik <jba...@fb.com> --- fs/bt

Re: [RESEND PATCH] btrfs: Handle uninitialised inode eviction

2016-07-11 Thread Nikolay Borisov
On 07/11/2016 11:48 AM, David Sterba wrote: > On Mon, Jul 11, 2016 at 09:43:09AM +0300, Nikolay Borisov wrote: >> The code flow in btrfs_new_inode allows for btrfs_evict_inode to be >> called with not fully initialised inode (e.g. ->root member not >> being se

Crash in btrfs_uuid_tree_iterate during mount

2016-08-05 Thread Nikolay Borisov
Hello, Recently I started getting the following crashes on some servers, running btrfs: [340435.480338] BTRFS info (device loop7): disk space caching is enabled [340435.480509] BTRFS: has skinny extents [340441.716174] BTRFS: checking UUID tree [340441.912070] BUG: unable to handle kernel

Re: Crash in btrfs_uuid_tree_iterate during mount

2016-08-05 Thread Nikolay Borisov
On Fri, Aug 5, 2016 at 6:12 PM, Chris Mason <c...@fb.com> wrote: > > On 08/05/2016 07:08 AM, Nikolay Borisov wrote: >> Hello, >> >> Any ideas how come btrfs_path can be all zero, the one in >> the first slot comes from the increment in btrfs_next_old_item.

Re: Crash in btrfs_uuid_tree_iterate during mount

2016-08-08 Thread Nikolay Borisov
On 08/05/2016 06:12 PM, Chris Mason wrote: > > On 08/05/2016 07:08 AM, Nikolay Borisov wrote: >> Hello, >> >> Recently I started getting the following crashes on some servers, >> running btrfs: >> >> [340435.480338] BTRFS info (device loop7): disk

Re: Crash in btrfs_uuid_tree_iterate during mount

2016-08-08 Thread Nikolay Borisov
On 08/08/2016 05:16 PM, Chris Mason wrote: > > Fantastic, thanks again for digging through it. Making the patch is > much easier than testing the patch in this case. If you can trigger > this semi-reliably, we can add some debugging to make sure we're not > papering over some other problem.

GPF in __mark_inode_dirty due to locked_inode_to_wb_and_lock_list returning NULL

2016-06-30 Thread Nikolay Borisov
Hello, In light of the discussion in https://patchwork.kernel.org/patch/9187411/ and the discussion at https://groups.google.com/forum/#!topic/syzkaller/XvxH3cBQ134 I think the following might be related: [1416412.898946] BUG: unable to handle kernel NULL pointer dereference at

Re: GPF in __mark_inode_dirty due to locked_inode_to_wb_and_lock_list returning NULL

2016-07-04 Thread Nikolay Borisov
On 07/01/2016 08:38 PM, Tejun Heo wrote: > On Fri, Jul 01, 2016 at 12:00:50PM +0200, Jan Kara wrote: >> Hello, >> >> On Thu 30-06-16 14:18:14, Nikolay Borisov wrote: >>> In light of the discussion in https://patchwork.kernel.org/patch/9187411/ >>>

[PATCH 24/38] btrfs: make btrfs_print_data_csum_error take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/btrfs_inode.h | 8 fs/btrfs/compression.c | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 36eca5464e1b..c10d21

[PATCH 26/38] btrfs: make repair_io_failure take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent_io.c | 10 +- fs/btrfs/extent_io.h | 4 ++-- fs/btrfs/scrub.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 0e73e48a9c4c..a405f6

[PATCH 27/38] btrfs: make clean_io_failure take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent_io.c | 20 ++-- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a405f6

[PATCH 31/38] btrfs: Make check_parent_dirs_for_sync take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/tree-log.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 610fe04805b6..cc616d424b7a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs

[PATCH 23/38] btrfs: make free_io_failure take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent_io.c | 14 +++--- fs/btrfs/extent_io.h | 4 +++- fs/btrfs/inode.c | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 996306

[PATCH 33/38] btrfs: Make btrfs_extent_item_to_extent_map take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file-item.c | 9 - fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index cfa63b

[PATCH 18/38] btrfs: Make fille_holes take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/file.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 53fedf3dcaef..e37b643

[PATCH 03/38] btrfs: make btrfs_set_inode_index_count take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/inode.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index f438257be5a0..c8796391eed3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5

[PATCH 00/38] More btrfs_inode cleanups

2017-02-17 Thread Nikolay Borisov
that could undergo simplification so I expect further patches to reduce the size of the btrfs module. Nikolay Borisov (38): btrfs: Make btrfs_log_all_parents take btrfs_inode btrfs: Make btrfs_insert_dir_item take btrfs_inode btrfs: make btrfs_set_inode_index_count take btrfs_inode btrfs: Make

[PATCH 02/38] btrfs: Make btrfs_insert_dir_item take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/dir-item.c| 6 +++--- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- fs/btrfs/transaction.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/ctr

[PATCH 14/38] btrfs: Make (__)btrfs_add_inode_defrag take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 22 +++--- fs/btrfs/inode.c | 8 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/fs/btrfs/

[PATCH 10/38] btrfs: Make btrfs_orphan_reserve_metadata take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 10 +- fs/btrfs/inode.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/

[PATCH 09/38] btrfs: Make calc_csum_metadata_size take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent-tree.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index

[PATCH 01/38] btrfs: Make btrfs_log_all_parents take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/tree-log.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 3cc972330ab3..a92a73139065 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCH 04/38] btrfs: Make btrfs_set_inode_index take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/inode.c | 22 +++--- fs/btrfs/ioctl.c | 2 +- fs/btrfs/transaction.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c87963

[PATCH 06/38] btrfs: make btrfs_is_free_space_inode take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/btrfs_inode.h | 8 fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/file-item.c | 2 +- fs/btrfs/inode.c | 22 +++--- 5 files changed, 19 insertions(+), 19 del

[PATCH 35/38] btrfs: Make clone_update_extent_map take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ioctl.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f907853e1c47..cdbf30e5743b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/i

[PATCH 32/38] btrfs: make btrfs_log_inode_parent take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/tree-log.c | 45 + 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index cc616d424b7a..f36e4c49bc0e 100644 --- a/fs/btrf

[PATCH 36/38] btrfs: Make check_extent_to_block take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/scrub.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index bdf58b0eaef8..9a747ed9116d 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -4236,7 +

[PATCH 34/38] btrfs: Make btrfs_clear_bit_hook take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 3 ++- fs/btrfs/inode.c | 37 ++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c

[PATCH 37/38] btrfs: Make get_extent_t take btrfs_inode

2017-02-17 Thread Nikolay Borisov
In addition to changing the signature, this patch also switches all the functions which are used as an argument to also take btrfs_inode. Namely those are: btrfs_get_extent and btrfs_get_extent_filemap. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 4 ++

[PATCH 38/38] btrfs: Make btrfs_del_delalloc_inode take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/inode.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d78ec8d78781..d83ec55f00d5 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1635,15 +1

[PATCH 20/38] btrfs: Make btrfs_lookup_ordered_range take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent_io.c| 4 ++-- fs/btrfs/file.c | 4 ++-- fs/btrfs/inode.c| 10 +- fs/btrfs/ordered-data.c | 6 +++--- fs/btrfs/ordered-data.h | 2

[PATCH 28/38] btrfs: make btrfs_free_io_failure_record take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent_io.c | 4 ++-- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 16860ab7cb5e..aecc3d87255e

[PATCH 30/38] btrfs: Make btrfs_orphan_add take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/inode.c | 37 ++--- fs/btrfs/relocation.c | 2 +- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/fs

[PATCH 25/38] btrfs: make check_compressed_csum take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/compression.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index b8de71abfbd3..9f5e2e222e2a 100644 --- a/fs/btrfs/compression.c +++ b/fs

[PATCH 19/38] btrfs: Make btrfs_mark_extent_written take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 8 fs/btrfs/inode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/c

[PATCH 21/38] btrfs: Make check_can_nocow take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/file.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index c12d7308205b..8e223c78c8fe 100

[PATCH 15/38] btrfs: Make btrfs_requeue_inode_defrag take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/file.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 26ebb7608b92..18edcc74150c 100644 --- a/fs/

[PATCH 29/38] btrfs: make btrfs_orphan_del take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/inode.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 52387c033e3f..257f6e65fd68 100644 --- a/fs/btrfs/inode.c +++ b/fs

[PATCH 22/38] btrfs: Make lock_and_cleanup_extent_if_need take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/file.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 8e223c78c8fe..2d534d6c5514 100

[PATCH 17/38] btrfs: Make hole_mergeable take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 37458605847a..53fedf3dcaef 100644 --- a/fs/

[PATCH 16/38] btrfs: Make btrfs_drop_extent_cache take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 10 +- fs/btrfs/inode.c | 26 +- fs/btrfs/ioctl.c | 2 +- fs/btrfs/relocation.c |

[PATCH 07/38] btrfs: make btrfs_alloc_data_chunk_ondemand take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 8 fs/btrfs/file.c| 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8ab0ce65a218..76e661d00822

[PATCH 13/38] btrfs: ale btrfs_delalloc_release_metadata take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h| 2 +- fs/btrfs/extent-tree.c | 18 +- fs/btrfs/file.c | 4 ++-- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/inode-map.c| 2 +- fs/btrfs/inode.c

[PATCH 12/38] btrfs: Make btrfs_delalloc_reserve_metadata take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 69 +- fs/btrfs/file.c| 2 +- fs/btrfs/relocation.c | 2 +- 4 f

[PATCH 08/38] btrfs: Make drop_outstanding_extent take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/extent-tree.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index

[PATCH 11/38] btrfs: Make btrfs_orphan_release_metadata take btrfs_inode

2017-02-17 Thread Nikolay Borisov
From: Nikolay Borisov <n.borisov.l...@gmail.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 10 +- fs/btrfs/inode.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/

[PATCH 05/38] btrfs: Make btrfs_i_size_write take btrfs_inode

2017-02-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/btrfs_inode.h | 6 +++--- fs/btrfs/delayed-inode.c| 2 +- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/inode.c| 19 +-- fs/btrfs/ioctl.c| 4 ++-- fs/btrfs/transaction.c

Re: [PATCH 7/7] nonblocking aio: btrfs

2017-02-14 Thread Nikolay Borisov
On 14.02.2017 04:46, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > Return EAGAIN if any of the following checks fail > + i_rwsem is lockable > + NODATACOW or PREALLOC is set perhaps you wanted to say "NODATACOW or PREALLOC is _not_ set"? See below > + Can

Re: [PATCH v2] btrfs: qgroup: Move half of the qgroup accounting time out of commit trans

2017-02-16 Thread Nikolay Borisov
Just a minor nit. On 15.02.2017 04:43, Qu Wenruo wrote: > Just as Filipe pointed out, the most time consuming parts of qgroup are > btrfs_qgroup_account_extents() and > btrfs_qgroup_prepare_account_extents(). > Which both call btrfs_find_all_roots() to get old_roots and new_roots > ulist. > >

Re: [PATCH v2] btrfs: qgroup: Move half of the qgroup accounting time out of commit trans

2017-02-16 Thread Nikolay Borisov
On 16.02.2017 10:50, Qu Wenruo wrote: > > > At 02/16/2017 04:45 PM, Nikolay Borisov wrote: >> Just a minor nit. >> >> On 15.02.2017 04:43, Qu Wenruo wrote: >>> Just as Filipe pointed out, the most time consuming parts of qgroup

[PATCHv2 18/24] btrfs: Make btrfs_unlink_inode take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/ctree.h| 2 +- fs/btrfs/inode.c| 58 ++--- fs/btrfs/tree-log.c | 14 ++--- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/fs/btrfs/ctree.

[PATCHv2 14/24] btrfs: Make btrfs_log_changed_extents take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 0e061f91055e..e293ae0e18d7 100644 --- a/fs/btrfs/tree-log.c +++ b/fs

[PATCHv2 00/24] tree-log inode vs btrfs_inode cleanups

2017-01-17 Thread Nikolay Borisov
filename 2530163 174661 28288 2733112 29b438 fs/btrfs/btrfs.ko - both series applied So the net result of the 2 series is 435 bytes and I assume there will be further reduction in size once further cleanups are made Changes since v1: * Rebased all patche to latest master Nikolay

[PATCHv2 13/24] btrfs: Make btrfs_get_logged_extents take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/ordered-data.c | 4 ++-- fs/btrfs/ordered-data.h | 2 +- fs/btrfs/tree-log.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 041c33

[PATCHv2 08/24] btrfs: Make logged_inode_size take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index a7705173150e..20718cfebf89 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 23/24] btrfs: Make count_inode_extrefs take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8c110d0e16c3..47e4f3610348 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 12/24] btrfs: Make btrfs_log_trailing_hole take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1301c517c2f0..9f2c42016825 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 06/24] btrfs: Make btrfs_del_dir_entries_in_log take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/inode.c| 2 +- fs/btrfs/tree-log.c | 10 +- fs/btrfs/tree-log.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 41b1e2ed63b4..ebfeabafe1b1

[PATCHv2 17/24] btrfs: Make log_new_dir_dentries take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 38cda7869bf9..b0cc56fe86e9 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 11/24] btrfs: Make btrfs_log_all_xattrs take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 12872bf492bd..1301c517c2f0 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 19/24] btrfs: Make drop_one_dir_item take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index b2c0a30811f6..35434d686653 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 01/24] btrfs: Make btrfs_must_commit_transaction take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index b814cd7bbe70..a2a822a993af 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrf

[PATCHv2 09/24] btrfs: Make btrfs_check_ref_name_override take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 20718cfebf89..7669e95be423 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 02/24] btrfs: Make btrfs_record_unlink_dir take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/inode.c| 8 fs/btrfs/tree-log.c | 18 +- fs/btrfs/tree-log.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d49c3b

[PATCHv2 15/24] btrfs: Make log_dir_items take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index e293ae0e18d7..8d7197a0eceb 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 10/24] btrfs: Make copy_items take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 7669e95be423..12872bf492bd 100644 --- a/fs/btrf

[PATCHv2 24/24] btrfs: Make count_inode_refs take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 47e4f3610348..a16da4a3ab63 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 21/24] btrfs: Make log_inode_item take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index d919cd4252ba..1348ab5e3229 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 07/24] btrfs: Make btrfs_del_inode_ref take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/inode.c| 2 +- fs/btrfs/tree-log.c | 10 +- fs/btrfs/tree-log.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ebfeabafe1b1..e86b08eabb82

[PATCHv2 04/24] btrfs: Make btrfs_inode_in_log take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/btrfs_inode.h | 16 +++- fs/btrfs/file.c| 2 +- fs/btrfs/inode.c | 16 fs/btrfs/tree-log.c| 4 ++-- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/fs

[PATCHv2 20/24] btrfs: Make __add_inode_ref take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 35434d686653..d919cd4252ba 100644 --- a/fs/btrfs/tree-log.c ++

[PATCHv2 05/24] btrfs: Make btrfs_log_new_name take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/inode.c| 8 fs/btrfs/tree-log.c | 18 -- fs/btrfs/tree-log.h | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 9442c8

[PATCHv2 22/24] btrfs: Make btrfs_log_inode take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 92 ++--- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1348ab5e3229..8c110d0e16c3 100644 --

[PATCHv2 16/24] btrfs: Make log_directory_changes take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8d7197a0eceb..38cda7869bf9 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCHv2 03/24] btrfs: Make btrfs_record_snapshot_destroy take btrfs_inode

2017-01-17 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/ioctl.c| 2 +- fs/btrfs/tree-log.c | 8 fs/btrfs/tree-log.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e8e1f5f5f93a..7d1b5378de49

Re: [PATCHv2 00/24] tree-log inode vs btrfs_inode cleanups

2017-01-19 Thread Nikolay Borisov
On 19.01.2017 20:21, David Sterba wrote: > On Wed, Jan 18, 2017 at 12:31:26AM +0200, Nikolay Borisov wrote: >> So here is a new set of patches cleaning up tree-log function >> w.r.t inode vs btrfs_inode. There are still some which remain >> but I didn't find compelling

Re: [PULL] Btrfs cleanups for 4.11, part 2

2017-03-01 Thread Nikolay Borisov
On 1.03.2017 00:35, Chris Mason wrote: > > > On 02/28/2017 10:09 AM, David Sterba wrote: >> Hi, >> >> this is the second half of the 4.11 batch, the rest of the cleanups. >> Please >> pull, thanks. >> >> The following changes since commit >> 6288d6eabc7505f42dda34a2c2962f91914be3a4: >> >>

[PATCH] btrfs: Fix handling of -ENOENT from btrfs_uuid_iter_rem

2016-09-07 Thread Nikolay Borisov
over the same key. Signed-off-by: Nikolay Borisov <ker...@kyup.com> Suggested-by: Chris Mason <c...@fb.com> Link: https://lkml.kernel.org/r/57a473b0.2040...@kyup.com --- fs/btrfs/uuid-tree.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) Hello Chris, Since I keep g

Re: Crash in btrfs_uuid_tree_iterate during mount

2016-08-29 Thread Nikolay Borisov
On 08/08/2016 05:24 PM, Chris Mason wrote: > On 08/08/2016 10:21 AM, Nikolay Borisov wrote: >> >> >> On 08/08/2016 05:16 PM, Chris Mason wrote: >>> >>> Fantastic, thanks again for digging through it. Making the patch is >>> much easier than tes

Multiple bad pages state on fstrim and softlockup on umount

2016-09-27 Thread Nikolay Borisov
Hello, This morning I got the following splats on one of my server: [116337.888998] BUG: Bad page state in process fstrim pfn:45f65a [116337.889178] page:ea00117d9680 count:0 mapcount:0 mapping:88013bed7ae8 index:0x3a8d3 [116337.889479] flags: 0x2fffc0c(referenced|uptodate)

Warning in __btrfs_free_extent due to -ENOENT backrefs

2016-10-19 Thread Nikolay Borisov
Hello, So I got the following warnings on one of my server: [361464.059606] [ cut here ] [361464.059831] WARNING: CPU: 6 PID: 7637 at fs/btrfs/extent-tree.c:6543 __btrfs_free_extent.isra.66+0x65c/0xcb0 [btrfs]() [361464.064134] CPU: 6 PID: 7637 Comm: btrfs-cleaner

list/count mismatch warning in rcu_do_batch (possibly triggered by a btrfs bug).

2016-11-15 Thread Nikolay Borisov
Hello Paul, I'm currently going through a crashdump which seems to indicate some memory corruption, possibly triggered by btrfs. I have several entries such as : [1626691.276310] BUG: Bad page state in process fstrim pfn:230ee7 [1626691.276488] page:ea0008c3b9c0 count:0 mapcount:0

Re: [RFC PATCH 00/12] Refactor btrfs_inode VS inode in delayed-inode.c

2017-01-11 Thread Nikolay Borisov
On 11.01.2017 18:51, David Sterba wrote: > On Tue, Jan 10, 2017 at 08:35:30PM +0200, Nikolay Borisov wrote: >> After following the discussion in [1] I took a look at what's the >> state of VFS-related members being used in core BTRFS code. It turned >> out there are quite

[PATCH 02/24] btrfs: Make btrfs_record_unlink_dir take btrfs_inode

2017-01-12 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/inode.c| 8 fs/btrfs/tree-log.c | 18 +- fs/btrfs/tree-log.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 80060a

[PATCH 03/24] btrfs: Make btrfs_record_snapshot_destroy take btrfs_inode

2017-01-12 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/ioctl.c| 2 +- fs/btrfs/tree-log.c | 8 fs/btrfs/tree-log.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e8e1f5f5f93a..7d1b5378de49

[PATCH 09/24] btrfs: Make btrfs_check_ref_name_override take btrfs_inode

2017-01-12 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 0fc963454c82..2b44835b4dea 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCH 21/24] btrfs: Make log_inode_item take btrfs_inode

2017-01-12 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index a24983cd455c..002db48541ff 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

[PATCH 11/24] btrfs: Make btrfs_log_all_xattrs take btrfs_inode

2017-01-12 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <n.borisov.l...@gmail.com> --- fs/btrfs/tree-log.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 4b0bbe05cdae..4d8726aad7b3 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree

  1   2   3   4   5   6   7   8   9   10   >