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:   Wed, 6 Jan 2021 15:40:09 -0800
From:   Andres Freund <andres@...razel.de>
To:     Dave Chinner <david@...morbit.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-xfs@...r.kernel.org,
        linux-ext4@...r.kernel.org, linux-block@...r.kernel.org
Subject: Re: fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten
 extents?

Hi,

On 2021-01-07 09:52:01 +1100, Dave Chinner wrote:
> On Tue, Dec 29, 2020 at 10:28:19PM -0800, Andres Freund wrote:
> > Which brings me to $subject:
> > 
> > Would it make sense to add a variant of FALLOC_FL_ZERO_RANGE that
> > doesn't convert extents into unwritten extents, but instead uses
> > blkdev_issue_zeroout() if supported?  Mostly interested in xfs/ext4
> > myself, but ...
> 
> We have explicit requests from users (think initialising large VM
> images) that FALLOC_FL_ZERO_RANGE must never fall back to writing
> zeroes manually.

That behaviour makes a lot of sense for quite a few use cases - I wasn't
trying to make it sound like it should not be available. Nor that
FALLOC_FL_ZERO_RANGE should behave differently.


> IOWs, while you might want FALLOC_FL_ZERO_RANGE to explicitly write
> zeros, we have users who explicitly don't want it to do this.

Right - which is why I was asking for a variant of FALLOC_FL_ZERO_RANGE
(jokingly named FALLOC_FL_ZERO_RANGE_BUT_REALLY in the subject), rather
than changing the behaviour.


> Perhaps we should add want FALLOC_FL_CONVERT_RANGE, which tells the
> filesystem to convert an unwritten range of zeros to a written range
> by manually writing zeros. i.e. you do FALLOC_FL_ZERO_RANGE to zero
> the range and fill holes using metadata manipulation, followed by
> FALLOC_FL_WRITE_RANGE to then convert the "metadata zeros" to real
> written zeros.

Yep, something like that would do the trick. Perhaps
FALLOC_FL_MATERIALIZE_RANGE?

Greetings,

Andres Freund

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ