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]
Date:	Mon, 23 Jun 2014 12:41:04 +0200 (CEST)
From:	Lukáš Czerner <lczerner@...hat.com>
To:	akpm@...ux-foundation.org
cc:	tytso@....edu, linux-ext4@...r.kernel.org, fabf@...net.be,
	hch@...radead.org, jack@...e.cz, viro@...iv.linux.org.uk
Subject: Re: [patch 1/1] fs/ext4/fsync.c: generic_file_fsync call based on
 barrier flag

On Fri, 6 Jun 2014, akpm@...ux-foundation.org wrote:

> Date: Fri, 06 Jun 2014 12:51:50 -0700
> From: akpm@...ux-foundation.org
> To: tytso@....edu
> Cc: linux-ext4@...r.kernel.org, akpm@...ux-foundation.org, fabf@...net.be,
>     hch@...radead.org, jack@...e.cz, viro@...iv.linux.org.uk
> Subject: [patch 1/1] fs/ext4/fsync.c: generic_file_fsync call based on barrier
>      flag
> 
> From: Fabian Frederick <fabf@...net.be>
> Subject: fs/ext4/fsync.c: generic_file_fsync call based on barrier flag
> 
> generic_file_fsync has been updated to issue a flush for older
> filesystems.
> 
> This patch tests for barrier flag in ext4 mount flags and calls the right
> function.

The patch itself looks good.

Reviewed-by: Lukas Czerner <lczerner@...hat.com>

Note that the actual generic_file_fsync change fixes a real bug
in ext4 where we would _not_ send a flush on sync if we have file
system without journal.

Ted, it would be useful to mention that in the commit description
along with the commit id:

ac13a829f6adb674015ab399594c089990104af7 fs/libfs.c: add generic
data flush to fsync

Thanks!
-Lukas

> 
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> Suggested-by: Jan Kara <jack@...e.cz>
> Suggested-by: Christoph Hellwig <hch@...radead.org>
> Cc: Jan Kara <jack@...e.cz>
> Cc: Christoph Hellwig <hch@...radead.org>
> Cc: Alexander Viro <viro@...iv.linux.org.uk>
> Cc: "Theodore Ts'o" <tytso@....edu>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  fs/ext4/fsync.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff -puN fs/ext4/fsync.c~fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag fs/ext4/fsync.c
> --- a/fs/ext4/fsync.c~fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag
> +++ a/fs/ext4/fsync.c
> @@ -107,7 +107,10 @@ int ext4_sync_file(struct file *file, lo
>  	}
>  
>  	if (!journal) {
> -		ret = generic_file_fsync(file, start, end, datasync);
> +		if (test_opt(inode->i_sb, BARRIER))
> +			ret = generic_file_fsync(file, start, end, datasync);
> +		else
> +			ret = __generic_file_fsync(file, start, end, datasync);
>  		if (!ret && !hlist_empty(&inode->i_dentry))
>  			ret = ext4_sync_parent(inode);
>  		goto out;
> _
> --
> 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