[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2414055.1684738198@warthog.procyon.org.uk>
Date: Mon, 22 May 2023 07:49:58 +0100
From: David Howells <dhowells@...hat.com>
To: Joseph Qi <joseph.qi@...ux.alibaba.com>
Cc: dhowells@...hat.com, Jens Axboe <axboe@...nel.dk>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...nel.org>,
David Hildenbrand <david@...hat.com>,
Jason Gunthorpe <jgg@...dia.com>,
Logan Gunthorpe <logang@...tatee.com>,
Hillf Danton <hdanton@...a.com>,
Christian Brauner <brauner@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Christoph Hellwig <hch@....de>, Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>, ocfs2-devel@....oracle.com
Subject: Re: [PATCH v21 22/30] ocfs2: Provide a splice-read stub
So something like the attached changes? Any suggestions as to how to improve
the comments?
David
---
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index f7e00b5689d5..86add13b5f23 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2552,7 +2552,7 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb,
*
* Take and drop the meta data lock to update inode fields
* like i_size. This allows the checks down below
- * generic_file_read_iter() a chance of actually working.
+ * copy_splice_read() a chance of actually working.
*/
ret = ocfs2_inode_lock_atime(inode, filp->f_path.mnt, &lock_level,
!nowait);
@@ -2593,7 +2593,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos,
(unsigned long long)OCFS2_I(inode)->ip_blkno,
in->f_path.dentry->d_name.len,
in->f_path.dentry->d_name.name,
- 0);
+ flags);
/*
* We're fine letting folks race truncates and extending writes with
@@ -2601,10 +2601,10 @@ static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos,
* rw_lock during read.
*
* Take and drop the meta data lock to update inode fields like i_size.
- * This allows the checks down below generic_file_splice_read() a
- * chance of actually working.
+ * This allows the checks down below filemap_splice_read() a chance of
+ * actually working.
*/
- ret = ocfs2_inode_lock_atime(inode, in->f_path.mnt, &lock_level, true);
+ ret = ocfs2_inode_lock_atime(inode, in->f_path.mnt, &lock_level, 1);
if (ret < 0) {
if (ret != -EAGAIN)
mlog_errno(ret);
Powered by blists - more mailing lists