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] [day] [month] [year] [list]
Message-ID: <4f4f0b29-cf6e-447d-9a41-ff75bc0fa3db@huaweicloud.com>
Date: Sat, 9 Nov 2024 11:47:57 +0800
From: Zhang Yi <yi.zhang@...weicloud.com>
To: Daniel Martín Gómez <dalme@...eup.net>
Cc: Theodore Ts'o <tytso@....edu>, Jan Kara <jack@...e.com>,
 linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] jbd2: Fix comment describing journal_init_common()

On 2024/11/7 22:45, Daniel Martín Gómez wrote:
> The code indicates that journal_init_common() fills the journal_t object
> it returns while the comment incorrectly states that only a few fields are
> initialised. Also, the comment claims that journal structures could be
> created from scratch which isn't possible as journal_init_common() calls
> journal_load_superblock() which loads and checks journal superblock from
> disk.
> 
> Signed-off-by: Daniel Martín Gómez <dalme@...eup.net>

Ha, thank you for the fix. This comment became stale after commit
c30713084ba5 ("jbd2:move load_superblock() into journal_init_common()") in
the "ext4,jbd2: cleanup journal load and initialization process" series.

Reviewed-by: Zhang Yi <yi.zhang@...wei.com>

> ---
>  fs/jbd2/journal.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 97f487c3d8fc..3c1d42133687 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -1518,9 +1518,10 @@ static int journal_load_superblock(journal_t *journal)
>   * destroy journal_t structures, and to initialise and read existing
>   * journal blocks from disk.  */
>  
> -/* First: create and setup a journal_t object in memory.  We initialise
> - * very few fields yet: that has to wait until we have created the
> - * journal structures from from scratch, or loaded them from disk. */
> +/* The journal_init_common() function creates and fills a journal_t object
> + * in memory. It calls journal_load_superblock() to load the on-disk journal
> + * superblock and initialize the journal_t object.
> + */
>  
>  static journal_t *journal_init_common(struct block_device *bdev,
>  			struct block_device *fs_dev,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ