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]
Message-ID: <20240829035406.GB4023@lst.de>
Date: Thu, 29 Aug 2024 05:54:06 +0200
From: Christoph Hellwig <hch@....de>
To: Dave Chinner <david@...morbit.com>
Cc: Christoph Hellwig <hch@....de>, Christian Brauner <brauner@...nel.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Chandan Babu R <chandan.babu@...cle.com>,
	Brian Foster <bfoster@...hat.com>, Jens Axboe <axboe@...nel.dk>,
	Jan Kara <jack@...e.cz>, "Darrick J. Wong" <djwong@...nel.org>,
	Theodore Ts'o <tytso@....edu>, linux-block@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-xfs@...r.kernel.org,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 4/6] xfs: call xfs_flush_unmap_range from
 xfs_free_file_space

On Thu, Aug 29, 2024 at 01:03:31PM +1000, Dave Chinner wrote:
> > @@ -848,6 +848,14 @@ xfs_free_file_space(
> >  	if (len <= 0)	/* if nothing being freed */
> >  		return 0;
> >  
> > +	/*
> > +	 * Now AIO and DIO has drained we flush and (if necessary) invalidate
> > +	 * the cached range over the first operation we are about to run.
> > +	 */
> > +	error = xfs_flush_unmap_range(ip, offset, len);
> > +	if (error)
> > +		return error;
> > +
> >  	startoffset_fsb = XFS_B_TO_FSB(mp, offset);
> >  	endoffset_fsb = XFS_B_TO_FSBT(mp, offset + len);
> 
> Ok, so if we ever change the zeroing implementation to not punch a
> hole first, we're going to have to make sure we add this to whatever
> new zeroing implementation we have.
> 
> Can you leave a comment in the FALLOC_FL_ZERO_RANGE implementation
> code that notes it currently relies on the xfs_flush_unmap_range()
> in xfs_free_file_space() for correct operation?

Sure.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ