OCFS2-Devel Archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
To: David Howells <dhowells@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Hillf Danton <hdanton@sina.com>,
	Jan Kara <jack@suse.cz>, David Hildenbrand <david@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jeff Layton <jlayton@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org, Al Viro <viro@zeniv.linux.org.uk>,
	Jason Gunthorpe <jgg@nvidia.com>,
	linux-fsdevel@vger.kernel.org,
	Logan Gunthorpe <logang@deltatee.com>,
	ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] [PATCH v21 22/30] ocfs2: Provide a splice-read	stub
Date: Mon, 22 May 2023 14:54:53 +0800	[thread overview]
Message-ID: <9059d4e5-3813-b84c-b0d6-ecfd9a1c5570@linux.alibaba.com> (raw)
In-Reply-To: <2414055.1684738198@warthog.procyon.org.uk>



On 5/22/23 2:49 PM, David Howells wrote:
> So something like the attached changes?  Any suggestions as to how to improve
> the comments?
> 

Looks fine to me now. Thanks.

Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>

> 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);

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

      reply	other threads:[~2023-05-22  6:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230520000049.2226926-1-dhowells@redhat.com>
2023-05-20  0:00 ` [Ocfs2-devel] [PATCH v21 22/30] ocfs2: Provide a splice-read stub David Howells via Ocfs2-devel
2023-05-22  2:49   ` Joseph Qi via Ocfs2-devel
2023-05-22  6:28   ` David Howells via Ocfs2-devel
2023-05-22  6:34     ` Joseph Qi via Ocfs2-devel
2023-05-22  6:49   ` David Howells via Ocfs2-devel
2023-05-22  6:54     ` Joseph Qi via Ocfs2-devel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9059d4e5-3813-b84c-b0d6-ecfd9a1c5570@linux.alibaba.com \
    --to=ocfs2-devel@oss.oracle.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=david@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=hdanton@sina.com \
    --cc=jack@suse.cz \
    --cc=jgg@nvidia.com \
    --cc=jlayton@kernel.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).