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  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, 3 Nov 2020 18:02:08 +0100
From:   Jan Kara <jack@...e.cz>
To:     Harshad Shirwadkar <harshadshirwadkar@...il.com>
Cc:     linux-ext4@...r.kernel.org, tytso@....edu, jack@...e.cz
Subject: Re: [PATCH 10/10] ext4: issue fsdev cache flush before starting fast
 commit

On Sat 31-10-20 13:05:18, Harshad Shirwadkar wrote:
> If the journal dev is different from fsdev, issue a cache flush before
> committing fast commit blocks to disk.
> 
> Suggested-by: Jan Kara <jack@...e.cz>
> Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@...il.com>

The patch looks good to me. You can add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/ext4/fast_commit.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
> index 9ae8ba213961..facf2f59b895 100644
> --- a/fs/ext4/fast_commit.c
> +++ b/fs/ext4/fast_commit.c
> @@ -996,6 +996,13 @@ static int ext4_fc_perform_commit(journal_t *journal)
>  	if (ret)
>  		return ret;
>  
> +	/*
> +	 * If file system device is different from journal device, issue a cache
> +	 * flush before we start writing fast commit blocks.
> +	 */
> +	if (journal->j_fs_dev != journal->j_dev)
> +		blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS);
> +
>  	blk_start_plug(&plug);
>  	if (sbi->s_fc_bytes == 0) {
>  		/*
> -- 
> 2.29.1.341.ge80a0c044ae-goog
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists