From: Chen Taotao <chentao325@qq.com>
To: Christian Brauner <brauner@kernel.org>,
Matthew Wilcox <willy@infradead.org>
Cc: "陈涛涛 Taotao Chen" <chentaotao@didiglobal.com>,
"tytso@mit.edu" <tytso@mit.edu>,
"hch@infradead.org" <hch@infradead.org>,
"adilger.kernel@dilger.ca" <adilger.kernel@dilger.ca>,
"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>,
"tursulin@ursulin.net" <tursulin@ursulin.net>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/5] fs: change write_begin/write_end interface to take struct kiocb *
Date: Fri, 27 Jun 2025 10:40:41 +0800 [thread overview]
Message-ID: <tencent_5B902C24516F8FB647C156B41596BF68E70A@qq.com> (raw)
In-Reply-To: <20250625-erstklassig-stilvoll-273282f0dd1b@brauner>
在 2025/6/25 16:04, Christian Brauner 写道:
> On Tue, Jun 24, 2025 at 01:51:51PM +0100, Matthew Wilcox wrote:
>> On Tue, Jun 24, 2025 at 12:12:08PM +0000, 陈涛涛 Taotao Chen wrote:
>>> -static int blkdev_write_end(struct file *file, struct address_space *mapping,
>>> +static int blkdev_write_end(struct kiocb *iocb, struct address_space *mapping,
>>> loff_t pos, unsigned len, unsigned copied, struct folio *folio,
>>> void *fsdata)
>>> {
>>> int ret;
>>> - ret = block_write_end(file, mapping, pos, len, copied, folio, fsdata);
>>> + ret = block_write_end(iocb->ki_filp, mapping, pos, len, copied, folio, fsdata);
>> ... huh. I thought block_write_end() had to have the same prototype as
>> ->write_end because it was used by some filesystems as the ->write_end.
>> I see that's not true (any more?). Maybe I was confused with
>> generic_write_end(). Anyway, block_write_end() doesn't use it's file
>> argument, and never will, so we can just remove it.
>>
>>> +++ b/include/linux/fs.h
>>> @@ -446,10 +446,10 @@ struct address_space_operations {
>>>
>>> void (*readahead)(struct readahead_control *);
>>>
>>> - int (*write_begin)(struct file *, struct address_space *mapping,
>>> + int (*write_begin)(struct kiocb *, struct address_space *mapping,
>>> loff_t pos, unsigned len,
>>> struct folio **foliop, void **fsdata);
>>> - int (*write_end)(struct file *, struct address_space *mapping,
>>> + int (*write_end)(struct kiocb *, struct address_space *mapping,
>>> loff_t pos, unsigned len, unsigned copied,
>>> struct folio *folio, void *fsdata);
>> Should we make this a 'const struct kiocb *'? I don't see a need for
>> filesystems to be allowed to modify the kiocb in future, but perhaps
>> other people have different opinions.
> Given I picked up Willy's change I'll wait for a resubmit of this series
> on top of vfs-6.17.misc unless I hear otherwise?
Sure, I’ll update the series on top of vfs-6.17.misc and resend it as
soon as possible.
Best regards,
Taotao Chen
next prev parent reply other threads:[~2025-06-27 2:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 12:11 [PATCH v2 0/5] fs: refactor write_begin/write_end and add ext4 IOCB_DONTCACHE support 陈涛涛 Taotao Chen
2025-06-24 12:12 ` [PATCH v2 1/5] drm/i915: Use kernel_write() in shmem object create 陈涛涛 Taotao Chen
2025-06-24 12:23 ` Matthew Wilcox
2025-06-25 10:41 ` Chentaotao
2025-06-24 12:12 ` [PATCH v2 2/5] drm/i915: Refactor shmem_pwrite() to use kiocb and write_iter 陈涛涛 Taotao Chen
2025-06-24 12:12 ` [PATCH v2 3/5] fs: change write_begin/write_end interface to take struct kiocb * 陈涛涛 Taotao Chen
2025-06-24 12:51 ` Matthew Wilcox
2025-06-25 8:04 ` Christian Brauner
2025-06-27 2:40 ` Chen Taotao [this message]
2025-06-24 12:12 ` [PATCH v2 4/5] ext4: handle IOCB_DONTCACHE in buffered write path 陈涛涛 Taotao Chen
2025-06-25 14:35 ` Theodore Ts'o
2025-06-24 12:12 ` [PATCH v2 5/5] ext4: declare support for FOP_DONTCACHE 陈涛涛 Taotao Chen
2025-06-24 12:53 ` Matthew Wilcox
2025-06-25 10:46 ` Chen Taotao
2025-06-25 14:36 ` Theodore Ts'o
2025-06-24 12:54 ` [PATCH v2 0/5] fs: refactor write_begin/write_end and add ext4 IOCB_DONTCACHE support Matthew Wilcox
2025-06-25 6:56 ` hch
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=tencent_5B902C24516F8FB647C156B41596BF68E70A@qq.com \
--to=chentao325@qq.com \
--cc=adilger.kernel@dilger.ca \
--cc=airlied@gmail.com \
--cc=brauner@kernel.org \
--cc=chentaotao@didiglobal.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@infradead.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rodrigo.vivi@intel.com \
--cc=tursulin@ursulin.net \
--cc=tytso@mit.edu \
--cc=willy@infradead.org \
/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).