Re: [PATCH] workqueue: remove some duplicated includes

2018-12-01 Thread Nikolay Borisov
On 1.12.18 г. 8:46 ч., Frank Lee wrote: > It seems that the trivial tree has not been maintained for some time. > Are there aother tree to choose? perhaps mmotm, maintained by Andrew (cc'ed) > > MBR, > Yangtao > On Sat, Dec 1, 2018 at 2:36 AM Tejun Heo wrote: >> >> On Mon, Nov 26, 2018 at

Re: [PATCH RFC 01/15] MIPS: replace **** with a hug

2018-11-30 Thread Nikolay Borisov
On 30.11.18 г. 23:50 ч., Jarkko Sakkinen wrote: > On Fri, Nov 30, 2018 at 11:06:30PM +0200, Nikolay Borisov wrote: >> I find it quite ridiculous that grown up people are engaging at yet >> another coc-related conversation and are on the way to blowing it out of >> pro

Re: [PATCH RFC 01/15] MIPS: replace **** with a hug

2018-11-30 Thread Nikolay Borisov
On 30.11.18 г. 21:57 ч., Jarkko Sakkinen wrote: > On Fri, Nov 30, 2018 at 11:27:10AM -0800, Jarkko Sakkinen wrote: >> In order to comply with the CoC, replace with a hug. >> >> Signed-off-by: Jarkko Sakkinen > > Since v17 of the SGX patch set, my cover letters get cut for some > reason.

[PATCH] fs: Don't opencode lru_to_page

2018-11-29 Thread Nikolay Borisov
Multiple filesystems opencode lru_to_page. Rectify this by moving the macro from mm_inline (which is specific to lru stuff) to the more generic mm.h header and start using the macro where appropriate. No functional changes. Signed-off-by: Nikolay Borisov Acked-by: Michal Hocko Reviewed

[PATCH 1/2] mm: Move lru_to_page to mm.h

2018-11-28 Thread Nikolay Borisov
There are multiple places in the kernel which opencode this helper, this patch moves it to the more generic mm.h header in preparation for using it. No functional changes. Signed-off-by: Nikolay Borisov --- include/linux/mm.h| 2 ++ include/linux/mm_inline.h | 3 --- 2 files changed, 2

[PATCH] tracing: Export trace_dump_stack to modules

2018-10-17 Thread Nikolay Borisov
There is no reason for this function to be unexprted and it's a useful debugging aid. Signed-off-by: Nikolay Borisov --- kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index bf6f1d70484d..15c7a7d01505 100644 --- a/kernel

Re: [PATCH] lib/Kconfig.debug: add a comment to PROVE_LOCKING impact

2018-10-09 Thread Nikolay Borisov
On 9.10.2018 18:39, Lukasz Luba wrote: > This patch add some comment related to performance impact, > which can be really big (x3 times slower context switch). > > Signed-off-by: Lukasz Luba I don't think this brings any value. lockdep is a debugging aid aimed at developers. A developer

Re: [PATCHv3 2/2] btrfs: change remove_extent_mapping to be void function

2018-09-12 Thread Nikolay Borisov
ret" and make it to be void function. > > Signed-off-by: zhong jiang Reviewed-by: Nikolay Borisov --- > fs/btrfs/extent_map.c | 5 + > fs/btrfs/extent_map.h | 2 +- > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/ex

Re: [PATCH 8/9] dt-bindings: interrupt-controller: RISC-V PLIC documentation

2018-08-02 Thread Nikolay Borisov
On 26.07.2018 17:37, Christoph Hellwig wrote: > From: Palmer Dabbelt > > This patch adds documentation for the platform-level interrupt > controller (PLIC) found in all RISC-V systems. This interrupt > controller routes interrupts from all the devices in the system to each > hart-local

Re: [PATCH 14/16] btrfs: simplify btrfs_iget()

2018-07-30 Thread Nikolay Borisov
) to btrfs_iget() and kill now obviously pointless > ASSERT() in there. > > Signed-off-by: Al Viro Reviewed-by: Nikolay Borisov > --- > fs/btrfs/inode.c | 24 > 1 file changed, 8 insertions(+), 16 deletions(-) > > diff --git a/fs/btrfs/inode.c

[PATCH] jfs: Fix buffer overrun in ea_get

2018-06-18 Thread Nikolay Borisov
Shankara Pailoor Reported-by: Shankara Pailoor CC: shankarapail...@gmail.com Signed-off-by: Nikolay Borisov --- Hello David, I'm sending you the patch for the issue which was originally reported and suggested by Shankar. I won't usually got and override the original author of a patch

Re: [PATCH] doc: add description to dirtytime_expire_seconds

2018-06-15 Thread Nikolay Borisov
On 31.05.2018 02:56, Yang Shi wrote: > commit 1efff914afac8a965ad63817ecf8861a927c2ace ("fs: add > dirtytime_expire_seconds sysctl") introduced dirtytime_expire_seconds > knob, but there is not description about it in > Documentation/sysctl/vm.txt. > > Add the description for it. > > Cc:

Re: [PATCH] doc: document scope NOFS, NOIO APIs

2018-05-28 Thread Nikolay Borisov
On 25.05.2018 10:52, Michal Hocko wrote: > On Thu 24-05-18 09:37:18, Randy Dunlap wrote: >> On 05/24/2018 04:43 AM, Michal Hocko wrote: > [...] >>> +The traditional way to avoid this deadlock problem is to clear __GFP_FS >>> +resp. __GFP_IO (note the later implies clearing the first as well) in

Re: [btrfs_put_block_group] WARNING: CPU: 1 PID: 14674 at fs/btrfs/disk-io.c:3675 free_fs_root+0xc2/0xd0 [btrfs]

2018-05-03 Thread Nikolay Borisov
On 3.05.2018 11:07, Anand Jain wrote: > > > On 04/19/2018 03:25 PM, Nikolay Borisov wrote: >> >> >> On 19.04.2018 08:32, Fengguang Wu wrote: >>> Hello, >>> >>> FYI this happens in mainline kernel and at least dates back to v4.16 . &

Re: Moving unmaintained filesystems to staging

2018-04-25 Thread Nikolay Borisov
On 25.04.2018 23:30, David Sterba wrote: > On Wed, Apr 25, 2018 at 08:46:02AM -0700, Matthew Wilcox wrote: >> Recently ncpfs got moved to staging. Also recently, we had some fuzzer >> developers report bugs in hfs, which they deem a security hole because >> Ubuntu attempts to automount an

Re: [btrfs_put_block_group] WARNING: CPU: 1 PID: 14674 at fs/btrfs/disk-io.c:3675 free_fs_root+0xc2/0xd0 [btrfs]

2018-04-19 Thread Nikolay Borisov
On 19.04.2018 08:32, Fengguang Wu wrote: > Hello, > > FYI this happens in mainline kernel and at least dates back to v4.16 . > > It's rather rare error and happens when running xfstests. Yeah, so this is something which only recently was characterised as leaking delalloc inodes. I can easily

Re: [PATCH] fs/dcache.c: re-add cond_resched() in shrink_dcache_parent()

2018-04-14 Thread Nikolay Borisov
On 14.04.2018 00:14, Andrew Morton wrote: > On Fri, 13 Apr 2018 13:28:23 -0700 Khazhismel Kumykov > wrote: > >> shrink_dcache_parent may spin waiting for a parallel shrink_dentry_list. >> In this case we may have 0 dentries to dispose, so we will never >> schedule out while

Re: Query:Regarding percpu_counter debug object destroy

2018-04-13 Thread Nikolay Borisov
On 13.04.2018 10:32, Kohli, Gaurav wrote: > Hi , > > I have checked below code and it seems we are calling debug_object_free > twice, ideally we should deactivate and later we > have to destroy. > > 1st call -> percpu_counter_destroy->debug_percpu_counter_deactivate -> > debug_object_free >

Re: [PATCH 05/20] afs: Implement @sys substitution handling

2018-04-06 Thread Nikolay Borisov
On 6.04.2018 11:13, David Howells wrote: > Al Viro wrote: > >> lookup_one_len() seriously depends upon exclusive lock > > In the code it says: > > WARN_ON_ONCE(!inode_is_locked(base->d_inode)); > > which checks i_rwsem, but in the banner comment it says: > >

Re: [PATCH v4 2/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Nikolay Borisov
warning, so this refactors these uses of max() to use the > new const_max() instead. > > [1] https://lkml.org/lkml/2018/3/7/621 For the btrfs portion : Reviewed-by: Nikolay Borisov <nbori...@suse.com> > > Signed-off-by: Kees Cook <keesc...@chromium.org> > --- > drivers/i

Re: WARN when unmounting a subvolume that is being synced

2018-03-14 Thread Nikolay Borisov
On 14.03.2018 05:10, Tycho Andersen wrote: > Hi all, > > I'm getting the WARN below. I think (?) what I'm doing when I get it > is that I'm unmounting a subvolume while it's being synced (concurrent > uses of the subvolume, at least, happy to look into it further if the > stack trace is not so

Re: [PATCH 1/2] direct-io: Remove unused DIO_ASYNC_EXTEND flag

2018-03-12 Thread Nikolay Borisov
On 23.02.2018 13:45, Nikolay Borisov wrote: > This flag was added by 6039257378e4 ("direct-io: add flag to allow aio > writes beyond i_size") to support XFS. However, with the rework of > XFS' DIO's path to use iomap in acdda3aae146 ("xfs: use iomap_dio_rw") &g

Re: [RFC v2 09/83] Add Kconfig and Makefile

2018-03-11 Thread Nikolay Borisov
On 10.03.2018 20:17, Andiry Xu wrote: > From: Andiry Xu > > Signed-off-by: Andiry Xu > --- > fs/Kconfig | 2 ++ > fs/Makefile | 1 + > fs/nova/Kconfig | 15 +++ > fs/nova/Makefile | 7 +++ > 4 files changed, 25

Re: [RFC v2 16/83] Initialize block map and free lists in nova_init().

2018-03-11 Thread Nikolay Borisov
On 10.03.2018 20:17, Andiry Xu wrote: > From: Andiry Xu > > NOVA divides the pmem range equally among per-CPU free lists, > and format the red-black trees by inserting the initial free range. > > Signed-off-by: Andiry Xu > --- > fs/nova/balloc.c | 161

Re: [RFC v2 05/83] Add NOVA filesystem definitions and useful helper routines.

2018-03-11 Thread Nikolay Borisov
[Adding Herbert Xu to CC since he is the maintainer of the crypto subsys maintainer] On 10.03.2018 20:17, Andiry Xu wrote: > +static inline u32 nova_crc32c(u32 crc, const u8 *data, size_t len) > +{ > + u8 *ptr = (u8 *) data; > + u64 acc = crc; /* accumulator, crc32c value in lower 32b

Re: [RFC v2 14/83] Add range node kmem cache.

2018-03-11 Thread Nikolay Borisov
On 10.03.2018 20:17, Andiry Xu wrote: > From: Andiry Xu > > Range node specifies a range of [start, end]. and is managed by a red-black > tree. > NOVA uses range node to manage NVM allocator and inodes being used. > > Signed-off-by: Andiry Xu > --- >

[RFC PATCH] btrfs: Fix memory ordering of unlocked dio reads vs truncate

2018-03-07 Thread Nikolay Borisov
Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Hello, Sending it as an RFC for the time being to see how people are going to react and also I'd like some feedback on the mb semantics. For this purposed I've CC'ed some memory ordering people :) fs/btrfs/btrfs_inode.

Re: [PATCH] direct-io: Minor cleanups in do_blockdev_direct_IO

2018-03-03 Thread Nikolay Borisov
On 3.03.2018 02:24, Andrew Morton wrote: > On Mon, 26 Feb 2018 11:54:30 +0200 Nikolay Borisov <nbori...@suse.com> wrote: > >> We already get the block counts and the calculate the end block at the >> beginning of the function. Let's use the local variables for consis

Re: GPF in wb_congested due to null bdi_writeback

2018-02-27 Thread Nikolay Borisov
On 27.02.2018 18:05, Nikolay Borisov wrote: > Hello Tejun, > > So while running some fs tests I hit the following GPF. Btw the > warning taint flag was due to a debugging WARN_ON in btrfs 100 or so > tests ago so is unrelated to this gpf: > > [ 4255.628110] general p

GPF in wb_congested due to null bdi_writeback

2018-02-27 Thread Nikolay Borisov
Hello Tejun, So while running some fs tests I hit the following GPF. Btw the warning taint flag was due to a debugging WARN_ON in btrfs 100 or so tests ago so is unrelated to this gpf: [ 4255.628110] general protection fault: [#1] SMP PTI [ 4255.628303] Modules linked in: [ 4255.628446]

[PATCH] direct-io: Minor cleanups in do_blockdev_direct_IO

2018-02-26 Thread Nikolay Borisov
We already get the block counts and the calculate the end block at the beginning of the function. Let's use the local variables for consistency and readability. No functional changes Signed-off-by: Nikolay Borisov <nbori...@suse.com> Reviewed-by: Jeff Moyer <jmo...@redhat.com>

Re: Reasoning about memory ordering

2018-02-23 Thread Nikolay Borisov
On 23.02.2018 19:31, Andrea Parri wrote: > On Fri, Feb 23, 2018 at 02:30:22PM +0200, Nikolay Borisov wrote: >> Hello, >> >> I'm cc'ing a bunch of people I know are well-versed in >> the black arts of memory ordering! >> >> Currently in btrfs we have ro

Re: Reasoning about memory ordering

2018-02-23 Thread Nikolay Borisov
On 23.02.2018 17:38, Alan Cox wrote: >> Given this is the current state of the code (it's part of btrfs) I believe >> the following could/should be done: > > Is there benchmarking data to show that a custom lock is justified > (especiaally given it's going to mean btrfs and rtlinux don't play

Reasoning about memory ordering

2018-02-23 Thread Nikolay Borisov
Hello, I'm cc'ing a bunch of people I know are well-versed in the black arts of memory ordering! Currently in btrfs we have roughly the following sequence: T1: T2: i_size_write(inode,

[PATCH 1/2] direct-io: Remove unused DIO_ASYNC_EXTEND flag

2018-02-23 Thread Nikolay Borisov
This flag was added by 6039257378e4 ("direct-io: add flag to allow aio writes beyond i_size") to support XFS. However, with the rework of XFS' DIO's path to use iomap in acdda3aae146 ("xfs: use iomap_dio_rw") it became redundant. So let's remove it. Signed-off-by: Ni

[PATCH 2/2] direct-io: Remove unused DIO_SKIP_DIO_COUNT logic

2018-02-23 Thread Nikolay Borisov
unused. So let's remove it. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/direct-io.c | 6 ++ include/linux/fs.h | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 99a81c49bce9..a8131087aa1c 100644 --- a/fs/dir

Re: [PATCH] direct-io: Minor cleanups in do_blockdev_direct_IO

2018-02-21 Thread Nikolay Borisov
On 2.08.2017 10:10, Nikolay Borisov wrote: > We already get the block counts and the calculate the end block at the > beginning of the function. Let's use the local variables for consistency and > readability. No functional changes > > Signed-off-by: Nikolay Borisov <

[tip:locking/core] memory-barriers: Fix description of data dependency barriers

2018-02-21 Thread tip-bot for Nikolay Borisov
Commit-ID: 51de78892b1294d1521c41226a5ef215a910c25f Gitweb: https://git.kernel.org/tip/51de78892b1294d1521c41226a5ef215a910c25f Author: Nikolay Borisov <nbori...@suse.com> AuthorDate: Tue, 20 Feb 2018 15:25:08 -0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Wed,

[PATCH] memory-barriers: Make sentence more clear.

2018-02-19 Thread Nikolay Borisov
Rewrite the final sentence of data dependency memory barrier to express the 'after' relationship in simpler words. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/

[PATCH] fs: Improve comment of inode_dio_begin

2018-02-19 Thread Nikolay Borisov
the requirement of a lock being held while bumping i_dio_count. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- include/linux/fs.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 511fbaabf624..90ac851930ae

Re: [PATCH v2] lockdep: Fix fs_reclaim warning.

2018-02-12 Thread Nikolay Borisov
On 8.02.2018 13:43, Tetsuo Handa wrote: >>From 361d37a7d36978020dfb4c11ec1f4800937ccb68 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Thu, 8 Feb 2018 10:35:35 +0900 > Subject: [PATCH v2] lockdep: Fix fs_reclaim warning. > > Dave Jones reported

Re: [PATCH 0/3] ftrace, orc, x86, tracing: Fix stack traces again

2018-01-24 Thread Nikolay Borisov
On 23.01.2018 20:32, Steven Rostedt wrote: > With the new ORC unwinder, ftrace stack tracing became disfunctional. > > One was that ORC didn't know how to handle the ftrace callbacks in > general (which Josh fixed). The other was that ORC would just bail > if it hit a dynamically allocated

Re: [RFC PATCH] ftrace: Fix depth filtering when func_stack is enabled.

2018-01-22 Thread Nikolay Borisov
On 23.01.2018 01:16, Steven Rostedt wrote: > On Mon, 22 Jan 2018 15:50:04 +0200 > Nikolay Borisov <nbori...@suse.com> wrote: > > >> diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c >> index 27f7ad12c4b1..b721f1f3f3c0 100644 >>

[RFC PATCH] ftrace: Fix depth filtering when func_stack is enabled.

2018-01-22 Thread Nikolay Borisov
ilp_open (811b8a8a) => do_sys_open (811a64a7) => SyS_open (811a659e) => entry_SYSCALL_64_fastpath (8180009b) Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Strange why __trace_stack and __ftrace_trace_stack are not part of the stack an

Re: Linux 4.15-rc7

2018-01-11 Thread Nikolay Borisov
On 11.01.2018 13:29, Olivier Galibert wrote: > Wasn't/Isn't the 4G/4G memory layout for 32 bits essentially KPTI? 4g/4g was never accepted upstream > > OG. > > > On Thu, Jan 11, 2018 at 12:32 AM, Pavel Machek wrote: >> Hi! >> >>> The one thing I want to do now that

Re: [PATCH 0/2] Remove custom crc32c init code from btrfs

2018-01-08 Thread Nikolay Borisov
On 8.01.2018 12:21, Timofey Titovets wrote: > 2018-01-08 12:45 GMT+03:00 Nikolay Borisov <nbori...@suse.com>: >> So here is a small 2 patch set which removes btrfs' manual initialisation of >> the lower level crc32c module. Explanation why is ok can be found in Patch &g

[PATCH 2/2] btrfs: Remove custom crc32c init code

2018-01-08 Thread Nikolay Borisov
y btrfs was switched to late_initcall which comes after the generic crc32c implementation is initiliased. The latter commit superseeded the former. Now that we don't have to maintain our own code let's just remove it and switch to using the generic implementation. Signed-off-by: Nikolay Boriso

[PATCH 0/2] Remove custom crc32c init code from btrfs

2018-01-08 Thread Nikolay Borisov
or hw-accelerated) to retain current btrfs behavior. This is mainly used for debugging purposes and is independent. Nikolay Borisov (2): libcrc32c: Add crc32c_impl function btrfs: Remove custom crc32c init code fs/btrfs/Kconfig | 3 +-- fs/btrfs/Makefile | 2 +- fs/btrfs

[PATCH 1/2] libcrc32c: Add crc32c_impl function

2018-01-08 Thread Nikolay Borisov
This function returns a string with the currently in-use implementation of the crc32c algorithm, i.e crc32c-generic (for unoptimised, generic implementation) or crc32c-intel for the sse optimised version. This will be used by btrfs. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- i

Re: Bricked x86 CPU with software?

2018-01-06 Thread Nikolay Borisov
On 4.01.2018 02:47, Tim Mouraveiko wrote: > Hi, > > In all my years of extensive experience writing drivers and kernels, I never > came across a situation > where you could brick an x86 CPU. Not until recently, when I was working on > debugging a piece of > code and I bricked an Intel CPU.

Re: [PATCH v2 2/2] dm unstripe: Add documentation for unstripe target

2017-12-12 Thread Nikolay Borisov
On 11.12.2017 18:00, Scott Bauer wrote: > Signed-off-by: Scott Bauer > --- > Documentation/device-mapper/dm-unstripe.txt | 82 > + > 1 file changed, 82 insertions(+) > create mode 100644 Documentation/device-mapper/dm-unstripe.txt > > diff

Re: [PATCH 6/6] blk-mq: remove REQ_ATOM_STARTED

2017-12-12 Thread Nikolay Borisov
On 9.12.2017 21:25, Tejun Heo wrote: > After the recent updates to use generation number and state based > synchronization, we can easily replace REQ_ATOM_STARTED usages by > adding an extra state to distinguish completed but not yet freed > state. > > Add MQ_RQ_COMPLETE and replace

Re: [PATCH 0/8] make some functions return bool

2017-12-12 Thread Nikolay Borisov
On 12.12.2017 09:21, Yaowei Bai wrote: > On Mon, Dec 11, 2017 at 09:50:03PM -0800, David Rientjes wrote: >> On Mon, 11 Dec 2017, Yaowei Bai wrote: >> >>> This patchset makes some *_is_* like functions return bool because >>> these functions only use true or false as their return values. >>> >>>

Re: [PATCH 3/3] VFS: close race between getcwd() and d_move()

2017-11-09 Thread Nikolay Borisov
On 9.11.2017 15:08, Matthew Wilcox wrote: > On Thu, Nov 09, 2017 at 01:41:24PM +0200, Nikolay Borisov wrote: >> On 9.11.2017 05:22, NeilBrown wrote: >>> @@ -493,12 +496,18 @@ void __d_drop(struct dentry *dentry) >>> } else >>>

Re: [PATCH 3/3] VFS: close race between getcwd() and d_move()

2017-11-09 Thread Nikolay Borisov
On 9.11.2017 05:22, NeilBrown wrote: > d_move() will call __d_drop() and then __d_rehash() > on the dentry being moved. This creates a small window > when the dentry appears to be unhashed. Many tests > of d_unhashed() are made under ->d_lock and so are safe > from racing with this window,

Re: [PATCH 3/5] userns: Don't read extents twice in m_start

2017-11-01 Thread Nikolay Borisov
[CCing some memory-barriers people + checkpatch maintainers] On 1.11.2017 13:08, Eric W. Biederman wrote: > Nikolay Borisov <nbori...@suse.com> writes: > >> On 1.11.2017 01:48, Eric W. Biederman wrote: >>> >>> This is important so reading /proc//{uid_map,g

Re: [PATCH 3/5] userns: Don't read extents twice in m_start

2017-11-01 Thread Nikolay Borisov
On 1.11.2017 01:48, Eric W. Biederman wrote: > > This is important so reading /proc//{uid_map,gid_map,projid_map} while > the map is being written does not do strange things. > > Signed-off-by: "Eric W. Biederman" > --- > kernel/user_namespace.c | 6 -- > 1 file

Re: [PATCH 1/2 v4] user namespace: use union in {g,u}idmap struct

2017-10-23 Thread Nikolay Borisov
On 23.10.2017 09:39, Nikolay Borisov wrote: > > > On 19.10.2017 22:11, Christian Brauner wrote: >> - Add a struct containing two pointer to extents and wrap both the static >> extent >> array and the struct into a union. This is done in preparation for bumping &g

Re: [PATCH 1/2 v4] user namespace: use union in {g,u}idmap struct

2017-10-23 Thread Nikolay Borisov
On 19.10.2017 22:11, Christian Brauner wrote: > - Add a struct containing two pointer to extents and wrap both the static > extent > array and the struct into a union. This is done in preparation for bumping > the > {g,u}idmap limits for user namespaces. > - Add brackets around anonymous

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Nikolay Borisov
On 10.10.2017 13:48, Rakesh Pandit wrote: > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > frozen fs to avoid deadlock.") started using internal calls and we > replace them with more suitable ones. > > Signed-off-by: Rakesh Pandit > --- >

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Nikolay Borisov
action(root, 0); The non __ versions are just wrappers around the __ specific calls. So the code is identical. Reviewed-by: Nikolay Borisov <nbori...@suse.com>

Re: [PATCH 03/12] buffer: eliminate the need to call free_more_memory() in __getblk_slow()

2017-09-28 Thread Nikolay Borisov
also the last user of free_more_memory(), kill > it off completely. > > Signed-off-by: Jens Axboe <ax...@kernel.dk> Reviewed-by: Nikolay Borisov <nbori...@suse.com> > --- > fs/buffer.c | 23 --- > 1 file changed, 23 deletions(-) > > diff

Re: [PATCH 01/12] buffer: have alloc_page_buffers() use __GFP_NOFAIL

2017-09-28 Thread Nikolay Borisov
igned-off-by: Jens Axboe <ax...@kernel.dk> Reviewed-by: Nikolay Borisov <nbori...@suse.com> > --- > drivers/md/bitmap.c | 2 +- > fs/buffer.c | 33 ++--- > fs/ntfs/aops.c | 2 +- > fs/ntfs/mft.c

Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases

2017-09-28 Thread Nikolay Borisov
On 27.09.2017 23:13, Jens Axboe wrote: > We currently it it for find_or_create_page(), which means that it nit: Perhaps you wanted to write "We currently use it for find_..." otherwise: Reviewed-by: Nikolay Borisov <nbori...@suse.com> > cannot fail. Ensure we also

Re: [PATCH] direct-io: Minor cleanups in do_blockdev_direct_IO

2017-09-15 Thread Nikolay Borisov
On 2.08.2017 10:10, Nikolay Borisov wrote: > We already get the block counts and the calculate the end block at the > beginning of the function. Let's use the local variables for consistency and > readability. No functional changes > > Signed-off-by: Nikolay Borisov <

workqueue threads ->journal_info buggery

2017-09-05 Thread Nikolay Borisov
Hello Tejun, I've hit the following problems under memory-heavy workload conditions: First is a BUG_ON : J_ASSERT(journal_current_handle() == handle); [ 64.261793] kernel BUG at fs/jbd2/transaction.c:1644! [ 64.263894] invalid opcode: [#1] SMP [

Re: [PATCH 10/16] btrfs: switch write_buf to kernel_write

2017-08-30 Thread Nikolay Borisov
On 30.08.2017 18:00, Christoph Hellwig wrote: > Instead of playing with the addressing limits. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Reviewed-by: Nikolay Borisov <nbori...@suse.com> > fs/btrfs/send.c | 18 -- > 1 file changed,

[PATCH] swap: Remove obsolete sentence

2017-08-25 Thread Nikolay Borisov
Currently there are no ->swap_{in,out} method in address_space_operations sructure definition, so the statement that anything is going to be proxied through them is wrong. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Documentation/filesystems/vfs.txt | 4 +--- 1 file c

Re: [PATCH] exec: Check stack space more strictly

2017-08-16 Thread Nikolay Borisov
minor nit below On 18.07.2017 01:22, Andy Lutomirski wrote: > We can currently blow past the stack rlimit and cause odd behavior > if there are accounting bugs, rounding issues, or races. It's not > clear that the odd behavior is actually a problem, but it's nicer to > fail the exec instead of

Re: [RESEND PATCH] bcache: Don't reinvent the wheel but use existing llist API

2017-08-09 Thread Nikolay Borisov
On 8.08.2017 09:00, Byungchul Park wrote: > On Tue, Aug 08, 2017 at 01:28:39PM +0800, Coly Li wrote: > + llist_for_each_entry_safe(cl, t, reverse, list) { Just wondering why not using llist_for_each_entry(), or you use the _safe version on purpose ? >>> >>> If I use

[PATCH] direct-io: Minor cleanups in do_blockdev_direct_IO

2017-08-02 Thread Nikolay Borisov
We already get the block counts and the calculate the end block at the beginning of the function. Let's use the local variables for consistency and readability. No functional changes Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/direct-io.c | 5 ++--- 1 file changed, 2 inse

Re: [PATCH] btrfs: resume qgroup rescan on rw remount

2017-07-10 Thread Nikolay Borisov
On 10.07.2017 16:12, Nikolay Borisov wrote: > > > On 4.07.2017 14:49, Aleksa Sarai wrote: >> Several distributions mount the "proper root" as ro during initrd and >> then remount it as rw before pivot_root(2). Thus, if a rescan had been >> aborted by

Re: [PATCH] btrfs: resume qgroup rescan on rw remount

2017-07-10 Thread Nikolay Borisov
On 4.07.2017 14:49, Aleksa Sarai wrote: > Several distributions mount the "proper root" as ro during initrd and > then remount it as rw before pivot_root(2). Thus, if a rescan had been > aborted by a previous shutdown, the rescan would never be resumed. > > This issue would manifest itself as

Re: [PATCH] writeback: Simplify wb_stat_sum

2017-06-26 Thread Nikolay Borisov
[CC'ing Andrew since he seems to be taking those patches through -mm ] On 23.06.2017 18:11, Nikolay Borisov wrote: > wb_stat_sum disables interrupts and calls __wb_stat_sum which eventually calls > __percpu_counter_sum. However, the percpu routine is already irq-safe. > Simplify > th

[PATCH] writeback: Simplify wb_stat_sum

2017-06-23 Thread Nikolay Borisov
__wb_stat_sum which was just a wrapper over percpu_counter_sum_positive Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- include/linux/backing-dev.h | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h

[PATCH 1/4] remove mapping from balance_dirty_pages*()

2017-06-22 Thread Nikolay Borisov
@suse.cz> Acked-by: Tejun Heo <t...@kernel.org> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Changes since previous posting [1]: - No functional/logic changes, just forwarded-ported to 4.12-rc6, as such I've retained the acked-by and reviewed-by tags. [1] https://patc

[PATCH 3/4] writeback: add counters for metadata usage

2017-06-22 Thread Nikolay Borisov
s used for metadata on the system. This is also needed so things like dirty throttling know that this is dirtyable memory as well and easily reclaimed. This patch doesn't introduce any functional changes. Signed-off-by: Josef Bacik <jba...@fb.com> Signed-off-by: Nikolay Borisov <nbori...@suse.c

[RFC PATCH 0/4] Support for metadata specific accounting

2017-06-22 Thread Nikolay Borisov
Hello, This series is a report of Josef's original posting [1]. I've included fine-grained changelog in each patch with my changes. Basically, I've forward ported it to 4.12-rc6 and tried incorporating the feedback which was given to every individual patch (I've included link with that

[PATCH 4/4] writeback: introduce super_operations->write_metadata

2017-06-22 Thread Nikolay Borisov
b.com> Reviewed-by: Jan Kara <j...@suse.cz> Reviewed-by: Tejun Heo <t...@kernel.org> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Changes since previous posting [1] : - Forward ported to 4.12-rc6 kernel I've retained the review-by tags since I didn'

[PATCH 2/4] writeback: convert WB_WRITTEN/WB_DIRITED counters to bytes

2017-06-22 Thread Nikolay Borisov
unting stuff to change the counters as well. Additionally, scale WB_STAT_BATCH based on whether we are incrementing byte-based or page-based counters. Signed-off-by: Josef Bacik <jba...@fb.com> Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Changes since previous posting [1]:

Re: [PATCH] mm: Refactor conversion of pages to bytes macro definitions

2017-06-22 Thread Nikolay Borisov
On 22.06.2017 09:44, Michal Hocko wrote: > On Tue 20-06-17 18:14:28, Nikolay Borisov wrote: >> Currently there are a multiple files with the following code: >> #define K(x) ((x) << (PAGE_SHIFT - 10)) >> ... some code.. >> #undef K >> >> This is

[PATCH v3] writeback: Rework wb_[dec|inc]_stat family of functions

2017-06-21 Thread Nikolay Borisov
. This will likely result in better runtime of code which deals with modifying the stat counters. While at it also document why percpu_counter_add_batch is in fact preempt and irq-safe since at least 3 people got confused. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Changes si

Re: [PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions

2017-06-20 Thread Nikolay Borisov
On 20.06.2017 23:30, Tejun Heo wrote: > Hello, > > On Tue, Jun 20, 2017 at 11:28:30PM +0300, Nikolay Borisov wrote: >>> Heh, looks like I was confused. __percpu_counter_add() is not >>> irq-safe. It disables preemption and uses __this_cpu_read(), so >>&g

Re: [PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions

2017-06-20 Thread Nikolay Borisov
On 20.06.2017 22:37, Tejun Heo wrote: > Hello, Nikolay. > > On Tue, Jun 20, 2017 at 09:02:00PM +0300, Nikolay Borisov wrote: >> Currently the writeback statistics code uses a percpu counters to hold >> various statistics. Furthermore we have 2 families of functions - t

[PATCH v2 2/2] writeback: Rework wb_[dec|inc]_stat family of functions

2017-06-20 Thread Nikolay Borisov
. This will likely result in better runtime of code which deals with modifying the stat counters. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- include/linux/backing-dev.h | 24 ++-- mm/page-writeback.c | 10 +- 2 files changed, 7 insertions(+), 27 del

[PATCH v2 1/2] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch

2017-06-20 Thread Nikolay Borisov
of CONFIG_SMP. The only difference is that the __ version takes a batch parameter. Make this a bit more explicit by just renaming __percpu_counter_add to percpu_counter_add_batch. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/exten

[PATCH] mm: Refactor conversion of pages to bytes macro definitions

2017-06-20 Thread Nikolay Borisov
since currently it's being included in all files which exhibit this pattern. Also let's rename it to something a bit more verbose. This patch doesn't introduce any functional changes [1] https://patchwork.kernel.org/patch/9395205/ Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- arch/tile/

[PATCH 1/2] percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch

2017-06-20 Thread Nikolay Borisov
respective of CONFIG_SNMP value. The only difference is that the __ version takes a batch parameter. Make this a bit more explicit by just renaming __percpu_counter_add to percpu_counter_add_batch. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/disk-io.c | 4 ++-- fs/b

[PATCH 2/2] writeback: Rework wb_[dec|inc]_stat family of functions

2017-06-20 Thread Nikolay Borisov
result in better runtime of code which deals with modifying the stat counters. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- Hello Tejun, This patch resulted from me reading your feedback on Josef's memory throttling prep patch https://patchwork.kernel.org/patch/9

Re: [PATCH] memcg: refactor mem_cgroup_resize_limit()

2017-06-02 Thread Nikolay Borisov
On 2.06.2017 02:02, Yu Zhao wrote: > mem_cgroup_resize_limit() and mem_cgroup_resize_memsw_limit() have > identical logics. Refactor code so we don't need to keep two pieces > of code that does same thing. > > Signed-off-by: Yu Zhao > --- > mm/memcontrol.c | 71 >

Re: [GIT PULL] Please pull NFS client fixes for 4.12

2017-05-11 Thread Nikolay Borisov
On 10.05.2017 19:47, Trond Myklebust wrote: > Hi Linus, > > The following changes since commit 4f7d029b9bf009fbee76bb10c0c4351a1870d2f3: > > Linux 4.11-rc7 (2017-04-16 13:00:18 -0700) > > are available in the git repository at: > > git://git.linux-nfs.org/projects/trondmy/linux-nfs.git

Re: [PATCH 2/4] fs/block_dev: always invalidate cleancache in invalidate_bdev()

2017-04-18 Thread Nikolay Borisov
On 14.04.2017 17:07, Andrey Ryabinin wrote: > invalidate_bdev() calls cleancache_invalidate_inode() iff ->nrpages != 0 > which doen't make any sense. > Make invalidate_bdev() always invalidate cleancache data. > > Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache") > Signed-off-by:

Re: [RFC PATCH 1/4] fs: new infrastructure for writeback error handling and reporting

2017-04-03 Thread Nikolay Borisov
On 31.03.2017 22:26, Jeff Layton wrote: > Most filesystems currently use mapping_set_error and > filemap_check_errors for setting and reporting/clearing writeback errors > at the mapping level. filemap_check_errors is indirectly called from > most of the filemap_fdatawait_* functions and from >

Re: [PATCHv2] fs: Handle register_shrinker failure

2017-04-01 Thread Nikolay Borisov
On 24.03.2017 10:25, Nikolay Borisov wrote: > register_shrinker allocates dynamic memory and thus is susceptible to failures > under low-memory situation. Currently,get_userns ignores the return value of > register_shrinker, potentially exposing not fully initialised object. This &

[PATCH] fs: Handle register_shrinker failure

2017-03-24 Thread Nikolay Borisov
red is referenced. Fix this by failing to register the filesystem in case there is not enough memory to fully construct the shrinker object. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/super.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fs/sup

[PATCHv2] fs: Handle register_shrinker failure

2017-03-24 Thread Nikolay Borisov
red is referenced. Fix this by failing to register the filesystem in case there is not enough memory to fully construct the shrinker object. Signed-off-by: Nikolay Borisov <nbori...@suse.com> Fixes: 1d3d4437eae1 ("vmscan: per-node deferred work") Link: lkml.kernel.org/r

[PATCH] fs: Handle register_shrinker failure

2017-03-24 Thread Nikolay Borisov
red is referenced. Fix this by failing to register the filesystem in case there is not enough memory to fully construct the shrinker object. Signed-off-by: Nikolay Borisov <nbori...@suse.com> --- fs/super.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fs/sup

Re: kasan behavior when built with unsupported compiler

2017-03-09 Thread Nikolay Borisov
On 9.03.2017 11:46, Andrey Ryabinin wrote: > On 03/08/2017 11:10 AM, Nikolay Borisov wrote: > >> >> So apparently this is indeed a false positive, resulting from using the old >> compiler. I used the attached patch to verify it. >> >> And what it prints is

Re: Race condition in ext4 (was Re: 4.11-rc1 acpi stomping ext4 slabs)

2017-03-08 Thread Nikolay Borisov
On 9.03.2017 03:58, Theodore Ts'o wrote: > On Tue, Mar 07, 2017 at 10:40:53PM +0200, Nikolay Borisov wrote: >> So this is wrong, the reason why the issues seemed fix is because I >> switched my compiler to version 5.4.0. So this manifests only if I'm >> using gcc 4.7.4. W

Re: kasan behavior when built with unsupported compiler

2017-03-08 Thread Nikolay Borisov
On 7.03.2017 17:54, Dmitry Vyukov wrote: > On Tue, Mar 7, 2017 at 4:35 PM, Nikolay Borisov > <n.borisov.l...@gmail.com> wrote: >> Hello, >> >> I've been chasing a particular UAF as reported by kasan >> (https://www.spinics.net/lists/kernel/msg2458136.html)

  1   2   3   4   >