Re: [PATCH] ext4: Delete redundant uptodate check for buffer

2021-04-01 Thread Ritesh Harjani
; Cc: Andreas Dilger > Signed-off-by: Yang Guo > Signed-off-by: Shaokun Zhang > --- > fs/ext4/inode.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) Thanks for the patch. Changes looks good and trivial. Feel free to add - Reviewed-by: Ritesh Harjani

Re: [PATCH v3 08/10] fsdax: Dedup file range to use a compare function

2021-04-01 Thread Ritesh Harjani
On 21/03/19 09:52AM, Shiyang Ruan wrote: > With dax we cannot deal with readpage() etc. So, we create a dax > comparison funciton which is similar with > vfs_dedupe_file_range_compare(). > And introduce dax_remap_file_range_prep() for filesystem use. > > Signed-off-by: Goldwyn Rodrigues >

Re: [PATCH v3 07/10] iomap: Introduce iomap_apply2() for operations on two files

2021-04-01 Thread Ritesh Harjani
On 21/03/19 09:52AM, Shiyang Ruan wrote: > Some operations, such as comparing a range of data in two files under > fsdax mode, requires nested iomap_open()/iomap_end() on two file. Thus, > we introduce iomap_apply2() to accept arguments from two files and > iomap_actor2_t for actions on two

Re: [PATCH v3 06/10] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-04-01 Thread Ritesh Harjani
ddr + offset, size); } dax_read_unlock(id); return rc < 0 ? rc : size; Other than that looks good. Feel free to add. Reviewed-by: Ritesh Harjani

Re: [PATCH v3 05/10] fsdax: Replace mmap entry in case of CoW

2021-04-01 Thread Ritesh Harjani
+ if (!sync) > + insert_flags |= DAX_IF_DIRTY; > + if (iomap->flags & IOMAP_F_SHARED) > + insert_flags |= DAX_IF_COW; > + } > + > + entry = dax_insert_entry(xas, vmf, entry, pfn, 0, insert_flags); > > if (write && srcmap->addr != iomap->addr) { > err = dax_iomap_cow_copy(pos, size, size, srcmap, kaddr, false); > Rest looks good to me. Please feel free to add Reviewed-by: Ritesh Harjani sorry about changing my email in between of this code review. I am planning to use above gmail id as primary account for all upstream work from now. > -- > 2.30.1 > > >

Re: [PATCH 0/8] EXT4: Trivial typo fixes

2021-03-28 Thread Ritesh Harjani
On 21/03/27 04:00PM, Bhaskar Chowdhury wrote: > This patch series fixed few mundane typos in the below specific files. > > Bhaskar Chowdhury (8): > EXT4: migrate.c: Fixed few typos > EXT4: namei.c: Fixed a typo > EXT4: inline.c: A typo fixed > Fix a typo > EXT4: indirect.c: A trivial

Re: [PATCH v3 04/10] fsdax: Introduce dax_iomap_cow_copy()

2021-03-23 Thread Ritesh Harjani
On 3/19/21 7:22 AM, Shiyang Ruan wrote: In the case where the iomap is a write operation and iomap is not equal to srcmap after iomap_begin, we consider it is a CoW operation. The destance extent which iomap indicated is new allocated extent. So, it is needed to copy the data from srcmap to

Re: [PATCH v3 02/10] fsdax: Factor helper: dax_fault_actor()

2021-03-23 Thread Ritesh Harjani
On 3/19/21 7:22 AM, Shiyang Ruan wrote: The core logic in the two dax page fault functions is similar. So, move the logic into a common helper function. Also, to facilitate the addition of new features, such as CoW, switch-case is no longer used to handle different iomap types.

Re: [PATCH v3 03/10] fsdax: Output address in dax_iomap_pfn() and rename it

2021-03-23 Thread Ritesh Harjani
1 file changed, 12 insertions(+), 4 deletions(-) Like the naming convention. It is consistent with dax_direct_access() function. Changes looks good to me. Feel free to add. Reviewed-by: Ritesh Harjani

Re: [PATCH v3 01/10] fsdax: Factor helpers to simplify dax fault code

2021-03-23 Thread Ritesh Harjani
-by: Shiyang Ruan Reviewed-by: Christoph Hellwig --- fs/dax.c | 152 ++- 1 file changed, 84 insertions(+), 68 deletions(-) Refactoring & the changes looks good to me. Feel free to add. Reviewed-by: Ritesh Harjani

Re: [PATCH v3 00/10] fsdax,xfs: Add reflink support for fsdax

2021-03-23 Thread Ritesh Harjani
On 3/19/21 7:22 AM, Shiyang Ruan wrote: From: Shiyang Ruan This patchset is attempt to add CoW support for fsdax, and take XFS, which has both reflink and fsdax feature, as an example. Thanks for the patchset. I have tried reviewing the series from logical correctness and to some extent

Re: [PATCH] ext4: properly check for dirty state in ext4_inode_datasync_dirty()

2020-10-28 Thread Ritesh Harjani
On 10/28/20 8:59 PM, Theodore Y. Ts'o wrote: On Wed, Oct 28, 2020 at 08:57:03AM +0530, Ritesh Harjani wrote: Well, I too noticed this yesterday while I was testing xfstests -g swap. Those tests were returning _notrun, hence that could be the reason why it didn't get notice in XFSTESTing

Re: [PATCH] ext4: properly check for dirty state in ext4_inode_datasync_dirty()

2020-10-28 Thread Ritesh Harjani
On 10/28/20 9:18 AM, harshad shirwadkar wrote: Actually the simpler fix for this in case of fast commits is to check if the inode is on the fast commit list or not. Since we clear the fast commit list after every fast and / or full commit, it's always true that if the inode is not on the

Re: [PATCH] ext4: properly check for dirty state in ext4_inode_datasync_dirty()

2020-10-28 Thread Ritesh Harjani
On 10/27/20 3:58 AM, harshad shirwadkar wrote: Thanks Andrea for catching and sending out a fix for this. On Sat, Oct 24, 2020 at 7:01 AM Andrea Righi wrote: ext4_inode_datasync_dirty() needs to return 'true' if the inode is dirty, 'false' otherwise, but the logic seems to be incorrectly

Re: [RFC] nvfs: a filesystem for persistent memory

2020-09-22 Thread Ritesh Harjani
On 9/15/20 6:30 PM, Matthew Wilcox wrote: On Tue, Sep 15, 2020 at 08:34:41AM -0400, Mikulas Patocka wrote: - when the fsck.nvfs tool mmaps the device /dev/pmem0, the kernel uses buffer cache for the mapping. The buffer cache slows does fsck by a factor of 5 to 10. Could it be possible to

Re: [PATCH AUTOSEL 5.4 105/330] ext4: make dioread_nolock the default

2020-09-18 Thread Ritesh Harjani
Hello Sasha, On 9/18/20 7:27 AM, Sasha Levin wrote: From: Theodore Ts'o [ Upstream commit 244adf6426ee31a83f397b700d964cff12a247d3 ] This fixes the direct I/O versus writeback race which can reveal stale data, and it improves the tail latency of commits on slow devices. Link:

[PATCHv3 0/1] Optimize ext4 file overwrites - perf improvement

2020-09-17 Thread Ritesh Harjani
v2]: https://lkml.org/lkml/2020/8/22/123 Ritesh Harjani (1): ext4: Optimize file overwrites fs/ext4/inode.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) -- 2.26.2

[PATCHv3 1/1] ext4: Optimize file overwrites

2020-09-17 Thread Ritesh Harjani
bd2 slab cache allocation (jbd2_journal_handle). On x86 VM, ~2x perf improvement was observed. Reported-by: Dan Williams Suggested-by: Jan Kara Signed-off-by: Ritesh Harjani --- fs/ext4/inode.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/fs/ext4/inod

[RESEND PATCH 1/1] block: Set same_page to false in __bio_try_merge_page if ret is false

2020-09-08 Thread Ritesh Harjani
x40 system_call_exception+0xf8/0x1c0 system_call_common+0xf0/0x278 Fixes: cc90bc68422 ("block: fix "check bi_size overflow before merge"") Suggested-by: Christoph Hellwig Reported-by: Shivaprasad G Bhat Signed-off-by: Anju T Sudhakar Signed-off-by: Ritesh Harjani --- RESEND: added "

[PATCH] ext4: Implement swap_activate aops using iomap

2020-09-04 Thread Ritesh Harjani
03f ("ext4: move ext4 bmap to use iomap infrastructure") Signed-off-by: Ritesh Harjani --- [Tested xfstests with -g swap; Tested stress-ng with --thrash option] fs/ext4/inode.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index

Re: [PATCH 1/1] block: Set same_page to false in __bio_try_merge_page if ret is false

2020-08-27 Thread Ritesh Harjani
Hello Jens, On 8/21/20 11:41 PM, Ritesh Harjani wrote: If we hit the UINT_MAX limit of bio->bi_iter.bi_size and so we are anyway not merging this page in this bio, then it make sense to make same_page also as false before returning. Without this patch, we hit below WARNING in io

[PATCHv2 0/3] Optimize ext4 DAX overwrites

2020-08-22 Thread Ritesh Harjani
kmem_cache_alloc | | jbd2__journal_start | | __ext4_journal_start_sb <...> 2. This problem was reported by Dan Williams at [1] Links == [1]: https://lore.kernel.org/linux-ext4/20190802144304.gp25...@quack2.suse.cz/T/ Ritesh Harjani (3): ext4: Refactor ext4_

[PATCHv2 1/3] ext4: Refactor ext4_overwrite_io() to take ext4_map_blocks as argument

2020-08-22 Thread Ritesh Harjani
Refactor ext4_overwrite_io() to take struct ext4_map_blocks as it's function argument with m_lblk and m_len filled from caller There should be no functionality change in this patch. Signed-off-by: Ritesh Harjani --- fs/ext4/file.c | 22 +++--- 1 file changed, 11 insertions

[PATCHv2 2/3] ext4: Extend ext4_overwrite_io() for dax path

2020-08-22 Thread Ritesh Harjani
DAX uses ->iomap_begin path which gets called to map/allocate extents. In order to avoid starting journal txn where extent allocation is not required, we need to check if ext4_map_blocks() has returned any mapped extent entry. Signed-off-by: Ritesh Harjani --- fs/ext4/ext4.h | 2 ++ fs/e

[PATCHv2 3/3] ext4: Optimize ext4 DAX overwrites

2020-08-22 Thread Ritesh Harjani
Signed-off-by: Ritesh Harjani --- fs/ext4/inode.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 10dd470876b3..c18009c91e68 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3437,6 +3437,14 @@ static int ext4_iomap_begin

[PATCH 1/1] block: Set same_page to false in __bio_try_merge_page if ret is false

2020-08-21 Thread Ritesh Harjani
x40 system_call_exception+0xf8/0x1c0 system_call_common+0xf0/0x278 Suggested-by: Christoph Hellwig Reported-by: Shivaprasad G Bhat Signed-off-by: Anju T Sudhakar Signed-off-by: Ritesh Harjani --- [prev discussion]:- https://patchwork.kernel.org/patch/11723453/ block/bio.c | 4 +++- 1 file changed, 3 inserti

Re: [PATCH] iomap: Fix the write_count in iomap_add_to_ioend().

2020-08-21 Thread Ritesh Harjani
On 8/21/20 11:30 AM, Christoph Hellwig wrote: On Fri, Aug 21, 2020 at 10:15:33AM +0530, Ritesh Harjani wrote: Please correct me here, but as I see, bio has only these two limits which it checks for adding page to bio. It doesn't check for limits of /sys/block//queue/* no? I guess

Re: [PATCH] iomap: Fix the write_count in iomap_add_to_ioend().

2020-08-21 Thread Ritesh Harjani
On 8/21/20 11:37 AM, Christoph Hellwig wrote: On Wed, Aug 19, 2020 at 03:58:41PM +0530, Anju T Sudhakar wrote: From: Ritesh Harjani __bio_try_merge_page() may return same_page = 1 and merged = 0. This could happen when bio->bi_iter.bi_size + len > UINT_MAX. Handle thi

Re: [PATCH] iomap: Fix the write_count in iomap_add_to_ioend().

2020-08-20 Thread Ritesh Harjani
Hello Dave, Thanks for reviewing this. On 8/21/20 4:41 AM, Dave Chinner wrote: On Wed, Aug 19, 2020 at 03:58:41PM +0530, Anju T Sudhakar wrote: From: Ritesh Harjani __bio_try_merge_page() may return same_page = 1 and merged = 0. This could happen when bio->bi_iter.bi_size + len > UI

Re: [RFC 1/1] ext4: Optimize ext4 DAX overwrites

2020-08-20 Thread Ritesh Harjani
On 8/20/20 6:23 PM, Jan Kara wrote: On Thu 20-08-20 17:06:28, Ritesh Harjani wrote: Currently in case of DAX, we are starting a transaction everytime for IOMAP_WRITE case. This can be optimized away in case of an overwrite (where the blocks were already allocated). This could give

[RFC 0/1] Optimize ext4 DAX overwrites

2020-08-20 Thread Ritesh Harjani
tter here. We could check for overwrite in ext4_dax_write_iter(), like how we do for DIO writes. Thoughts? 3. This problem was reported by Dan Williams at [1] Links == [1]: https://lore.kernel.org/linux-ext4/20190802144304.gp25...@quack2.suse.cz/T/ Ritesh Harjani (1): ext4: Optimize

[RFC 1/1] ext4: Optimize ext4 DAX overwrites

2020-08-20 Thread Ritesh Harjani
-off-by: Ritesh Harjani --- fs/ext4/ext4.h | 1 + fs/ext4/file.c | 2 +- fs/ext4/inode.c | 8 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 42f5060f3cdf..9a2138afc751 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -3232,6

Re: [PATCH -next] ext2: remove duplicate include

2020-08-18 Thread Ritesh Harjani
On 8/19/20 8:24 AM, Wang Hai wrote: Remove linux/fiemap.h which is included more than once Reported-by: Hulk Robot Signed-off-by: Wang Hai LGTM, please feel free to add, Reviewed-by: Ritesh Harjani --- fs/ext2/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ext2

[PATCHv2 2/2] tasks: Add headers and improve spacing format

2020-08-18 Thread Ritesh Harjani
3 rcu_gp Signed-off-by: Ritesh Harjani --- scripts/gdb/linux/tasks.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 0301dc1e0138..17ec19e9b5bf 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb

[PATCHv2 1/2] proc: Add struct mount & struct super_block addr in lx-mounts command

2020-08-18 Thread Ritesh Harjani
0x888a0bb51000 devtmpfs /dev devtmpfs rw,relatime 0 0 Signed-off-by: Ritesh Harjani --- scripts/gdb/linux/proc.py | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 6a56bba233a9..09cd871925a5 100644

[PATCHv2 0/2] scripts:gdb: Add few structs info in gdb scripts

2020-08-18 Thread Ritesh Harjani
I was using these structs info internally in my gdb scripts. So sending it out for merge to upstream. Patch-2 is just adding some headers and improves spacing. -- 2.25.4

Re: [PATCH 2/2] tasks: Add task_struct addr for lx-ps cmd

2020-08-18 Thread Ritesh Harjani
On 8/18/20 11:10 AM, Jan Kiszka wrote: On 18.08.20 06:04, Ritesh Harjani wrote: task_struct addr in lx-ps cmd seems helpful TASK PIDCOMM 0x82c2b8c0 0 swapper/0 0x888a0ba20040 1 systemd 0x888a0ba24040 2 kthreadd 0x888a0ba28040 3 rcu_gp

Re: [PATCH 1/2] proc: Add struct mount & struct super_block addr in lx-mounts command

2020-08-18 Thread Ritesh Harjani
On 8/18/20 11:07 AM, Jan Kiszka wrote: On 18.08.20 06:04, Ritesh Harjani wrote: This is many times found useful while debugging some FS related issue. mount super_block fstype devname pathname options 0x888a0bfa4b40 0x888a0bfc1000 rootfs none / rw 0 0

[PATCH 2/2] tasks: Add task_struct addr for lx-ps cmd

2020-08-17 Thread Ritesh Harjani
task_struct addr in lx-ps cmd seems helpful TASK PIDCOMM 0x82c2b8c0 0 swapper/0 0x888a0ba20040 1 systemd 0x888a0ba24040 2 kthreadd 0x888a0ba28040 3 rcu_gp Signed-off-by: Ritesh Harjani --- scripts/gdb/linux/tasks.py | 9 + 1 file

[PATCH 0/2] scripts:gdb: Add few structs in gdb scripts

2020-08-17 Thread Ritesh Harjani
I was using these structs info internally in my gdb scripts. So sending it out for merge to upstream. Ritesh Harjani (2): proc: Add struct mount & struct super_block addr in lx-mounts command tasks: Add task_struct addr for lx-ps cmd scripts/gdb/linux/lists.py

[PATCH 1/2] proc: Add struct mount & struct super_block addr in lx-mounts command

2020-08-17 Thread Ritesh Harjani
0x888a0bb51000 devtmpfs devtmpfs /dev rw ,relatime 0 0 Signed-off-by: Ritesh Harjani --- scripts/gdb/linux/proc.py | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 6a56bba233a9..c16fab981bdd 100644

Re: [PATCH] mballoc: Replace seq_printf with seq_puts

2020-08-10 Thread Ritesh Harjani
On 8/10/20 7:51 AM, Xu Wang wrote: seq_puts is a lot cheaper than seq_printf, so use that to print literal strings. Signed-off-by: Xu Wang Looks good to me. Reviewed-by: Ritesh Harjani

Re: [RFC 1/1] pmem: Add cond_resched() in bio_for_each_segment loop in pmem_make_request

2020-08-07 Thread Ritesh Harjani
On 8/4/20 3:21 AM, Dave Chinner wrote: On Mon, Aug 03, 2020 at 12:44:04PM +0530, Ritesh Harjani wrote: On 8/3/20 4:31 AM, Dave Chinner wrote: On Wed, Jul 29, 2020 at 02:15:18PM +0530, Ritesh Harjani wrote: For systems which do not have CONFIG_PREEMPT set and if there is a heavy multi

Re: [RFC 1/1] pmem: Add cond_resched() in bio_for_each_segment loop in pmem_make_request

2020-08-03 Thread Ritesh Harjani
On 8/3/20 4:31 AM, Dave Chinner wrote: On Wed, Jul 29, 2020 at 02:15:18PM +0530, Ritesh Harjani wrote: For systems which do not have CONFIG_PREEMPT set and if there is a heavy multi-threaded load/store operation happening on pmem + sometimes along with device latencies, softlockup warnings

[RFC 1/1] pmem: Add cond_resched() in bio_for_each_segment loop in pmem_make_request

2020-07-29 Thread Ritesh Harjani
dle_page_fault+0x10/0x30 Reviewed-by: Aneesh Kumar K.V Signed-off-by: Ritesh Harjani --- drivers/nvdimm/pmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 2df6994acf83..fcf7af13897e 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm

Re: ext4: delete the invalid BUGON in ext4_mb_load_buddy_gfp()

2020-07-26 Thread Ritesh Harjani
On 7/27/20 7:24 AM, brookxu wrote: Delete the invalid BUGON in ext4_mb_load_buddy_gfp(), the previous code has already judged whether page is NULL. Signed-off-by: Chunguang Xu Thanks for the patch. LGTM. Feel free to add. Reviewed-by: Ritesh Harjani ---  fs/ext4/mballoc.c | 3 ---  1

Re: [ext4] d3b6f23f71: stress-ng.fiemap.ops_per_sec -60.5% regression

2020-07-15 Thread Ritesh Harjani
Hello Xing, On 4/7/20 1:30 PM, kernel test robot wrote: Greeting, FYI, we noticed a -60.5% regression of stress-ng.fiemap.ops_per_sec due to commit: commit: d3b6f23f71670007817a5d59f3fbafab2b794e8c ("ext4: move ext4_fiemap to use iomap framework")

Re: [PATCH] ext4: Delete unnecessary checks before brelse()

2020-07-08 Thread Ritesh Harjani
the Coccinelle software. Signed-off-by: Markus Elfring Sure, LGTM. Feel free to add Reviewed-by: Ritesh Harjani --- fs/ext4/extents.c | 6 ++ fs/ext4/xattr.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index

Re: 5.8-rc1: new warnings in ext4_mb_new_blocks?

2020-06-15 Thread Ritesh Harjani
On 6/15/20 1:07 PM, Pavel Machek wrote: Hi! Booting 5.8-rc1 on x220, I get scary warnings: [7.089941] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: errors=remount-ro [7.343231] BUG: using smp_processor_id() in preemptible [] code: systemd-tmpfile/2788 [

Re: upstream test error: BUG: using smp_processor_id() in preemptible code in ext4_mb_new_blocks

2020-06-12 Thread Ritesh Harjani
I am seeing this all over the place on Linus's tree right now: [ +0.008563] BUG: using smp_processor_id() in preemptible [] code: systemd/1 [ +0.11] caller is ext4_mb_new_blocks+0x2ac/0xc10 [ +0.02] CPU: 31 PID: 1 Comm: systemd Not tainted 5.7.0-14371-g25ae6195a4c7 #66 [

Re: linux-next test error: BUG: using smp_processor_id() in preemptible [ADDR] code: syz-fuzzer/6792

2020-06-12 Thread Ritesh Harjani
On 6/12/20 6:13 PM, Ido Schimmel wrote: On Tue, Jun 02, 2020 at 06:11:29PM +0530, Ritesh Harjani wrote: #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 0e21d4620dd047da7952f44a2e1ac777ded2d57e >From cc1cf67d99d5fa61db0651c89c288df31bad6b8e Mon Sep 17 00:00

Re: [PATCH] ext4: mballoc: Disable preemption before getting per-CPU pointer

2020-06-10 Thread Ritesh Harjani
Hello, Fix for this is already submitted @ https://patchwork.ozlabs.org/project/linux-ext4/patch/534f275016296996f54ecf65168bb3392b6f653d.1591699601.git.rite...@linux.ibm.com/ -ritesh On 6/10/20 7:19 PM, YueHaibing wrote: BUG: using smp_processor_id() in preemptible [] code:

Re: [PATCHv2 1/1] ext4: mballoc: Use this_cpu_read instead of this_cpu_ptr

2020-06-09 Thread Ritesh Harjani
On 6/9/20 6:07 PM, Hillf Danton wrote: On Tue, 9 Jun 2020 18:53:23 +0800 Ritesh Harjani wrote: Simplify reading a seq variable by directly using this_cpu_read API instead of doing this_cpu_ptr and then dereferencing it. Two of the quick questions 1) Why can blocks discarded in a ext4 FS

Re: [PATCHv5 1/1] ext4: mballoc: Use raw_cpu_ptr instead of this_cpu_ptr

2020-06-09 Thread Ritesh Harjani
This patch is superseded by https://patchwork.ozlabs.org/project/linux-ext4/patch/534f275016296996f54ecf65168bb3392b6f653d.1591699601.git.rite...@linux.ibm.com/

Re: [PATCHv5 3/5] ext4: mballoc: Introduce pcpu seqcnt for freeing PA to improve ENOSPC handling

2020-06-09 Thread Ritesh Harjani
On 6/9/20 3:50 PM, Borislav Petkov wrote: On Wed, Jun 03, 2020 at 03:40:16PM +0530, Ritesh Harjani wrote: Yes, this is being discussed in the community. I have submitted a patch which should help fix this warning msg. Feel free to give this a try on your setup. https://marc.info/?l=linux

Re: [PATCHv5 1/1] ext4: mballoc: Use raw_cpu_ptr instead of this_cpu_ptr

2020-06-03 Thread Ritesh Harjani
This fixes the warning observed on various Samsung Exynos SoC based boards with linux-next 20200602. Tested-by: Marek Szyprowski Thanks Marek, Hello Ted, Please pick up below change which I just sent with an added "Fixes" by tag. Changes wise it is the same which Marek tested.

[PATCH 1/1] ext4: mballoc: Use raw_cpu_ptr instead of this_cpu_ptr

2020-06-03 Thread Ritesh Harjani
;ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling") Signed-off-by: Ritesh Harjani Reported-by: syzbot+82f324bb69744c5f6...@syzkaller.appspotmail.com --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4

Re: [PATCHv5 3/5] ext4: mballoc: Introduce pcpu seqcnt for freeing PA to improve ENOSPC handling

2020-06-03 Thread Ritesh Harjani
Hi Marek, On 6/3/20 12:18 PM, Marek Szyprowski wrote: Hi Ritesh, On 20.05.2020 08:40, Ritesh Harjani wrote: There could be a race in function ext4_mb_discard_group_preallocations() where the 1st thread may iterate through group's bb_prealloc_list and remove all the PAs and add to function's

Re: linux-next test error: BUG: using smp_processor_id() in preemptible [ADDR] code: syz-fuzzer/6792

2020-06-03 Thread Ritesh Harjani
On 6/2/20 8:22 PM, Hillf Danton wrote: Tue, 02 Jun 2020 04:20:16 -0700 syzbot found the following crash on: HEAD commit:0e21d462 Add linux-next specific files for 20200602 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=127233ee10 kernel config:

[PATCHv5 1/1] ext4: mballoc: Use raw_cpu_ptr instead of this_cpu_ptr

2020-06-02 Thread Ritesh Harjani
ext4_init_new_dir fs/ext4/namei.c:2757 [inline] ext4_mkdir+0x5e0/0xdf0 fs/ext4/namei.c:2802 vfs_mkdir+0x419/0x690 fs/namei.c:3632 do_mkdirat+0x21e/0x280 fs/namei.c:3655 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Ritesh Harjani

Re: linux-next test error: BUG: using smp_processor_id() in preemptible [ADDR] code: syz-fuzzer/6792

2020-06-02 Thread Ritesh Harjani
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 0e21d4620dd047da7952f44a2e1ac777ded2d57e >From cc1cf67d99d5fa61db0651c89c288df31bad6b8e Mon Sep 17 00:00:00 2001 From: Ritesh Harjani Date: Tue, 2 Jun 2020 17:54:12 +0530 Subject: [PATCH 1/1] ext4: mballoc:

Re: linux-next: Signed-off-by missing for commit in the ext4 tree

2020-06-01 Thread Ritesh Harjani
On 5/29/20 5:41 PM, Stephen Rothwell wrote: Hi all, Commit 560d6b3da024 ("ext4: mballoc: fix possible NULL ptr & remove BUG_ONs from DOUBLE_CHECK") is missing a Signed-off-by from its author. My bad. I guess it got missed due to the three dotted lines.

[PATCHv5 1/5] ext4: mballoc: Add blocks to PA list under same spinlock after allocating blocks

2020-05-20 Thread Ritesh Harjani
uld be freed from the PA Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.c | 97 ++- 1 file changed, 62 insertions(+), 35 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 33a69424942c..decc5168d126 100644 --- a/fs/ext4/mballoc.c +

[PATCHv5 4/5] ext4: mballoc: Refactor ext4_mb_good_group()

2020-05-20 Thread Ritesh Harjani
() which should be called when without holding ext4_lock_group(). Also in further patches we hold the spinlock (ext4_lock_group()) while doing any calculations which involves grp->bb_free or grp->bb_fragments. Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.

[PATCHv5 3/5] ext4: mballoc: Introduce pcpu seqcnt for freeing PA to improve ENOSPC handling

2020-05-20 Thread Ritesh Harjani
(Since the seq counter for all of those will match as no block allocation/discard was done during that duration). Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.c | 56 ++- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/fs/ext4/mbal

[PATCHv5 5/5] ext4: mballoc: Use lock for checking free blocks while retrying

2020-05-20 Thread Ritesh Harjani
ve considered blocks about to be discarded from PA lists). So during retry attempt to allocate blocks we will use ext4_lock_group() for checking if the group is good or not. Signed-off-by: Ritesh Harjani --- fs/ext4/ext4.h | 2 ++ fs/ext4/mballoc.c | 13 - include

[PATCHv5 0/5] Improve ext4 handling of ENOSPC with multi-threaded use-case

2020-05-20 Thread Ritesh Harjani
kernel.org/linux-ext4/cover.1589086800.git.rite...@linux.ibm.com/ Ritesh Harjani (5): ext4: mballoc: Add blocks to PA list under same spinlock after allocating blocks ext4: mballoc: Refactor ext4_mb_discard_preallocations() ext4: mballoc: Introduce pcpu seqcnt for freeing PA to improve ENOSPC

[PATCHv5 2/5] ext4: mballoc: Refactor ext4_mb_discard_preallocations()

2020-05-20 Thread Ritesh Harjani
Implement ext4_mb_discard_preallocations_should_retry() which we will need in later patches to add more logic like check for sequence number match to see if we should retry for block allocation or not. There should be no functionality change in this patch. Signed-off-by: Ritesh Harjani --- fs

[RFCv4 3/6] ext4: mballoc: Optimize ext4_mb_good_group_nolock further if grp needs init

2020-05-10 Thread Ritesh Harjani
rly. Then recheck for ext4_mb_good_group() only once after loading the buddy cache. Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.c | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index dcd05ff7c

[RFCv4 6/6] ext4: mballoc: Introduce pcpu seqcnt for freeing PA to improve ENOSPC handling

2020-05-10 Thread Ritesh Harjani
(Since the seq counter for all of those will match as no block allocation/discard was done during that duration). Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.c | 56 ++- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/fs/ext4/mbal

[RFCv4 5/6] ext4: mballoc: Refactor ext4_mb_discard_preallocations()

2020-05-10 Thread Ritesh Harjani
Implement ext4_mb_discard_preallocations_should_retry() which we will need in later patches to add more logic like check for sequence number match to see if we should retry for block allocation or not. There should be no functionality change in this patch. Signed-off-by: Ritesh Harjani --- fs

[RFCv4 4/6] ext4: mballoc: Add blocks to PA list under same spinlock after allocating blocks

2020-05-10 Thread Ritesh Harjani
uld be freed from the PA Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.c | 97 ++- 1 file changed, 62 insertions(+), 35 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 7d766dc34cdd..574ce400a3b5 100644 --- a/fs/ext4/mballoc.c +

[RFCv4 2/6] ext4: mballoc: Use ext4_lock_group() around calculations involving bb_free

2020-05-10 Thread Ritesh Harjani
pen that we see all of those group's bb_free is zero and fail the allocation while there is sufficient space if we free up all the PA. So this patch takes the ext4_lock_group() around calculations involving grp->bb_free in ext4_mb_good_group() & ext4_mb_good_group_nolock() Signed-off-

[RFCv4 1/6] ext4: mballoc: Refactor ext4_mb_good_group()

2020-05-10 Thread Ritesh Harjani
() which should be called when without holding ext4_lock_group(). Also in further patches we hold the spinlock (ext4_lock_group()) while doing any calculations which involves grp->bb_free or grp->bb_fragments. Signed-off-by: Ritesh Harjani --- fs/ext4/mballoc.

[RFCv4 0/6] Improve ext4 handling of ENOSPC with multi-threaded use-case

2020-05-10 Thread Ritesh Harjani
chwork.ozlabs.org/project/linux-ext4/cover/cover.1588313626.git.rite...@linux.ibm.com/ [1]: https://github.com/riteshharjani/LinuxStudy/blob/master/tools/test_mballoc.sh [2]: https://patchwork.ozlabs.org/project/linux-ext4/cover/cover.1589086800.git.rite...@linux.ibm.com/ Ritesh Harjani (6)

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-23 Thread Ritesh Harjani
On 10/23/19 1:41 AM, Al Viro wrote: On Tue, Oct 22, 2019 at 03:37:36PM +0100, Al Viro wrote: On Tue, Oct 22, 2019 at 07:08:54PM +0530, Ritesh Harjani wrote: I think we have still not taken this patch. Al? or, for that matter, any callers of filename_lookup() assuming that the lack

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-22 Thread Ritesh Harjani
I think we have still not taken this patch. Al? On 10/15/19 9:37 AM, Ritesh Harjani wrote: ping!! On 9/27/19 10:12 AM, Ritesh Harjani wrote: d_is_negative can race with d_instantiate_new() -> __d_set_inode_and_type(). For e.g. in use cases where Thread-1 is creating symlink (do

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-14 Thread Ritesh Harjani
ping!! On 9/27/19 10:12 AM, Ritesh Harjani wrote: d_is_negative can race with d_instantiate_new() -> __d_set_inode_and_type(). For e.g. in use cases where Thread-1 is creating symlink (doing d_instantiate_new()) & Thread-2 is doing cat of that symlink while doing lookup_fast (via REF-wa

[PATCH 1/1] direct-io: Change is_async member of struct dio from int to bool

2019-09-26 Thread Ritesh Harjani
Change is_async member of struct dio from int to bool. Found this during code review. Signed-off-by: Ritesh Harjani --- fs/direct-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index ae196784f487..b139876653ef 100644 --- a/fs/direct-io.c

[PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-09-26 Thread Ritesh Harjani
//Then it crashes while //doing inode->i_uid Reported-by: Guang Yuan Wu Tested-by: Guang Yuan Wu Acked-by: Jeff Layton Signed-off-by: Ritesh Harjani --- fs/namei.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/fs/nam

[RFC-v2 1/2] ext4: Add ext4_ilock & ext4_iunlock API

2019-09-22 Thread Ritesh Harjani
"xfs: fix AIM7 regression") Signed-off-by: Ritesh Harjani --- fs/ext4/ext4.h| 33 + fs/ext4/extents.c | 16 ++-- fs/ext4/file.c| 63 +-- fs/ext4/inode.c | 4 +-- fs/ext4/ioctl.c | 16 ++-- f

[RFC-v2 0/2] ext4: Improve ilock scalability to improve performance in DirectIO workloads

2019-09-22 Thread Ritesh Harjani
w-dioread-nolock-1M.pg Ritesh Harjani (2): ext4: Add ext4_ilock & ext4_iunlock API ext4: Improve DIO writes locking sequence fs/ext4/ext4.h| 33 ++ fs/ext4/extents.c | 16 +-- fs/ext4/file.c| 260 -- fs/ext4/inode.c | 4 +- fs/ex

[RFC-v2 2/2] ext4: Improve DIO writes locking sequence

2019-09-22 Thread Ritesh Harjani
condition here. 2. Added ext4_extending_io API. This checks if the IO is extending the file. Now we only check for unaligned_io, extend, dioread_nolock & overwrite. Signed-off-by: Ritesh Harjani --- fs/ext4/file.c | 213 - 1 file changed, 159 insert

Re: [PATCH V3 07/10] mmc: tegra: add Tegra186 WAR for CQE

2019-03-13 Thread Ritesh Harjani
thru NVQUIRK_CQHCI_DCMD_R1B_CMD_TIMING for Tegra186 and also implements update_dcmd_desc of cqhci_host_ops interface to set CMD_TIMING bit depending on the NVQUIRK. Tested-by: Jon Hunter Signed-off-by: Sowjanya Komatineni Thanks, Reviewed-by: Ritesh Harjani --- drivers/mmc/host/sdhci

Re: [PATCH V3 06/10] mmc: cqhci: allow hosts to update dcmd cmd desc

2019-03-13 Thread Ritesh Harjani
On 3/14/2019 3:15 AM, Sowjanya Komatineni wrote: This patch adds update_dcmd_desc interface to cqhci_host_ops to allow hosts to update any of the DCMD task descriptor attributes and parameters. Tested-by: Jon Hunter Signed-off-by: Sowjanya Komatineni Thanks, Reviewed-by: Ritesh Harjani

Re: [PATCH V1 07/11] mmc: cqhci: add quirk for setting DCMD CMD_TIMING

2019-03-12 Thread Ritesh Harjani
On 3/7/2019 11:46 PM, Sowjanya Komatineni wrote: On 3/6/2019 6:30 PM, Adrian Hunter wrote: On 2/03/19 7:20 AM, Sowjanya Komatineni wrote: This patch adds a quirk for setting CMD_TIMING to 1 in descriptor for DCMD with R1B response type to allow the command to be sent to device during data

Re: [PATCH V1 07/11] mmc: cqhci: add quirk for setting DCMD CMD_TIMING

2019-03-06 Thread Ritesh Harjani
On 3/6/2019 6:30 PM, Adrian Hunter wrote: On 2/03/19 7:20 AM, Sowjanya Komatineni wrote: This patch adds a quirk for setting CMD_TIMING to 1 in descriptor for DCMD with R1B response type to allow the command to be sent to device during data activity or busy time. Tegra186 CQHCI host has bug

Re: panic with CONFIG_FAIL_MMC_REQUEST and cqhci

2019-02-22 Thread Ritesh Harjani
Hi Laura, On 2/19/2019 12:59 AM, Laura Abbott wrote: Hi, Fedora got report of a panic when I accidentally left debugging enabled on a build https://bugzilla.redhat.com/show_bug.cgi?id=1677438 It looks like a panic from code in CONFIG_FAIL_MMC_REQUEST from the cqhci driver because there isn't

Re: [f2fs-dev] [PATCH] f2fs: do not use mutex lock in atomic context

2019-02-17 Thread Ritesh Harjani
On 2/15/2019 2:40 PM, Chao Yu wrote: On 2019/2/15 12:28, Ritesh Harjani wrote: On 2/14/2019 9:40 PM, Chao Yu wrote: On 2019-2-14 15:46, Sahitya Tummala wrote: On Wed, Feb 13, 2019 at 11:25:31AM +0800, Chao Yu wrote: On 2019/2/4 16:06, Sahitya Tummala wrote: Fix below warning coming

Re: [f2fs-dev] [PATCH] f2fs: do not use mutex lock in atomic context

2019-02-14 Thread Ritesh Harjani
On 2/14/2019 9:40 PM, Chao Yu wrote: On 2019-2-14 15:46, Sahitya Tummala wrote: On Wed, Feb 13, 2019 at 11:25:31AM +0800, Chao Yu wrote: On 2019/2/4 16:06, Sahitya Tummala wrote: Fix below warning coming because of using mutex lock in atomic context. BUG: sleeping function called from

Re: [RFC PATCH 16/35] ovl: readd lsattr/chattr support

2018-04-23 Thread Ritesh Harjani
On 4/12/2018 8:38 PM, Miklos Szeredi wrote: Implement FS_IOC_GETFLAGS and FS_IOC_SETFLAGS. Needs vfs_ioctl() exported to modules. Do you think if it is better to separate out ovl implementation and export of vfs_ioctl method ? Probably there are other users which should be using vfs_ioctl

Re: [RFC PATCH 16/35] ovl: readd lsattr/chattr support

2018-04-23 Thread Ritesh Harjani
On 4/12/2018 8:38 PM, Miklos Szeredi wrote: Implement FS_IOC_GETFLAGS and FS_IOC_SETFLAGS. Needs vfs_ioctl() exported to modules. Do you think if it is better to separate out ovl implementation and export of vfs_ioctl method ? Probably there are other users which should be using vfs_ioctl

[PATCH] quota: Kill an unused extern entry form quota.h

2018-03-16 Thread Ritesh Harjani
Kill an unused extern entry from quota.h which is leftover of below patch. [f32764bd2: quota: Convert quota statistics to generic percpu_counter] Signed-off-by: Ritesh Harjani <rite...@codeaurora.org> --- include/linux/quota.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include

[PATCH] quota: Kill an unused extern entry form quota.h

2018-03-16 Thread Ritesh Harjani
Kill an unused extern entry from quota.h which is leftover of below patch. [f32764bd2: quota: Convert quota statistics to generic percpu_counter] Signed-off-by: Ritesh Harjani --- include/linux/quota.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/quota.h b/include/linux

[PATCH-Review] f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read

2018-03-16 Thread Ritesh Harjani
ota. Commit details in next patch contains the call stack. Since I did not had the quota enabled on f2fs configuration, I could not test this on my setup yet. Could the community kindly review and let me know if the patch is correct or not ? Ritesh Harjani (1): f2fs: Set GF_N

[PATCH-Review] f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read

2018-03-16 Thread Ritesh Harjani
ota. Commit details in next patch contains the call stack. Since I did not had the quota enabled on f2fs configuration, I could not test this on my setup yet. Could the community kindly review and let me know if the patch is correct or not ? Ritesh Harjani (1): f2fs: Set GF_N

[PATCH] f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read

2018-03-16 Thread Ritesh Harjani
x5c // mutex_lock(>dqio_mutex); dqget+0x238 __dquot_initialize+0xd4 dquot_initialize+0x10 dquot_file_open+0x34 f2fs_file_open+0x6c do_dentry_open+0x1e4 vfs_open+0x6c path_openat+0xa20 do_filp_open+0x4c do_sys_open+0x178 Signed-off-by: Ritesh Harjani <rite...@codeaurora.org>

[PATCH] f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read

2018-03-16 Thread Ritesh Harjani
x5c // mutex_lock(>dqio_mutex); dqget+0x238 __dquot_initialize+0xd4 dquot_initialize+0x10 dquot_file_open+0x34 f2fs_file_open+0x6c do_dentry_open+0x1e4 vfs_open+0x6c path_openat+0xa20 do_filp_open+0x4c do_sys_open+0x178 Signed-off-by: Ritesh Harjani --- fs/f2fs/super.c | 2 +-

Re: [RFC 0/4] mmc: sdhci-msm: Add CQE support for sdhci-msm

2017-09-01 Thread Ritesh Harjani
On 8/31/2017 2:09 PM, Adrian Hunter wrote: On 30/08/17 16:04, Ritesh Harjani wrote: Hi All, Please ignore the previous patch series from a wrong email address. Stupid gitconfig issue. Apologies for the spam. This is RFC patch series based on top of ulfh_mmc/cmdq branch which is based upon

Re: [RFC 0/4] mmc: sdhci-msm: Add CQE support for sdhci-msm

2017-09-01 Thread Ritesh Harjani
On 8/31/2017 2:09 PM, Adrian Hunter wrote: On 30/08/17 16:04, Ritesh Harjani wrote: Hi All, Please ignore the previous patch series from a wrong email address. Stupid gitconfig issue. Apologies for the spam. This is RFC patch series based on top of ulfh_mmc/cmdq branch which is based upon

  1   2   3   >