Re: [PATCH 07/13] btrfs: basic direct read operation

2019-08-12 Thread RITESH HARJANI
On 8/3/19 3:30 AM, Goldwyn Rodrigues wrote: From: Goldwyn Rodrigues Add btrfs_dio_iomap_ops for iomap.begin() function. In order to accomodate dio reads, add a new function btrfs_file_read_iter() which would call btrfs_dio_iomap_read() for DIO reads and fallback to generic_file_read_iter othe

Re: Odd locking pattern introduced as part of "nowait aio support"

2019-09-11 Thread Ritesh Harjani
Hi, On 9/11/19 3:09 PM, Andres Freund wrote: Hi, On 2019-09-11 14:04:20 +1000, Dave Chinner wrote: On Tue, Sep 10, 2019 at 03:33:27PM -0700, Andres Freund wrote: Hi, Especially with buffered io it's fairly easy to hit contention on the inode lock, during writes. With something like io_uring,

Re: [PATCH 2/3] ext4: fix inode rwsem regression

2019-09-12 Thread Ritesh Harjani
these changes in the new APIs. Otherwise looks good to me! Reviewed-by: Ritesh Harjani --- fs/ext4/file.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 70b0438dbc94..d5b2d0cc325d 100644 --- a/fs/ext4/file.c

Re: [PATCH v3 00/10] fsdax,xfs: Add reflink&dedupe 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 f

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

2021-03-23 Thread Ritesh Harjani
: 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 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 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. Signed-off-by:

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 n

Re: [PATCH v3 00/13] btrfs: support read-write for subpage metadata

2021-03-28 Thread Ritesh Harjani
On 21/03/25 09:16PM, Qu Wenruo wrote: > > > On 2021/3/25 下午8:20, Neal Gompa wrote: > > On Thu, Mar 25, 2021 at 3:17 AM Qu Wenruo wrote: > > > > > > This patchset can be fetched from the following github repo, along with > > > the full subpage RW support: > > > https://github.com/adam900710/linux/t

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

2021-03-31 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 v3 06/10] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-03-31 Thread Ritesh Harjani
, kaddr + 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 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 files.

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 > Signed-o

Re: [PATCH v3 00/13] btrfs: support read-write for subpage metadata

2021-04-02 Thread Ritesh Harjani
On 21/03/29 10:01AM, Qu Wenruo wrote: > > > On 2021/3/29 上午4:02, Ritesh Harjani wrote: > > On 21/03/25 09:16PM, Qu Wenruo wrote: > > > > > > > > > On 2021/3/25 下午8:20, Neal Gompa wrote: > > > > On Thu, Mar 25, 2021 at 3:17 AM Qu Wenruo wrote:

Re: [PATCH v3 00/13] btrfs: support read-write for subpage metadata

2021-04-02 Thread Ritesh Harjani
On 21/04/02 04:36PM, Qu Wenruo wrote: > > > On 2021/4/2 下午4:33, Ritesh Harjani wrote: > > On 21/03/29 10:01AM, Qu Wenruo wrote: > > > > > > > > > On 2021/3/29 上午4:02, Ritesh Harjani wrote: > > > > On 21/03/25 09:16PM, Qu Wenruo wrote: > &g