Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3698822rwb; Mon, 7 Aug 2023 19:10:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3VVzF1H3DV4D5NaVOw/NLdhMCwuCGSSc8P+tby2NLvwJfYb9eYL3dS5oAzBqA1ZR+NBav X-Received: by 2002:a17:907:75c2:b0:99b:4d3d:c9b7 with SMTP id jl2-20020a17090775c200b0099b4d3dc9b7mr9463275ejc.31.1691460603010; Mon, 07 Aug 2023 19:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691460602; cv=none; d=google.com; s=arc-20160816; b=hatqx07wdC8qbA8KfkWHdohdKbc5okHfkgEUF8SLE/66+OaHNIJB7dxOc6W0+LMbTQ QfUWE5cgDrjL01XvsiH5x3lpUB7HdeRUkSEcy6v9x4A3s2SVBm/f5rV5KfLCMq8bHRu9 Qoxn3RHmhRnp0na8mYTuBpXOjoAbDKZQJ/3GmcNjsBpHrbISBrIdZKkhqZcUIzystI2P EzhAVUFcGP337n0BR/EcsHR/498Wp+d4xgIWIlnkr4rgydayccI89E+EwmRNNBH46jc7 G9+rXg2R5gmbbRFbStPbMnfM0TfLxpx1KZrifmBJ6Mbr2tzlERSGDQawWuVe+CN2oQPp s3ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=qoeI4vabMEY36VRXuqMblFuTuUVLXUNVlEg8vIPmg/Q=; fh=wpiH3w6WQHNVHy2Mj1eewpqVpdT2mynvX/bc+gCMiyw=; b=bmbznd7GvNiBzJViccpzP5QrSIHpSOTkRDkNE+ux1e+FsY9MrKzUvUZI6EWPbYa6zF hTU3RfyrNO1c45H8mYt+cno7vc3s9dsHqmzx8770SHnpIJKDHRhlkWTdahEW1YlrKNhn v4Sh5y4Fz3Hz3NirYN/h9NSwyMVzH/YtzDLkQdU5ioIKNYom54Rb9jnqpsFufIhssHaO KSCvrdnkm6GM/ChvZ85aI4/QrDFWRiEx3D357d8RqQWWKG9cWHjhDL7sApw/Kh/MxzT4 ebxeX0iUNELg75lOuCpSfGLL/FoeTsoVAqSpWtA/7OVE0inCljDmAHCSLVNZUvoY0XZU NbaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kl11-20020a170907994b00b0096f81ae0ac9si6828920ejc.34.2023.08.07.19.09.35; Mon, 07 Aug 2023 19:10:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229568AbjHHAys (ORCPT + 99 others); Mon, 7 Aug 2023 20:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbjHHAyr (ORCPT ); Mon, 7 Aug 2023 20:54:47 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2777FE9; Mon, 7 Aug 2023 17:54:45 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R501e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VpIkifi_1691456082; Received: from 30.221.128.117(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0VpIkifi_1691456082) by smtp.aliyun-inc.com; Tue, 08 Aug 2023 08:54:43 +0800 Message-ID: <259ff3c4-4d9c-aaf4-c7be-205615c00125@linux.alibaba.com> Date: Tue, 8 Aug 2023 08:54:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH 3/4] ocfs2: stop using bdev->bd_super for journal error logging To: Christoph Hellwig , Al Viro , Christian Brauner Cc: Theodore Ts'o , Andreas Dilger , Mark Fasheh , Joel Becker , Jens Axboe , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-block@vger.kernel.org References: <20230807112625.652089-1-hch@lst.de> <20230807112625.652089-4-hch@lst.de> Content-Language: en-US From: Joseph Qi In-Reply-To: <20230807112625.652089-4-hch@lst.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 Looks fine. 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"); > } > } > }