linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hao Xu <hao.xu@linux.dev>
To: Dave Chinner <david@fromorbit.com>
Cc: io-uring@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Christian Brauner <brauner@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Stefan Roesch <shr@fb.com>, Clay Harris <bugs@claycon.org>,
	"Darrick J . Wong" <djwong@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-ext4@vger.kernel.org, Wanpeng Li <wanpengli@tencent.com>
Subject: Re: [PATCH 1/7] iomap: merge iomap_seek_hole() and iomap_seek_data()
Date: Thu, 27 Jul 2023 20:10:47 +0800	[thread overview]
Message-ID: <304a5afb-e962-5f60-76a3-f3d079403196@linux.dev> (raw)
In-Reply-To: <ZMGVM/BdgsjMSsIF@dread.disaster.area>

On 7/27/23 05:50, Dave Chinner wrote:
> On Wed, Jul 26, 2023 at 06:25:57PM +0800, Hao Xu wrote:
>> From: Hao Xu <howeyxu@tencent.com>
>>
>> The two functions share almost same code, merge them together.
>> No functional change in this patch.
> 
> No, please don't. seek data and seek hole have subtly different
> semantics and return values, and we've explicitly kept them separate
> because it's much easier to maintain them as separate functions with
> separate semantics than combine them into a single function with
> lots of non-obvious conditional behaviour.
> 
> The fact that the new iomap_seek() API requires a boolean "SEEK_DATA
> or SEEK_HOLE" field to indicate that the caller wants makes it clear
> that this isn't actually an improvement over explicit
> iomap_seek_data() and iomap_seek_hole() API calls.
> 
> -Dave.

I'll revert it back in next version. Thanks.

  reply	other threads:[~2023-07-27 12:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 10:25 [RFC 0/7] io_uring lseek Hao Xu
2023-07-26 10:25 ` [PATCH 1/7] iomap: merge iomap_seek_hole() and iomap_seek_data() Hao Xu
2023-07-26 21:50   ` Dave Chinner
2023-07-27 12:10     ` Hao Xu [this message]
2023-07-26 10:25 ` [PATCH 2/7] xfs: add nowait support for xfs_seek_iomap_begin() Hao Xu
2023-07-26 21:55   ` Dave Chinner
2023-07-26 22:14     ` Darrick J. Wong
2023-07-27 12:17       ` Hao Xu
2023-07-26 10:25 ` [PATCH 3/7] add nowait parameter for iomap_seek() Hao Xu
2023-07-26 22:01   ` Dave Chinner
2023-07-26 10:26 ` [PATCH 4/7] add llseek_nowait() for struct file_operations Hao Xu
2023-07-27 13:25   ` Matthew Wilcox
2023-07-26 10:26 ` [PATCH 5/7] add llseek_nowait support for xfs Hao Xu
2023-07-26 22:14   ` Dave Chinner
2023-07-27 12:26     ` Hao Xu
2023-07-26 10:26 ` [PATCH 6/7] add vfs_lseek_nowait() Hao Xu
2023-07-26 10:26 ` [PATCH 7/7] add lseek for io_uring Hao Xu
2023-07-26 13:22 ` [RFC 0/7] io_uring lseek Christian Brauner
2023-07-27 12:30 ` Hao Xu

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=304a5afb-e962-5f60-76a3-f3d079403196@linux.dev \
    --to=hao.xu@linux.dev \
    --cc=asmadeus@codewreck.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=bugs@claycon.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=shr@fb.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wanpengli@tencent.com \
    /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 NNTP newsgroup(s).