Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2325487rwo; Thu, 3 Aug 2023 07:56:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9D2e1Qq/2aH0VwwSVFwQN9vX17+LiIXoUTgN7SvSRiRaF9ZpdxBWdjT/aSa6ZS1e57/9k X-Received: by 2002:aa7:c643:0:b0:522:7c12:8092 with SMTP id z3-20020aa7c643000000b005227c128092mr7952859edr.2.1691074601143; Thu, 03 Aug 2023 07:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691074601; cv=none; d=google.com; s=arc-20160816; b=a2Akm9kxBVWQm1Yy13lnAn+l8LlhhOkBRcQjdH/LmrCgnhQh0ZTXuRLHHpYV4g02oh D+66tQdjZoJnlTxSv8kli6YuhKvGygPoBBqO4pRqfXDpG2ihMvwY7rmDX9lI2AwNm2Qb 1bu0yjDegHG9ClyVLJyT3esUCZV8cI4ZvCC2kHt4+PfMRYZqQs8x/EhY5VUoQkthnAgh 4GsYHJoWwfa5fikDvq1bsX7OSFEPMoqMV2gXqT1WwmZW8OSQlcp7mKoBJLuy0YEr5bFq 3wDg3xkv7AbUh08Tq88gkzm3F1/dC9E6S9uQH3wedzqjn0f6t1NIO6HBNrMqKzGv6iG1 rEpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=doPWI6cJjEBE1FupixHcj3IhtoPbpJvHZ1GTlm8WBQM=; fh=2Cn0oHhRunYO+MqeElF523wQvgmjxkSAMpH3Se99YF8=; b=T/gFqpsl6m9cj8iXQag+ktc1fct4Jv0C35jP31fuBtLequW5fFAfs3i78Z6HbtF1/U h9KwO9QZH/lXYF2+Y3A89H4QbV5aSiksEMuhQj0moAsUs0L5703IhfLBqt2bPy5TTGRQ J7a6e6a4viL3Xkdu/OUfHToRLGCPMH1n3pkUs00SW4BMn2KHLmGyK4tjwt/y7ttuvxVm fK2l7AoX1uqDOTxFZWYMJzr9fwT/IgrVGx8yUwor0CqjFQlNZpdJ9JFfqvAmcGZeZgNm zfavusx6htedfRzSaCjNrZO7uoZLvtZq/vhPFM7exZR2FNbBb5C8d78DmYQVdtG8QcvT sfsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OsDHD++C; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020aa7df8a000000b005228264a70asi3587894edy.43.2023.08.03.07.56.16; Thu, 03 Aug 2023 07:56:41 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OsDHD++C; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236209AbjHCO3A (ORCPT + 99 others); Thu, 3 Aug 2023 10:29:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236593AbjHCO26 (ORCPT ); Thu, 3 Aug 2023 10:28:58 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDEC1F0 for ; Thu, 3 Aug 2023 07:28:55 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 80F6D2198F; Thu, 3 Aug 2023 14:28:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1691072934; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=doPWI6cJjEBE1FupixHcj3IhtoPbpJvHZ1GTlm8WBQM=; b=OsDHD++CM9g4TEdUOF9KvabyfxF73I3ZOkd7murJP9t5NAOvjyUmnb/kul8552VLrzD6WL jfx5peAfOzoes3RmLQC4A2/6yGzHyeJn/yD2qLo3mHClmeklct1UuYdY6sahu68yobdcM+ csjScw+sl/ensGlZOWpbsiUEXl/P0yM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1691072934; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=doPWI6cJjEBE1FupixHcj3IhtoPbpJvHZ1GTlm8WBQM=; b=oOckwG31Ip8V+ssOcpehbTxyGOGlC3/vfvhTpEPs/rfXNzJPmpaNVR1P9zl58NEoutHYCH u/YAf03CkmNbaFDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7251A1333C; Thu, 3 Aug 2023 14:28:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KBHkG6a5y2QmEQAAMHmgww (envelope-from ); Thu, 03 Aug 2023 14:28:54 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 034DDA076B; Thu, 3 Aug 2023 16:28:53 +0200 (CEST) Date: Thu, 3 Aug 2023 16:28:53 +0200 From: Jan Kara To: Zhang Yi Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH 06/12] jbd2: cleanup load_superblock() Message-ID: <20230803142853.jdiijcez7gtpcot7@quack3> References: <20230704134233.110812-1-yi.zhang@huaweicloud.com> <20230704134233.110812-7-yi.zhang@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230704134233.110812-7-yi.zhang@huaweicloud.com> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE 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 Tue 04-07-23 21:42:27, Zhang Yi wrote: > From: Zhang Yi > > Rename load_superblock() to journal_load_superblock(), move getting and > reading superblock from journal_init_common() and > journal_get_superblock() to this function, and also rename > journal_get_superblock() to journal_check_superblock(), make it a pure > check helper to check superblock validity from disk. > > Signed-off-by: Zhang Yi Two comments below: > -/* > - * Read the superblock for a given journal, performing initial > +/** > + * journal_check_superblock() > + * @journal: journal to act on. > + * > + * Check the superblock for a given journal, performing initial > * validation of the format. > */ We rarely use kerneldoc style comments for local functions. In particular in this place where there's only one user, it seems a bit superfluous. But if you want to keep it, I'm not against it but then the proper kerneldoc format should be used. In particular, it should be like: /** * journal_check_superblock - check validity of journal superblock * @journal: journal to act on. * * ... description ... and include here also description of return values */ The same comment applies to journal_load_superblock() below. Honza > -/* > +/** > + * journal_load_superblock() > + * @journal: journal to act on. > + * > * Load the on-disk journal superblock and read the key fields into the > * journal_t. > */ > -static int load_superblock(journal_t *journal) > +static int journal_load_superblock(journal_t *journal) -- Jan Kara SUSE Labs, CR