p can get correct result.
>
> And thanks to the new qgroup framework, we don't need to check whether
> it is needed to dirty some file extents. Even some unrelated extents are
> re-dirtied, qgroup can handle it quite well.
>
> So we only need to ensure we don't miss some e
On 07/29/2016 08:06 PM, Qu Wenruo wrote:
> Hi, Goldwyn,
>
> This patch is replaced by the following patchset:
> https://patchwork.kernel.org/patch/9213915/
> https://patchwork.kernel.org/patch/9213913/
>
> Would you mind testing the new patch?
>
Sorry, it fails. Actually, the previous patch
Thanks Qu,
This patch set fixes all the reported problems. However, I have some
minor issues with coding style.
On 08/04/2016 09:29 PM, Qu Wenruo wrote:
> Refactor btrfs_qgroup_insert_dirty_extent() function, to two functions:
> 1. _btrfs_qgroup_insert_dirty_extent()
>Almost the same with or
Thanks Qu,
This patch set fixes all the reported problems. However, I have some
minor issues with coding style.
On 08/04/2016 09:29 PM, Qu Wenruo wrote:
> Refactor btrfs_qgroup_insert_dirty_extent() function, to two functions:
> 1. _btrfs_qgroup_insert_dirty_extent()
>Almost the same with or
On 08/07/2016 07:39 PM, Qu Wenruo wrote:
>
>
> At 08/07/2016 01:19 AM, Goldwyn Rodrigues wrote:
>> Thanks Qu,
>>
>> This patch set fixes all the reported problems. However, I have some
>> minor issues with coding style.
>>
>
> Thanks for the tes
On 08/08/2016 07:26 PM, Qu Wenruo wrote:
>
>
> At 08/08/2016 10:54 AM, Goldwyn Rodrigues wrote:
>>
>>
>> On 08/07/2016 07:39 PM, Qu Wenruo wrote:
>>>
>>>
>>> At 08/07/2016 01:19 AM, Goldwyn Rodrigues wrote:
>>>> Thanks Qu,
&g
On 08/08/2016 08:12 PM, Qu Wenruo wrote:
>
>
> At 08/09/2016 09:01 AM, Goldwyn Rodrigues wrote:
>>
>>
>> On 08/08/2016 07:26 PM, Qu Wenruo wrote:
>>>
>>>
>>> At 08/08/2016 10:54 AM, Goldwyn Rodrigues wrote:
>>>>
>>>>
ount these data extents correctly.
>
> Cc: Mark Fasheh
> Reported-by: Mark Fasheh
> Reported-by: Filipe Manana
> Signed-off-by: Qu Wenruo
Tested-by: Goldwyn Rodrigues
> ---
> fs/btrfs/relocation.c | 114
> +++---
> 1 f
d comment for both functions, to info developers how to keep
> qgroup correct when doing hacks.
>
> Cc: Mark Fasheh
> Cc: Goldwyn Rodrigues
> Signed-off-by: Qu Wenruo
Reviewed-and-Tested-by: Goldwyn Rodrigues
> ---
> fs/btrfs/delayed-ref.c | 7 ++-
> fs/btrfs/ext
ug can be detected by btrfs/119 test case.
>
> Cc: Mark Fasheh
> Signed-off-by: Qu Wenruo
Reviewed-and-Tested-by: Goldwyn Rodrigues
> ---
> fs/btrfs/tree-log.c | 16
> 1 file changed, 16 insertions(+)
>
> diff --git a/fs/btrfs/tree-log.c b/fs/btr
From: Goldwyn Rodrigues
While free'ing qgroup->reserved resources, we must check
if the page is already commmitted to disk or still in memory.
If not, the reserve free is doubly accounted, once while
invalidating the page, and the next time while free'ing
delalloc. This resu
From: Goldwyn Rodrigues
Code cleanup. parent_start is initialized multiple times when it is
not necessary to do so.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.c | 18 +++---
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
From: Goldwyn Rodrigues
Code cleanup. count is already (unsgined long)-1. That is the reason
run_all was set. Do not reassign it (unsigned long)-1.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/extent-tree.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs
From: Goldwyn Rodrigues
Fixes: 7cf5b97650f2 ("btrfs: qgroup: Cleanup old inaccurate facilities")
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/extent-tree.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 23b3b9f..a8a4931 10
On 09/22/2016 08:06 PM, Qu Wenruo wrote:
>
>
> At 09/23/2016 02:47 AM, Goldwyn Rodrigues wrote:
>> From: Goldwyn Rodrigues
>>
>> While free'ing qgroup->reserved resources, we must check
>> if the page is already commmitted to disk or still in memo
On 09/25/2016 09:33 PM, Qu Wenruo wrote:
>
>
> At 09/23/2016 09:43 PM, Goldwyn Rodrigues wrote:
>>
>>
>> On 09/22/2016 08:06 PM, Qu Wenruo wrote:
>>>
>>>
>>> At 09/23/2016 02:47 AM, Goldwyn Rodrigues wrote:
>>>> From: Goldwyn
On 09/26/2016 10:10 PM, Qu Wenruo wrote:
>
>
> At 09/26/2016 10:31 PM, Goldwyn Rodrigues wrote:
>>
>>
>> On 09/25/2016 09:33 PM, Qu Wenruo wrote:
>>>
>>>
>>> At 09/23/2016 09:43 PM, Goldwyn Rodrigues wrote:
>>>>
>>>&g
On 09/27/2016 08:44 PM, Qu Wenruo wrote:
> Finally reproduced it.
>
> Although in a low chance, about 1/10.
>
> Under most case, the final remove gets executed without error.
Change 50m to 500m while setting the qgroup limit, the probability will
increase.
--
Goldwyn
--
To unsubscribe fro
On 09/29/2016 03:57 AM, Qu Wenruo wrote:
> Thanks for your test script.
>
> I succeeded in pinning down the problem.
>
> The problem is, btrfs is invalidate pages that belongs to ordered
> extent(goes through writeback)
No, I don't think invalidated pages are going through writeback. The
prob
From: Goldwyn Rodrigues
While free'ing qgroup->reserved resources, we much check if
the page has not been invalidated by a truncate operation
by checking if the page is still dirty before reducing the
qgroup resources. Resources in such a case are free'd when
the entire extent i
good.
Reviewed-by: Goldwyn Rodrigues
> ---
> fs/btrfs/qgroup.c | 21 -
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
> index 8db2e29..8532587 100644
> --- a/fs/btrfs/qgroup.c
> +++ b/
t.
>
> Signed-off-by: Qu Wenruo
Reviewed-by: Goldwyn Rodrigues
> ---
> fs/btrfs/qgroup.c| 21 ++---
> fs/btrfs/qgroup.h| 2 +-
> include/trace/events/btrfs.h | 43 +++
> 3 files changed,
reloc tree.
> Since at commit transaction time, the tree swapping is done, and qgroup
> will account these data extents correctly.
>
> Cc: Mark Fasheh
> Reported-by: Mark Fasheh
> Reported-by: Filipe Manana
> Signed-off-by: Qu Wenruo
> Tested-by: Goldwyn Rodrigues
>
cp -a /boot $S;
done;
#let the cp from above finish
wait
btrfs fi sync $MNT
btrfs quota enable $MNT
btrfs quota rescan -w $MNT
btrfs qg show $MNT
umount $MNT
mount -t btrfs $DEV $MNT
time btrfs balance start --full-balance $MNT
umount $MNT
btrfsck $DEV
>
> Reported-by: Goldwyn R
On 10/06/2016 09:32 PM, Qu Wenruo wrote:
>
>
> At 10/07/2016 02:00 AM, Goldwyn Rodrigues wrote:
>> Hi Qu,
>>
>> On 10/06/2016 03:03 AM, Qu Wenruo wrote:
>>> We fixed balance qgroup leaking by introducing
>>> qgroup_fix_relocated_data_extents(),
From: Goldwyn Rodrigues
While performing an fsck, an assertion failure occurs because of reusing path
in a loop.
ctree.c:1112: btrfs_search_slot: Warning: assertion `p->nodes[0] != NULL`
failed, value 0
Signed-off-by: Goldwyn Rodrigues
diff --git a/cmds-check.c b/cmds-check.c
index 670c
From: Goldwyn Rodrigues
While performing an fsck, an assertion failure occurs because of reusing path
in a loop.
ctree.c:1112: btrfs_search_slot: Warning: assertion `p->nodes[0] != NULL`
failed, value 0
Signed-off-by: Goldwyn Rodrigues
diff --git a/cmds-check.c b/cmds-check.c
index 670c
On 10/24/2016 09:57 AM, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues
>
> While performing an fsck, an assertion failure occurs because of reusing path
> in a loop.
> ctree.c:1112: btrfs_search_slot: Warning: assertion `p->nodes[0] != NULL`
> failed, value 0
>
From: Goldwyn Rodrigues
Since we will be using it in another part of the code, use a
better name to declare it non-static
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 7 +--
fs/btrfs/inode.c | 14 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a
From: Goldwyn Rodrigues
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/Makefile | 1 +
fs/btrfs/ctree.h | 5
fs/btrfs/dax.c| 68 +++
fs/btrfs/file.c | 13 ++-
4 files changed, 86 insertions(+), 1 deletion(-)
create mode
From: Goldwyn Rodrigues
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/dax.c | 43 +++
fs/btrfs/file.c | 12 +++-
3 files changed, 55 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index
From: Goldwyn Rodrigues
This makes btrfs_get_extent_map_write() independent of Direct
I/O code.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/inode.c | 40 +++-
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/fs
From: Goldwyn Rodrigues
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/dax.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/dax.c b/fs/btrfs/dax.c
index d614bf73bf8e..5a297674adec 100644
--- a/fs/btrfs/dax.c
+++ b/fs/btrfs/dax.c
@@ -54,7 +54,12 @@ ssize_t
This is a support for DAX in btrfs. I understand there have been
previous attempts at it. However, I wanted to make sure copy-on-write
(COW) works on dax as well.
Before I present this to the FS folks I wanted to run this through the
btrfs. Even though I wish, I cannot get it correct the first tim
From: Goldwyn Rodrigues
Also, set the inode->i_flags to S_DAX
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/ioctl.c | 5 -
fs/btrfs/super.c | 15 +++
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctre
From: Goldwyn Rodrigues
Create a page size extent and copy the contents of the original
extent into the new one, and present to user space as the page
to write.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/dax.c | 39 +++
1 file changed, 39 insertions
From: Goldwyn Rodrigues
This is a combination of direct and buffered I/O. Similarties
with direct I/O is that it needs to allocate space before
writing. Similarities with buffered is when the data is not
page-aligned, it needs to copy parts of the previous extents. In
order to accomplish that
From: Goldwyn Rodrigues
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/dax.c | 25 -
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/dax.c b/fs/btrfs/dax.c
index 88017f8799d1..6d68d39cc5da 100644
--- a/fs/btrfs/dax.c
+++ b/fs/btrfs/dax.c
From: Goldwyn Rodrigues
These functions are required for btrfs dax support.
Signed-off-by: Goldwyn Rodrigues
---
fs/dax.c| 35 ---
include/linux/dax.h | 16
2 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/fs/dax.c b
On 6:52 05/12, Christoph Hellwig wrote:
> If you want to export these at all they have to be EXPORT_SYMBOL_GPL.
>
Understood.
> But I'd really like to avoid seeing another duplicate DAX I/O path.
> Please try to adopt the existing iomap-based infrastructure for your
> needs first.
This is not
On 11:07 06/12, Johannes Thumshirn wrote:
> On 05/12/2018 13:28, Goldwyn Rodrigues wrote:
> > This is a support for DAX in btrfs. I understand there have been
> > previous attempts at it. However, I wanted to make sure copy-on-write
> > (COW) works on dax as well.
> >
&
From: Goldwyn Rodrigues
Simplification.
We don't need an if-else-if structure where we can use a
simple OR since both conditions are performing the
same action. The short-circuit for OR will ensure that if
the first condition is true, can_overcommit() is not
called.
Signed-off-by: Go
Simplification.
No point passing the tree variable when it can be evaluated
from inode. The tests now use the io_tree from btrfs_inode
as opposed to creating one.
Changes since v1:
- included btrfs sanity tests
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/extent_io.c | 6
From: Goldwyn Rodrigues
Introduces a new type IOMAP_COW, which means the data at offset
must be read from a srcmap and copied before performing the
write on the offset.
The srcmap is used to identify where the read is to be performed
from. This is passed to iomap->begin(), which is supposed
From: Goldwyn Rodrigues
btrfs uses page->private as well to store extent_buffer. Make
the check stricter to make sure we are using page->private for iop by
comparing iblocksize < PAGE_SIZE.
Signed-off-by: Goldwyn Rodrigues
---
include/linux/iomap.h | 3 ++-
1 file changed, 2 inserti
From: Goldwyn Rodrigues
Set iomap->type to IOMAP_COW and fill up the source map in case
the I/O is not page aligned.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/iomap.c | 41 +
1 file changed, 41 insertions(+)
diff --git a/fs/btrfs/iomap.c b/fs/bt
From: Goldwyn Rodrigues
Introduce a new static structure btrfs_iomap, which carries
information from iomap_begin() to iomap_end(). This primarily
contains reservation and extent locking information.
This one is a long patch. Most of the code is "inspired" by
fs/btrfs/file.c. To kee
From: Goldwyn Rodrigues
Signed-off-by: Goldwyn Rodrigues
---
fs/iomap.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/iomap.c b/fs/iomap.c
index 6648957af268..8a7b20e432ef 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -655,7 +655,7 @@ __iomap_write_begin
This is an effort to use iomap with btrfs. This would keep most
responsibility of page handling during writes in iomap code, hence
code reduction. For CoW support, changes are needed in iomap code
to make sure we perform a copy before the write.
This is in line with the discussion we had during add
From: Goldwyn Rodrigues
Better done in a separate patch to keep the main patch short(er)
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 464
1 file changed, 464 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index
On 9:05 24/06, Christoph Hellwig wrote:
> On Fri, Jun 21, 2019 at 02:28:25PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > btrfs uses page->private as well to store extent_buffer. Make
> > the check stricter to make sure we are using page->
On 9:07 24/06, Christoph Hellwig wrote:
> xfs will need to be updated to fill in the additional iomap for the
> COW case. Has this series been tested on xfs?
>
No, I have not tested this, or make xfs set IOMAP_COW. I will try to do
it in the next iteration.
> I can't say I'm a huge fan of this
On 17:46 21/06, Darrick J. Wong wrote:
> On Fri, Jun 21, 2019 at 02:28:23PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > Introduces a new type IOMAP_COW, which means the data at offset
> > must be read from a srcmap and copied before performing
On 17:21 21/06, Darrick J. Wong wrote:
> On Fri, Jun 21, 2019 at 02:28:25PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > btrfs uses page->private as well to store extent_buffer. Make
> > the check stricter to make sure we are using page->
On 21:04 25/06, Filipe Manana wrote:
> On Tue, Jun 25, 2019 at 8:58 PM Goldwyn Rodrigues wrote:
> >
> > On 9:05 24/06, Christoph Hellwig wrote:
> > > On Fri, Jun 21, 2019 at 02:28:25PM -0500, Goldwyn Rodrigues wrote:
> > > > From: Goldwyn Rodrigues
> &g
On 8:39 26/06, Christoph Hellwig wrote:
> On Tue, Jun 25, 2019 at 02:14:42PM -0500, Goldwyn Rodrigues wrote:
> > > I can't say I'm a huge fan of this two iomaps in one method call
> > > approach. I always though two separate iomap iterations would be nicer,
>
On 11:00 26/06, Darrick J. Wong wrote:
> On Tue, Jun 25, 2019 at 02:14:42PM -0500, Goldwyn Rodrigues wrote:
> > On 9:07 24/06, Christoph Hellwig wrote:
> > > xfs will need to be updated to fill in the additional iomap for the
> > > COW case. Has this series been tested
This is an effort to use iomap for btrfs. This would keep most
responsibility of page handling during writes in iomap code, hence
code reduction. For CoW support, changes are needed in iomap code
to make sure we perform a copy before the write.
This is in line with the discussion we had during addi
From: Goldwyn Rodrigues
In case of a IOMAP_COW, read a page from the srcmap before
performing a write on the page.
Signed-off-by: Goldwyn Rodrigues
---
fs/iomap/buffered-io.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap
From: Goldwyn Rodrigues
Introduces a new type IOMAP_COW, which means the data at offset
must be read from a srcmap and copied before performing the
write on the offset.
The srcmap is used to identify where the read is to be performed
from. This is passed to iomap->begin() of the respect
From: Goldwyn Rodrigues
While most of the code works just eliminating page's private
field and related code, there is a problem when we are cloning.
The extent assumes the data is uptodate. Clear the EXTENT_UPTODATE
flag for the extent so the next time the file is read, it is
forced to be
From: Goldwyn Rodrigues
This makes btrfs_get_extent_map_write() independent of Direct
I/O code.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/inode.c | 40 +++-
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/fs
From: Goldwyn Rodrigues
Since btrfs Direct I/O needs to perform operations before submission,
use the submit_io function which operates on the bio to perform checksum
calculations etc.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 2 +-
fs/btrfs/inode.c
From: Goldwyn Rodrigues
Introduce a new btrfs_iomap structure which contains information
about the filesystem between the iomap_begin() and iomap_end() calls.
This contains information about reservations and extent locking.
This one is a long patch. Most of the code is "inspired" b
From: Goldwyn Rodrigues
Since we will be calling from another file, use a
better name to declare it non-static
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 7 +--
fs/btrfs/inode.c | 14 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs
From: Goldwyn Rodrigues
Update the inode size for dio writes during bio completion.
This ties the success of the underlying block layer
whether to increase the size of the inode. Especially for
in aio cases.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/inode.c | 6 +-
1 file changed, 5
From: Goldwyn Rodrigues
This helps filesystems to perform tasks on the bio while
submitting for I/O. Since btrfs requires the position
we are working on, pass pos to iomap_dio_submit_bio()
The correct place for submit_io() is not page_ops. Would it
better to rename the structure to something
From: Goldwyn Rodrigues
Better done in a separate patch to keep the main patch short(er)
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 463
1 file changed, 463 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index
From: Goldwyn Rodrigues
Set iomap->type to IOMAP_COW and fill up the source map in case
the I/O is not page aligned.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/iomap.c | 41 +
1 file changed, 41 insertions(+)
diff --git a/fs/btrfs/iomap.c b/fs/bt
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 otherwise.
Signed-off-by: Goldwyn Rodrigues
From: Goldwyn Rodrigues
btrfs_dio_data is unnecessary since we are now storing all
informaiton in btrfs_iomap.
Advantage: We don't abuse current->journal_info anymore :)
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 40
fs/btrfs/inod
On Mon, 2019-08-05 at 09:43 +1000, Dave Chinner wrote:
> On Fri, Aug 02, 2019 at 05:00:45PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > This helps filesystems to perform tasks on the bio while
> > submitting for I/O. Since btrfs requires the pos
On Fri, 2019-08-02 at 17:21 -0700, Darrick J. Wong wrote:
> On Fri, Aug 02, 2019 at 05:00:45PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > This helps filesystems to perform tasks on the bio while
> > submitting for I/O. Since btrfs requi
On 18:02 12/08, RITESH HARJANI wrote:
>
> 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()
> > w
On 10:13 05/08, Dave Chinner wrote:
> On Fri, Aug 02, 2019 at 05:00:40PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > Set iomap->type to IOMAP_COW and fill up the source map in case
> > the I/O is not page aligned.
> .
> > stat
On 10:11 05/08, Dave Chinner wrote:
> On Fri, Aug 02, 2019 at 05:00:39PM -0500, Goldwyn Rodrigues wrote:
> > From: Goldwyn Rodrigues
> >
> > Introduce a new btrfs_iomap structure which contains information
> > about the filesystem between the iomap_begin() and
From: Goldwyn Rodrigues
Introduces a new type IOMAP_COW, which means the data at offset
must be read from a srcmap and copied before performing the
write on the offset.
The srcmap is used to identify where the read is to be performed
from. This is passed to iomap->begin() of the respect
From: Goldwyn Rodrigues
In case of a IOMAP_COW, read a page from the srcmap before
performing a write on the page.
Signed-off-by: Goldwyn Rodrigues
Reviewed-by: Darrick J. Wong
---
fs/iomap/buffered-io.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
diff
From: Goldwyn Rodrigues
This one is a long patch. Most of the code is "inspired" by
fs/btrfs/file.c. To keep the size small, all removals are in
following patches.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/Kconfig | 1 +
fs/btrfs/Makefile | 2 +-
fs/btrfs/ctree.h | 1 +
From: Goldwyn Rodrigues
btrfs_iomap_init() is a function to be used to btrfs_iomap
structure which is used to pass information between iomap
begin() and end(). All data reservations and allocations must
be performed in this function. For reads, btrfs_iomap allocation
is not required.
We perform
This is an effort to use iomap for btrfs. This would keep most
responsibility of page handling during writes in iomap code, hence
code reduction. For CoW support, changes are needed in iomap code
to make sure we perform a copy before the write.
This is in line with the discussion we had during addi
From: Goldwyn Rodrigues
Update the inode size for dio writes during bio completion.
This ties the success of the underlying block layer
whether to increase the size of the inode. Especially for
in aio cases.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/inode.c | 6 +-
1 file changed, 5
From: Goldwyn Rodrigues
Better done in a separate patch to keep the main patch short(er)
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 463
1 file changed, 463 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index
From: Goldwyn Rodrigues
While most of the code works just eliminating page's private
field and related code, there is a problem when we are cloning.
The extent assumes the data is uptodate. Clear the EXTENT_UPTODATE
flag for the extent so the next time the file is read, it is
forced to be
From: Goldwyn Rodrigues
Since we will be using it in another part of the code, use a
better name to declare it non-static
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 7 +--
fs/btrfs/inode.c | 14 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a
From: Goldwyn Rodrigues
Set iomap->type to IOMAP_COW and fill up the source map in case
the I/O is not page aligned.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/iomap.c | 42 +-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/fs/bt
From: Goldwyn Rodrigues
To improve debugging abilities, especially invalid option
asserts.
Signed-off-by: Goldwyn Rodrigues
---
fs/Kconfig| 3 +++
include/linux/iomap.h | 11 +++
2 files changed, 14 insertions(+)
diff --git a/fs/Kconfig b/fs/Kconfig
index bfb1c6095c7a
From: Goldwyn Rodrigues
This helps filesystems to perform tasks on the bio while
submitting for I/O. Since btrfs requires the position
we are working on, pass pos to iomap_dio_submit_bio()
Signed-off-by: Goldwyn Rodrigues
---
fs/iomap/direct-io.c | 16 +++-
include/linux/iomap.h
From: Goldwyn Rodrigues
btrfs_dio_data is unnecessary since we are now storing all
informaiton in btrfs_iomap.
Advantage: We don't abuse current->journal_info anymore :)
---
fs/btrfs/file.c | 40
fs/btrfs/inod
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_buffered_read otherwise.
Changed parameter written in
From: Goldwyn Rodrigues
This makes btrfs_get_extent_map_write() independent of Direct
I/O code.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/inode.c | 40 +++-
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/fs
From: Goldwyn Rodrigues
Export generic_file_buffered_read() to be used to
supplement incomplete direct reads.
While we are at it, correct the comments and variable names.
Signed-off-by: Goldwyn Rodrigues
---
include/linux/fs.h | 2 ++
mm/filemap.c | 13 +++--
2 files changed
On 18:43 02/09, Christoph Hellwig wrote:
> On Sun, Sep 01, 2019 at 03:08:21PM -0500, Goldwyn Rodrigues wrote:
> > This is an effort to use iomap for btrfs. This would keep most
> > responsibility of page handling during writes in iomap code, hence
> > code reduction. For CoW
On 18:31 02/09, Christoph Hellwig wrote:
> On Sun, Sep 01, 2019 at 03:08:23PM -0500, Goldwyn Rodrigues wrote:
> > --- a/include/linux/iomap.h
> > +++ b/include/linux/iomap.h
> > @@ -37,6 +37,7 @@ struct vm_fault;
> > #define IOMAP_MAPPED 0x03/* blocks allocat
On 20:18 02/09, Darrick J. Wong wrote:
> On Mon, Sep 02, 2019 at 06:31:04PM +0200, Christoph Hellwig wrote:
> > On Sun, Sep 01, 2019 at 03:08:23PM -0500, Goldwyn Rodrigues wrote:
> > > --- a/include/linux/iomap.h
> > > +++ b/include/linux/iomap.h
> > &g
Previously called btrfs iomap.
This is an effort to use iomap for btrfs. This would keep most
responsibility of page handling during writes in iomap code, hence
code reduction. For CoW support, changes are needed in iomap code
to make sure we perform a copy before the write.
This is in line with t
From: Goldwyn Rodrigues
This one is a long patch. Most of the code is "inspired" by
fs/btrfs/file.c. To keep the size small, all removals are in
following patches.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/Kconfig | 1 +
fs/btrfs/Makefile | 2 +-
fs/btrfs/ctree.h | 1 +
From: Goldwyn Rodrigues
Set iomap->flags to IOMAP_F_COW and fill up the source map in case
the I/O is not page aligned.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/iomap.c | 42 +-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/fs/bt
From: Goldwyn Rodrigues
In case of a IOMAP_F_COW, read a page from the srcmap before
performing a write on the page.
Signed-off-by: Goldwyn Rodrigues
Reviewed-by: Darrick J. Wong
---
fs/iomap/buffered-io.c | 30 +-
include/linux/iomap.h | 3 +++
2 files changed
From: Goldwyn Rodrigues
A preparation patch for copy-on-write (CoW).
The srcmap is used to identify where the read is to be performed
from. This is passed to iomap->begin() of the respective
filesystem, which is supposed to put in the details for
reading before performing the copy for
1 - 100 of 398 matches
Mail list logo