diff mbox series

[10/12] btrfs: flag files as supporting buffered async reads

Message ID 20200526195123.29053-11-axboe@kernel.dk (mailing list archive)
State New, archived
Headers show
Series Add support for async buffered reads | expand

Commit Message

Jens Axboe May 26, 2020, 7:51 p.m. UTC
btrfs uses generic_file_read_iter(), which already supports this.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 fs/btrfs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Mason May 26, 2020, 7:57 p.m. UTC | #1
On 26 May 2020, at 15:51, Jens Axboe wrote:

> btrfs uses generic_file_read_iter(), which already supports this.
>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>

Really looking forward to this!

Acked-by: Chris Mason <clm@fb.com>
diff mbox series

Patch

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 719e68ab552c..c933b6a1b4a8 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -3480,7 +3480,7 @@  static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int whence)
 
 static int btrfs_file_open(struct inode *inode, struct file *filp)
 {
-	filp->f_mode |= FMODE_NOWAIT;
+	filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
 	return generic_file_open(inode, filp);
 }