From: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Ted Tso <tytso@mit.edu>,
linux-ext4@vger.kernel.org, Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v4 09/13] jbd2: Switch jbd2_submit_inode_data() to use fs-provided hook for data writeout
Date: Thu, 8 Dec 2022 20:58:11 +0530 [thread overview]
Message-ID: <20221208152811.ftcepqs5x54nqtzo@riteshh-domain> (raw)
In-Reply-To: <20221207112722.22220-9-jack@suse.cz>
On 22/12/07 12:27PM, Jan Kara wrote:
> jbd2_submit_inode_data() hardcoded use of
> jbd2_journal_submit_inode_data_buffers() for submission of data pages.
> Make it use j_submit_inode_data_buffers hook instead. This effectively
> switches ext4 fastcommits to use ext4_writepages() for data writeout
> instead of generic_writepages().
Very neat!! I agree, that jbd2_submit_inode_data() should have always used
journal->j_submit_inode_data_buffers().
Looks good to me. Please feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> fs/ext4/fast_commit.c | 2 +-
> fs/jbd2/commit.c | 5 ++---
> include/linux/jbd2.h | 2 +-
> 3 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
> index 0f6d0a80467d..7c6694593497 100644
> --- a/fs/ext4/fast_commit.c
> +++ b/fs/ext4/fast_commit.c
> @@ -986,7 +986,7 @@ static int ext4_fc_submit_inode_data_all(journal_t *journal)
> finish_wait(&ei->i_fc_wait, &wait);
> }
> spin_unlock(&sbi->s_fc_lock);
> - ret = jbd2_submit_inode_data(ei->jinode);
> + ret = jbd2_submit_inode_data(journal, ei->jinode);
> if (ret)
> return ret;
> spin_lock(&sbi->s_fc_lock);
> diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
> index 885a7a6cc53e..4810438b7856 100644
> --- a/fs/jbd2/commit.c
> +++ b/fs/jbd2/commit.c
> @@ -207,14 +207,13 @@ int jbd2_journal_submit_inode_data_buffers(struct jbd2_inode *jinode)
> }
>
> /* Send all the data buffers related to an inode */
> -int jbd2_submit_inode_data(struct jbd2_inode *jinode)
> +int jbd2_submit_inode_data(journal_t *journal, struct jbd2_inode *jinode)
> {
> -
> if (!jinode || !(jinode->i_flags & JI_WRITE_DATA))
> return 0;
>
> trace_jbd2_submit_inode_data(jinode->i_vfs_inode);
> - return jbd2_journal_submit_inode_data_buffers(jinode);
> + return journal->j_submit_inode_data_buffers(jinode);
>
> }
> EXPORT_SYMBOL(jbd2_submit_inode_data);
> diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
> index 0b7242370b56..2170e0cc279d 100644
> --- a/include/linux/jbd2.h
> +++ b/include/linux/jbd2.h
> @@ -1662,7 +1662,7 @@ int jbd2_fc_begin_commit(journal_t *journal, tid_t tid);
> int jbd2_fc_end_commit(journal_t *journal);
> int jbd2_fc_end_commit_fallback(journal_t *journal);
> int jbd2_fc_get_buf(journal_t *journal, struct buffer_head **bh_out);
> -int jbd2_submit_inode_data(struct jbd2_inode *jinode);
> +int jbd2_submit_inode_data(journal_t *journal, struct jbd2_inode *jinode);
> int jbd2_wait_inode_data(journal_t *journal, struct jbd2_inode *jinode);
> int jbd2_fc_wait_bufs(journal_t *journal, int num_blks);
> int jbd2_fc_release_bufs(journal_t *journal);
> --
> 2.35.3
>
next prev parent reply other threads:[~2022-12-08 15:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 11:27 [PATCH v4 0/13] ext4: Stop using ext4_writepage() for writeout of ordered data Jan Kara
2022-12-07 11:27 ` [PATCH v4 01/13] ext4: Handle redirtying in ext4_bio_write_page() Jan Kara
2022-12-07 11:27 ` [PATCH v4 02/13] ext4: Move keep_towrite handling to ext4_bio_write_page() Jan Kara
2022-12-07 11:27 ` [PATCH v4 03/13] ext4: Remove nr_submitted from ext4_bio_write_page() Jan Kara
2022-12-07 11:27 ` [PATCH v4 04/13] ext4: Drop pointless IO submission " Jan Kara
2022-12-07 11:27 ` [PATCH v4 05/13] ext4: Add support for writepages calls that cannot map blocks Jan Kara
2022-12-07 11:27 ` [PATCH v4 06/13] ext4: Provide ext4_do_writepages() Jan Kara
2022-12-07 11:27 ` [PATCH v4 07/13] ext4: Move percpu_rwsem protection into ext4_writepages() Jan Kara
2022-12-07 11:27 ` [PATCH v4 08/13] ext4: Switch to using ext4_do_writepages() for ordered data writeout Jan Kara
2022-12-07 11:27 ` [PATCH v4 09/13] jbd2: Switch jbd2_submit_inode_data() to use fs-provided hook for " Jan Kara
2022-12-08 15:28 ` Ritesh Harjani (IBM) [this message]
2022-12-07 11:27 ` [PATCH v4 10/13] ext4: Switch to using write_cache_pages() for data=journal writeout Jan Kara
2022-12-08 15:40 ` Ritesh Harjani (IBM)
2022-12-08 16:33 ` Jan Kara
2022-12-07 11:27 ` [PATCH v4 11/13] mm: Export buffer_migrate_folio_norefs() Jan Kara
2022-12-07 11:59 ` Christoph Hellwig
2022-12-07 11:27 ` [PATCH v4 12/13] ext4: Stop providing .writepage hook Jan Kara
2023-05-08 17:51 ` youling257
2023-05-09 0:25 ` Jan Kara
2023-05-09 5:02 ` Eric Biggers
2023-05-09 18:36 ` Theodore Ts'o
2023-05-10 5:17 ` youling 257
2023-05-10 5:47 ` youling 257
2023-05-10 6:50 ` Eric Biggers
2023-05-10 22:00 ` Theodore Ts'o
2022-12-07 11:27 ` [PATCH v4 13/13] ext4: Remove ordered data support from ext4_writepage() Jan Kara
2022-12-08 14:23 ` Theodore Ts'o
2022-12-08 15:40 ` Jan Kara
2022-12-08 15:57 ` Theodore Ts'o
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=20221208152811.ftcepqs5x54nqtzo@riteshh-domain \
--to=ritesh.list@gmail.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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