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]
Date:	Tue, 8 Jul 2014 22:48:03 -0600
From:	Andreas Dilger <adilger@...ger.ca>
To:	Azat Khuzhin <a3at.mail@...il.com>
Cc:	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
	"tytso@....edu" <tytso@....edu>
Subject: Re: [PATCH 2/3] tune2fs: remove_journal_device(): use the correct block to find jsb

Looks good. You can add:

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

Cheers, Andreas

> On Jul 8, 2014, at 14:41, Azat Khuzhin <a3at.mail@...il.com> wrote:
> 
> Signed-off-by: Azat Khuzhin <a3at.mail@...il.com>
> ---
> misc/tune2fs.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> index 0e7caf2..811cb4d 100644
> --- a/misc/tune2fs.c
> +++ b/misc/tune2fs.c
> @@ -193,6 +193,7 @@ static int remove_journal_device(ext2_filsys fs)
>    errcode_t    retval;
>    int        commit_remove_journal = 0;
>    io_manager    io_ptr;
> +    int start;
> 
>    if (f_flag)
>        commit_remove_journal = 1; /* force removal even if error */
> @@ -229,8 +230,10 @@ static int remove_journal_device(ext2_filsys fs)
>        goto no_valid_journal;
>    }
> 
> +    start = ext2fs_journal_sb_start(fs->blocksize);
>    /* Get the journal superblock */
> -    if ((retval = io_channel_read_blk64(jfs->io, 1, -SUPERBLOCK_SIZE, buf))) {
> +    if ((retval = io_channel_read_blk64(jfs->io, start,
> +        -SUPERBLOCK_SIZE, buf))) {
>        com_err(program_name, retval, "%s",
>            _("while reading journal superblock"));
>        goto no_valid_journal;
> @@ -261,7 +264,8 @@ static int remove_journal_device(ext2_filsys fs)
>    jsb->s_nr_users = htonl(nr_users);
> 
>    /* Write back the journal superblock */
> -    if ((retval = io_channel_write_blk64(jfs->io, 1, -SUPERBLOCK_SIZE, buf))) {
> +    if ((retval = io_channel_write_blk64(jfs->io, start,
> +        -SUPERBLOCK_SIZE, buf))) {
>        com_err(program_name, retval,
>            "while writing journal superblock.");
>        goto no_valid_journal;
> -- 
> 2.0.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ