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.
>
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
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
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
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
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
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
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
On 15:03 08/10, David Sterba wrote:
> On Fri, Oct 05, 2018 at 07:26:15AM -0500, Goldwyn Rodrigues wrote:
> > Code cleanup.
>
> Have you check when and why the variable become unused? Thanks.
No, I did not check it earlier. git blame points to
312c89fbca06 ("btrfs: cleanup
Code cleanup.
Signed-off-by: Goldwyn Rodrigues
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index e7f702761cb7..f7b8b7a6b86a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1661,14 +1661,10 @@ static struct dentry *btrfs_mount(struct
file_system_type *fs_type, int flags
On 06-25 18:20, David Sterba wrote:
> On Mon, Jun 25, 2018 at 01:58:58PM +0900, Misono Tomohiro wrote:
> > So, this is the updated version of
> > https://patchwork.kernel.org/patch/10063039/
> >
> > This time xfstest is ok and
> > Reviewed-by: Misono Tomohiro
Yes, thats right.
>
> Your
From: Goldwyn Rodrigues
struct kiocb carries the ki_pos, so there is no need to pass it as
a separate function parameter.
generic_file_direct_write() increments ki_pos, so we now assign pos
after the function.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 15 ---
1 file
On 11/17/2017 12:45 PM, Nikolay Borisov wrote:
>
>
> On 17.11.2017 19:44, Goldwyn Rodrigues wrote:
>> This patch series attempts to use kernels iomap for btrfs. Currently,
>> it covers buffered writes only, but I intend to add some other iomap
>> uses once this
From: Goldwyn Rodrigues <rgold...@suse.com>
Preparatory patch. It reduces the arguments to __btrfs_buffered_write
to follow buffered_write() style.
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/btrfs/file.c | 24
1 file changed, 12 inser
From: Goldwyn Rodrigues <rgold...@suse.com>
This adds prepare_pages() to iomap in order to set page directives
for the page so as FS such as btrfs may perform post-write operations
after write completes.
Can we do away with this? EXTENT_PAGE_PRIVATE is only set and not used.
However, w
From: Goldwyn Rodrigues <rgold...@suse.com>
This adds prepare_pages() to iomap in order to set page directives
for the page so as FS such as btrfs may perform post-write operations
after write completes.
Can we do away with this? EXTENT_PAGE_PRIVATE is only set and not used.
However, w
From: Goldwyn Rodrigues <rgold...@suse.com>
In dirty_page(), we are clearing PageChecked, though I don't see it set.
Is this used for compression only?
Can we call __set_page_dirty_nobuffers instead?
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/btrfs/file.c | 8
From: Goldwyn Rodrigues <rgold...@suse.com>
IOMAP_F_NOBH tells iomap functions not to use or attach buffer heads
to the page. Page flush and writeback is the responsibility of the
filesystem (such as btrfs) code, which use bio to perform it.
Signed-off-by: Goldwyn Rodrigues <rgold...
From: Goldwyn Rodrigues <rgold...@suse.com>
This eliminates all page related code.
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/btrfs/btrfs_inode.h | 4 +-
fs/btrfs/file.c| 488 ++---
2 files changed, 185 insert
From: Goldwyn Rodrigues <rgold...@suse.com>
We cannot perform a readpage in iomap_apply after
iomap_begin() because we have our extents locked. So,
we perform a readpage and make sure we unlock it, but
increase the page count.
Question: How do we deal with -EAGAIN retur
From: Goldwyn Rodrigues <rgold...@suse.com>
In dirty_page(), we are clearing PageChecked, though I don't see it set.
Is this used for compression only?
Can we call __set_page_dirty_nobuffers instead?
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/btrfs/file.c | 8
From: Goldwyn Rodrigues <rgold...@suse.com>
Preparatory patch. btrfs_iomap structure carries extent/page
state from iomap_begin() to iomap_end().
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/btrfs/file.c | 68 ++
From: Goldwyn Rodrigues <rgold...@suse.com>
This splits the generic_write_end() into functions which handle
block_write_end() and iomap_extend_page().
iomap_extend_page() performs the functions of increasing
i_size (if required) and extending pagecache.
Performed this split so we don
This patch series attempts to use kernels iomap for btrfs. Currently,
it covers buffered writes only, but I intend to add some other iomap
uses once this gets through. I am sending this as an RFC because I
would like to find ways to improve the solution since some changes
require adding more
On 10/30/2017 09:01 AM, Nikolay Borisov wrote:
>
>
> On 30.10.2017 15:55, David Sterba wrote:
>> On Mon, Oct 30, 2017 at 03:21:51PM +0200, Nikolay Borisov wrote:
>>>
>>>
>>> On 27.10.2017 07:17, Liu Bo wrote:
>>>> On Tue, Oct
EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
it being cross checked anytime. What is the purpose of setting it?
--
Goldwyn
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo
From: Goldwyn Rodrigues <rgold...@suse.com>
Code cleanup for better understanding:
Variable needs_unlock to be called extent_locked to show state as opposed to
action. Changed the type to int, to reduce code in the critical
path.
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
From: Goldwyn Rodrigues <rgold...@suse.com>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/btrfs/ctree.h | 2 +-
fs/btrfs/file.c | 2 +-
fs/btrfs/inode.c | 9 -
fs/btrfs/relocation.c| 2 +-
fs/btrfs/tests/inode-
From: Goldwyn Rodrigues <rgold...@suse.com>
Code cleanup for better understanding:
needs_unlock to be called extent_locked to show state as opposed to
action.
Changed the variable to int, to reduce code in the critical path(code usually
executed).
Signed-off-by: Goldwyn Rodrigues
On 07/04/2017 05:16 PM, Jens Axboe wrote:
>
> Please expedite getting this upstream, asap.
>
Jens,
I have posted an updated patch [1] and it is acked by David. Would you
pick it up or should it go through the btrfs tree (or some other tree)?
[1] https://patchwork.kernel.org/patch/9825813/
From: Goldwyn Rodrigues <rgold...@suse.com>
Assigning pos for usage early messes up in append mode, where
the pos is re-assigned in generic_write_checks(). Assign
pos later to get the correct position to write from iocb->ki_pos.
Since check_can_nocow also uses the value of pos,
From: Goldwyn Rodrigues <rgold...@suse.com>
Assigning pos for usage early messes up in append mode, where
the pos is re-assigned in generic_write_checks(). Re-assign
pos to get the correct position to write from iocb->ki_pos.
Fixes: edf064e7c6fe ("btrfs: nowait aio suppor
On 07/04/2017 02:45 AM, Markus Trippelsdorf wrote:
> On 2017.07.04 at 06:23 +0200, Markus Trippelsdorf wrote:
>> commit edf064e7c6fec3646b06c944a8e35d1a3de5c2c3 (HEAD, refs/bisect/bad)
>> Author: Goldwyn Rodrigues <rgold...@suse.com>
>> Date: Tue Jun 20 07:05:49
On 06/10/2017 12:34 AM, Al Viro wrote:
> On Thu, Jun 08, 2017 at 12:39:10AM -0700, Christoph Hellwig wrote:
>> As already indicated this whole series looks fine to me.
>>
>> Al: are you going to pick this up? Or Andrew?
>
> The main issue here is "let's bail out from ->write_iter() instances"
From: Goldwyn Rodrigues <rgold...@suse.com>
filemap_range_has_page() return true if the file's mapping has
a page within the range mentioned. This function will be used
to check if a write() call will cause a writeback of previous
writes.
Reviewed-by: Christoph Hellwig <h...@lst.de&
From: Goldwyn Rodrigues <rgold...@suse.com>
aio_rw_flags is introduced in struct iocb (using aio_reserved1) which will
carry the RWF_* flags. We cannot use aio_flags because they are not
checked for validity which may break existing applications.
Note, the only place RWF_HIPRI comes in
From: Goldwyn Rodrigues <rgold...@suse.com>
Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.
Return -EINVAL for buffered AIO: there are multiple causes of
delay such as page locks, dirty throttling logic, page loading
from disk etc. which cannot be take
From: Goldwyn Rodrigues <rgold...@suse.com>
RWF_NOWAIT informs kernel to bail out if an AIO request will block
for reasons such as file allocations, or a writeback triggered,
or would block while allocating requests while performing
direct I/O.
RWF_NOWAIT is translated to IOCB_NOWAIT fo
From: Goldwyn Rodrigues <rgold...@suse.com>
A new bio operation flag REQ_NOWAIT is introduced to identify bio's
orignating from iocb with IOCB_NOWAIT. This flag indicates
to return immediately if a request cannot be made instead
of retrying.
Stacked devices such as md (th
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail
+ i_rwsem is not lockable
+ NODATACOW or PREALLOC is not set
+ Cannot nocow at the desired location
+ Writing beyond end of file which is not allocated
Acked-by: David Sterba <dste...
From: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Jan Kara <j...@suse.cz>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/read_write.c| 12 +++-
include/linux/fs.h | 14 ++
2 file
From: Goldwyn Rodrigues <rgold...@suse.com>
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Jan Kara <j...@suse.cz>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse
From: Goldwyn Rodrigues <rgold...@suse.com>
If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.
IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail for direct I/O:
+ i_rwsem is lockable
+ Writing beyond end of file (will trigger allocation)
+ Blocks are not allocated at the write location
Signed-off-by: Goldwyn Rodrigues <rgold...
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
- Block allocation for files
- Data writebacks for direct I/O
- Sleeping because of waiting to acquire i_rwsem
- Congested block device
The goal of the patch series is to
deadlock.
>
> Now for space cache inode, we will not allow qgroup retry, so it will
> not cause deadlock.
>
> Fixes: 48a89bc4f2ce ("btrfs: qgroups: Retry after commit on getting EDQUOT")
> Cc: Goldwyn Rodrigues <rgold...@suse.de>
> Signed-off-by: Qu Wenruo <quwe
From: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Jan Kara <j...@suse.cz>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
fs/read_write.c| 12 +++-
include/linux/fs.h | 14 ++
2 file
From: Goldwyn Rodrigues <rgold...@suse.com>
filemap_range_has_page() return true if the file's mapping has
a page within the range mentioned. This function will be used
to check if a write() call will cause a writeback of previous
writes.
Reviewed-by: Christoph Hellwig <h...@lst.de&
From: Goldwyn Rodrigues <rgold...@suse.com>
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Jan Kara <j...@suse.cz>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse
From: Goldwyn Rodrigues <rgold...@suse.com>
If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.
IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail for direct I/O:
+ i_rwsem is lockable
+ Writing beyond end of file (will trigger allocation)
+ Blocks are not allocated at the write location
Signed-off-by: Goldwyn Rodrigues <rgold...
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail
+ i_rwsem is not lockable
+ NODATACOW or PREALLOC is not set
+ Cannot nocow at the desired location
+ Writing beyond end of file which is not allocated
Acked-by: David Sterba <dste...
From: Goldwyn Rodrigues <rgold...@suse.com>
aio_rw_flags is introduced in struct iocb (using aio_reserved1) which will
carry the RWF_* flags. We cannot use aio_flags because they are not
checked for validity which may break existing applications.
Note, the only place RWF_HIPRI comes in
From: Goldwyn Rodrigues <rgold...@suse.com>
Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.
Return -EINVAL for buffered AIO: there are multiple causes of
delay such as page locks, dirty throttling logic, page loading
from disk etc. which cannot be take
From: Goldwyn Rodrigues <rgold...@suse.com>
RWF_NOWAIT informs kernel to bail out if an AIO request will block
for reasons such as file allocations, or a writeback triggered,
or would block while allocating requests while performing
direct I/O.
RWF_NOWAIT is translated to IOCB_NOWAIT fo
From: Goldwyn Rodrigues <rgold...@suse.com>
A new bio operation flag REQ_NOWAIT is introduced to identify bio's
orignating from iocb with IOCB_NOWAIT. This flag indicates
to return immediately if a request cannot be made instead
of retrying.
Stacked devices such as md (th
Formerly known as non-blocking AIO.
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
- Block allocation for files
- Data writebacks for direct I/O
- Sleeping because of waiting to acquire i_rwsem
- Congested block
On 05/29/2017 03:33 AM, Christoph Hellwig wrote:
> On Sun, May 28, 2017 at 09:38:26PM -0500, Goldwyn Rodrigues wrote:
>>
>>
>> On 05/28/2017 04:31 AM, Christoph Hellwig wrote:
>>> Despite my previous reviewed-by tag this will need another fix:
>>>
>>
On 05/28/2017 04:27 AM, Christoph Hellwig wrote:
>> Changes since v8:
>> + Err out AIO reads with -EINVAL flagged as RWF_NOWAIT
>
> Ugg, why? Reads aren't really treated any different than writes in
> the direct I/O code.
This effort focused on writes only.
>From the point of view of the
On 05/28/2017 04:31 AM, Christoph Hellwig wrote:
> Despite my previous reviewed-by tag this will need another fix:
>
> xfs_file_iomap_begin needs to return EAGAIN if we don't have the extent
> list in memoery already. E.g. something like this:
>
> if ((flags & IOMAP_NOWAIT) &&
From: Goldwyn Rodrigues <rgold...@suse.com>
aio_rw_flags is introduced in struct iocb (using aio_reserved1) which will
carry the RWF_* flags. We cannot use aio_flags because they are not
checked for validity which may break existing applications.
Note, the only place RWF_HIPRI comes in
From: Goldwyn Rodrigues <rgold...@suse.com>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
fs/read_write.c| 12 +++-
include/linux/fs.h | 14 ++
2 files changed, 17 insertions(+), 9 deletions(-
From: Goldwyn Rodrigues <rgold...@suse.com>
Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.
Return -EINVAL for buffered AIO: there are multiple causes of
delay such as page locks, dirty throttling logic, page loading
from disk etc. which cannot be take
From: Goldwyn Rodrigues <rgold...@suse.com>
A new bio operation flag REQ_NOWAIT is introduced to identify bio's
orignating from iocb with IOCB_NOWAIT. This flag indicates
to return immediately if a request cannot be made instead
of retrying.
Stacked devices such as md (th
From: Goldwyn Rodrigues <rgold...@suse.com>
If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.
IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail for direct I/O:
+ i_rwsem is lockable
+ Writing beyond end of file (will trigger allocation)
+ Blocks are not allocated at the write location
Signed-off-by: Goldwyn Rodrigues <rgold...
From: Goldwyn Rodrigues <rgold...@suse.com>
RWF_NOWAIT informs kernel to bail out if an AIO request will block
for reasons such as file allocations, or a writeback triggered,
or would block while allocating requests while performing
direct I/O.
RWF_NOWAIT is translated to IOCB_NOWAIT fo
From: Goldwyn Rodrigues <rgold...@suse.com>
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
fs/iomap.c| 2 ++
include/linu
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail
+ i_rwsem is not lockable
+ NODATACOW or PREALLOC is not set
+ Cannot nocow at the desired location
+ Writing beyond end of file which is not allocated
Signed-off-by: Goldwyn Rodrigues
From: Goldwyn Rodrigues <rgold...@suse.com>
filemap_range_has_page() return true if the file's mapping has
a page within the range mentioned. This function will be used
to check if a write() call will cause a writeback of previous
writes.
Signed-off-by: Goldwyn Rodrigues <rgold...
Formerly known as non-blocking AIO.
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
- Block allocation for files
- Data writebacks for direct I/O
- Sleeping because of waiting to acquire i_rwsem
- Congested block
From: Goldwyn Rodrigues <rgold...@suse.com>
RWF_NOWAIT informs kernel to bail out if an AIO request will block
for reasons such as file allocations, or a writeback triggered,
or would block while allocating requests while performing
direct I/O.
RWF_NOWAIT is translated to IOCB_NOWAIT fo
From: Goldwyn Rodrigues <rgold...@suse.com>
Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.
Return -EINVAL for buffered AIO: there are multiple causes of
delay such as page locks, dirty throttling logic, page loading
from disk etc. which cannot be take
From: Goldwyn Rodrigues <rgold...@suse.com>
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
fs/iomap.c| 2 ++
include/linu
From: Goldwyn Rodrigues <rgold...@suse.com>
If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.
IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail for direct I/O:
+ i_rwsem is lockable
+ Writing beyond end of file (will trigger allocation)
+ Blocks are not allocated at the write location
Signed-off-by: Goldwyn Rodrigues <rgold...
From: Goldwyn Rodrigues <rgold...@suse.com>
A new bio operation flag REQ_NOWAIT is introduced to identify bio's
orignating from iocb with IOCB_NOWAIT. This flag indicates
to return immediately if a request cannot be made instead
of retrying.
Stacked devices such as md (th
From: Goldwyn Rodrigues <rgold...@suse.com>
filemap_range_has_page() return true if the file's mapping has
a page within the range mentioned. This function will be used
to check if a write() call will cause a writeback of previous
writes.
Signed-off-by: Goldwyn Rodrigues <rgold...
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail
+ i_rwsem is not lockable
+ NODATACOW or PREALLOC is not set
+ Cannot nocow at the desired location
+ Writing beyond end of file which is not allocated
Signed-off-by: Goldwyn Rodrigues
From: Goldwyn Rodrigues <rgold...@suse.com>
aio_rw_flags is introduced in struct iocb (using aio_reserved1) which will
carry the RWF_* flags. We cannot use aio_flags because they are not
checked for validity which may break existing applications.
Note, the only place RWF_HIPRI comes in
Formerly known as non-blocking AIO.
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
- Block allocation for files
- Data writebacks for direct I/O
- Sleeping because of waiting to acquire i_rwsem
- Congested block
From: Goldwyn Rodrigues <rgold...@suse.com>
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
fs/read_write.c| 12 +++-
include/linux/fs.h | 14 ++
2 files changed, 17 insertions(+), 9 deletions(-
On 05/11/2017 02:44 AM, Christoph Hellwig wrote:
> Looks fine,
>
> Reviewed-by: Christoph Hellwig
>
> Although lifting the make_request limit is something a lot of users
> would appreciate in the near future..
>
Yes, I understand. That will be on my todo list next on priority.
Here is a sample script to recreate the issue:
mkfs.btrfs -f /dev/vdb
mount /dev/vdb /mnt
btrfs quota enable /mnt
btrfs sub create /mnt/tmp
btrfs qgroup limit 200M /mnt/tmp
btrfs quota rescan -w /mnt
cd /mnt/tmp
for i in {1..5}; do
sync
dd if=/dev/zero of=/mnt/tmp/file-$i
On 05/09/2017 09:36 PM, Qu Wenruo wrote:
> Introduce a new parameter, struct extent_changeset for
> btrfs_qgroup_reserved_data() and its callers.
>
> Such extent_changeset was used in btrfs_qgroup_reserve_data() to record
> which range it reserved in current reserve, so it can free it at error
Formerly known as non-blocking AIO.
This series adds nonblocking feature to asynchronous I/O writes.
io_submit() can be delayed because of a number of reason:
- Block allocation for files
- Data writebacks for direct I/O
- Sleeping because of waiting to acquire i_rwsem
- Congested block
From: Goldwyn Rodrigues <rgold...@suse.com>
Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.
This introduces a new function filemap_range_has_page() which
returns true if the file's mapping has a page within the range
mentioned.
Return -EINVAL for buffer
From: Goldwyn Rodrigues <rgold...@suse.com>
This flag informs kernel to bail out if an AIO request will block
for reasons such as file allocations, or a writeback triggered,
or would block while allocating requests while performing
direct I/O.
Unfortunately, aio_flags is not checked for va
From: Goldwyn Rodrigues <rgold...@suse.com>
If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.
IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail
+ i_rwsem is not lockable
+ NODATACOW or PREALLOC is not set
+ Cannot nocow at the desired location
+ Writing beyond end of file which is not allocated
Signed-off-by: Goldwyn Rodrigues
From: Goldwyn Rodrigues <rgold...@suse.com>
A new bio operation flag REQ_NOWAIT is introduced to identify bio's
orignating from iocb with IOCB_NOWAIT. This flag indicates
to return immediately if a request cannot be made instead
of retrying.
Stacked devices such as md (th
From: Goldwyn Rodrigues <rgold...@suse.com>
Return EAGAIN if any of the following checks fail for direct I/O:
+ i_rwsem is lockable
+ Writing beyond end of file (will trigger allocation)
+ Blocks are not allocated at the write location
Signed-off-by: Goldwyn Rodrigues <rgold...
From: Goldwyn Rodrigues <rgold...@suse.com>
RWF_* flags is used for preadv2/pwritev2 calls. Port to use
it for aio operations as well. For this, aio_rw_flags is
introduced in struct iocb (using aio_reserved1) which will
carry these flags.
This is a precursor to the nowait AIO calls.
From: Goldwyn Rodrigues <rgold...@suse.com>
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
fs/iomap.c| 2 ++
include/linu
On 04/19/2017 01:45 AM, Christoph Hellwig wrote:
> On Fri, Apr 14, 2017 at 07:02:54AM -0500, Goldwyn Rodrigues wrote:
>> From: Goldwyn Rodrigues <rgold...@suse.com>
>>
>
>> +/* Request queue supports BIO_NOWAIT */
>> +queue_flag_set_unlocked(QU
1 - 100 of 245 matches
Mail list logo