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]
Message-ID: <20230803142853.jdiijcez7gtpcot7@quack3>
Date:   Thu, 3 Aug 2023 16:28:53 +0200
From:   Jan Kara <jack@...e.cz>
To:     Zhang Yi <yi.zhang@...weicloud.com>
Cc:     linux-ext4@...r.kernel.org, tytso@....edu,
        adilger.kernel@...ger.ca, jack@...e.cz, yi.zhang@...wei.com,
        chengzhihao1@...wei.com, yukuai3@...wei.com
Subject: Re: [PATCH 06/12] jbd2: cleanup load_superblock()

On Tue 04-07-23 21:42:27, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@...wei.com>
> 
> 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 <yi.zhang@...wei.com>

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 <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ