From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/3] ext4: Convert to buffered_write_operations
Date: Tue, 30 Jan 2024 06:13:19 +0000 [thread overview]
Message-ID: <ZbiTfwyTXKC2XbNM@casper.infradead.org> (raw)
In-Reply-To: <20240130055414.2143959-4-willy@infradead.org>
On Tue, Jan 30, 2024 at 05:54:13AM +0000, Matthew Wilcox (Oracle) wrote:
> +++ b/fs/ext4/file.c
> @@ -287,16 +287,24 @@ static ssize_t ext4_buffered_write_iter(struct kiocb *iocb,
> {
> ssize_t ret;
> struct inode *inode = file_inode(iocb->ki_filp);
> + const struct buffered_write_operations *ops;
>
> if (iocb->ki_flags & IOCB_NOWAIT)
> return -EOPNOTSUPP;
>
> + if (ext4_inode_journal_mode(inode))
I forgot to commit --amend. This line should have been:
+ if (ext4_should_journal_data(inode))
> + ops = &ext4_journalled_bw_ops;
> + else if (test_opt(inode->i_sb, DELALLOC))
> + ops = &ext4_da_bw_ops;
> + else
> + ops = &ext4_bw_ops;
> +
> inode_lock(inode);
> ret = ext4_write_checks(iocb, from);
> if (ret <= 0)
> goto out;
>
> - ret = generic_perform_write(iocb, from);
> + ret = filemap_perform_write(iocb, from, ops);
>
> out:
> inode_unlock(inode);
next prev parent reply other threads:[~2024-01-30 6:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 5:54 [PATCH 0/3] Start moving write_begin/write_end out of aops Matthew Wilcox (Oracle)
2024-01-30 5:54 ` [PATCH 1/3] fs: Introduce buffered_write_operations Matthew Wilcox (Oracle)
2024-01-30 8:12 ` Christoph Hellwig
2024-02-01 4:36 ` Matthew Wilcox
2024-02-01 4:42 ` Christoph Hellwig
2024-02-02 19:54 ` Matthew Wilcox
2024-01-31 3:14 ` kernel test robot
2024-01-30 5:54 ` [PATCH 2/3] fs: Supply optional buffered_write_operations in buffer.c Matthew Wilcox (Oracle)
2024-01-30 5:54 ` [PATCH 3/3] ext4: Convert to buffered_write_operations Matthew Wilcox (Oracle)
2024-01-30 6:13 ` Matthew Wilcox [this message]
2024-01-30 8:13 ` Christoph Hellwig
2024-02-01 15:12 ` kernel test robot
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=ZbiTfwyTXKC2XbNM@casper.infradead.org \
--to=willy@infradead.org \
--cc=hch@lst.de \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.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).