From patchwork Mon Aug 7 11:26:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13343841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6916AC001DF for ; Mon, 7 Aug 2023 11:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232087AbjHGLak (ORCPT ); Mon, 7 Aug 2023 07:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232735AbjHGLaZ (ORCPT ); Mon, 7 Aug 2023 07:30:25 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 113D959DC; Mon, 7 Aug 2023 04:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Ky+k0g+J5564niq+DKuVc0tR1t2yylRBRhDkAPI/eLw=; b=AbDWfoXa1Rrr6yaRZ2JfglBrWC 74h77GUxINqS1IYkil/0bfIDp00HdT4F+eW0qd4qC9R3LM+VJWT6ZHcOqg/sa8G+cqIxB5Ci481y9 wgowCTHq4ZgvtfAeS+qRHHotyF+JVrgJMF68lYpO65FcWVr/rUSchVJeOlyV2CEtJ03abCRkk9oFW b5x+qwDsaNSS6EIAnqlJHdZUDctX9Hb5ghAC08WPISbqK8qv0qdoLKrB6PUzSxDyrmmMLMfAG38Ry fEIHvnddFad4vKve5/58yzndhEB4WzjhqhegDMmq+eYdx6+xHDVfgdXOCgiFokaLhMld51XLKe4Tp 9CzCPr6Q==; Received: from [82.33.212.90] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qSyNq-00H59J-02; Mon, 07 Aug 2023 11:26:46 +0000 From: Christoph Hellwig To: Al Viro , Christian Brauner Cc: "Theodore Ts'o" , Andreas Dilger , Mark Fasheh , Joel Becker , Joseph Qi , Jens Axboe , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-block@vger.kernel.org Subject: [PATCH 3/4] ocfs2: stop using bdev->bd_super for journal error logging Date: Mon, 7 Aug 2023 12:26:24 +0100 Message-Id: <20230807112625.652089-4-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807112625.652089-1-hch@lst.de> References: <20230807112625.652089-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 Acked-by: Joseph Qi --- 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"); } } }