lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Aug 2023 08:54:42 +0800
From:   Joseph Qi <joseph.qi@...ux.alibaba.com>
To:     Christoph Hellwig <hch@....de>, Al Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>
Cc:     Theodore Ts'o <tytso@....edu>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        Mark Fasheh <mark@...heh.com>,
        Joel Becker <jlbec@...lplan.org>, Jens Axboe <axboe@...nel.dk>,
        linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
        ocfs2-devel@...ts.linux.dev, linux-block@...r.kernel.org
Subject: Re: [PATCH 3/4] ocfs2: stop using bdev->bd_super for journal error
 logging



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@....de>

Looks fine.
Acked-by: Joseph Qi <joseph.qi@...ux.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");
>  		}
>  	}
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ