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:	Thu, 17 Nov 2011 02:16:36 -0800
From:	Joel Becker <jlbec@...lplan.org>
To:	Mark Fasheh <mfasheh@...e.de>
Cc:	Chris Mason <chris.mason@...cle.com>, Jan Kara <jack@...e.cz>,
	Christoph Hellwig <hch@...radead.org>,
	Steven Whitehouse <swhiteho@...hat.com>,
	linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
	cluster-devel@...hat.com
Subject: Re: [Cluster-devel] fallocate vs O_(D)SYNC

On Wed, Nov 16, 2011 at 12:03:10PM -0800, Mark Fasheh wrote:
> On Wed, Nov 16, 2011 at 11:35:40AM -0800, Mark Fasheh wrote:
> > > We should do it per FS though, I'll patch up btrfs.
> > 
> > I agree about doing it per FS. Ocfs2 just needs a one-liner to mark the
> > journal transaction as synchronous.
> 
> Joel, here's an (untested) patch to fix this in Ocfs2.
> 	--Mark
> 
> --
> Mark Fasheh
> 
> From: Mark Fasheh <mfasheh@...e.com>
> 
> ocfs2: honor O_(D)SYNC flag in fallocate
> 
> We need to sync the transaction which updates i_size if the file is marked
> as needing sync semantics.
> 
> Signed-off-by: Mark Fasheh <mfasheh@...e.de>

	Makes sense to me.  

Joel

> ---
>  fs/ocfs2/file.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
> index de4ea1a..cac00b4 100644
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -1950,6 +1950,9 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
>  	if (ret < 0)
>  		mlog_errno(ret);
>  
> +	if (file->f_flags & O_SYNC)
> +		handle->h_sync = 1;
> +
>  	ocfs2_commit_trans(osb, handle);
>  
>  out_inode_unlock:
> -- 
> 1.7.6
> 

-- 

Life's Little Instruction Book #347

	"Never waste the oppourtunity to tell someone you love them."

			http://www.jlbec.org/
			jlbec@...lplan.org
--
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