From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
Jens Axboe <axboe@kernel.dk>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
ocfs2-devel@lists.linux.dev, linux-block@vger.kernel.org
Subject: Re: [PATCH 3/4] ocfs2: stop using bdev->bd_super for journal error logging
Date: Tue, 8 Aug 2023 08:54:42 +0800 [thread overview]
Message-ID: <259ff3c4-4d9c-aaf4-c7be-205615c00125@linux.alibaba.com> (raw)
In-Reply-To: <20230807112625.652089-4-hch@lst.de>
On 8/7/23 7:26 PM, Christoph Hellwig wrote:
> All ocfs2 journal error handling and logging is based on buffer_heads,
> and the owning inode and thus super_block can be retrieved through
> bh->b_assoc_map->host. Switch to using that to remove the last users
> of bdev->bd_super.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks fine.
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/journal.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index 25d8072ccfce46..c19c730c26e270 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -557,7 +557,7 @@ static void ocfs2_abort_trigger(struct jbd2_buffer_trigger_type *triggers,
> (unsigned long)bh,
> (unsigned long long)bh->b_blocknr);
>
> - ocfs2_error(bh->b_bdev->bd_super,
> + ocfs2_error(bh->b_assoc_map->host->i_sb,
> "JBD2 has aborted our journal, ocfs2 cannot continue\n");
> }
>
> @@ -780,14 +780,14 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh)
> mlog_errno(status);
> if (!is_handle_aborted(handle)) {
> journal_t *journal = handle->h_transaction->t_journal;
> - struct super_block *sb = bh->b_bdev->bd_super;
>
> mlog(ML_ERROR, "jbd2_journal_dirty_metadata failed. "
> "Aborting transaction and journal.\n");
> handle->h_err = status;
> jbd2_journal_abort_handle(handle);
> jbd2_journal_abort(journal, status);
> - ocfs2_abort(sb, "Journal already aborted.\n");
> + ocfs2_abort(bh->b_assoc_map->host->i_sb,
> + "Journal already aborted.\n");
> }
> }
> }
next prev parent reply other threads:[~2023-08-08 0:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 11:26 remove bdev->bd_super Christoph Hellwig
2023-08-07 11:26 ` [PATCH 1/4] fs: stop using bdev->bd_super in mark_buffer_write_io_error Christoph Hellwig
2023-08-07 11:26 ` [PATCH 2/4] ext4: don't use bdev->bd_super in __ext4_journal_get_write_access Christoph Hellwig
2023-08-08 14:33 ` Theodore Ts'o
2023-08-07 11:26 ` [PATCH 3/4] ocfs2: stop using bdev->bd_super for journal error logging Christoph Hellwig
2023-08-08 0:54 ` Joseph Qi [this message]
2023-08-07 11:26 ` [PATCH 4/4] fs, block: remove bdev->bd_super Christoph Hellwig
2023-08-07 12:45 ` Christian Brauner
2023-08-08 8:57 ` Christian Brauner
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=259ff3c4-4d9c-aaf4-c7be-205615c00125@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=adilger.kernel@dilger.ca \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=hch@lst.de \
--cc=jlbec@evilplan.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=tytso@mit.edu \
--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 NNTP newsgroup(s).