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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Dec 2022 00:14:25 -0800
From:   Sarthak Kukreti <>
To:     Christoph Hellwig <>
        Jens Axboe <>,
        "Michael S . Tsirkin" <>,
        Jason Wang <>,
        Paolo Bonzini <>,
        Stefan Hajnoczi <>,
        Alasdair Kergon <>,
        Mike Snitzer <>,
        "Theodore Ts'o" <>,
        Andreas Dilger <>,
        Bart Van Assche <>,
        Daniil Lunev <>,
        Evan Green <>,
        Gwendal Grignou <>
Subject: Re: [PATCH RFC 4/8] fs: Introduce FALLOC_FL_PROVISION

On Fri, Sep 23, 2022 at 1:45 AM Christoph Hellwig <> wrote:
> On Tue, Sep 20, 2022 at 10:54:32PM -0700, Sarthak Kukreti wrote:
> > [ mmc0blkp1 | ext4(1) | sparse file | loop | dm-thinp | dm-thin | ext4(2) ]
> >
> > would be predicated on the guarantees of fallocate() per allocation
> > layer; if ext4(1) was replaced by a filesystem that did not support
> > fallocate(), then there would be no guarantee that a write to a file
> > on ext4(2) succeeds.
> a write or any unlimited number of writes?

(Apologies for the super late reply!) In this case, even a write won't
be guaranteed if we run out of space on the lower filesystem. Looking
at the fallocate() man page, I think the key part lies in the
following phrase (emphasis mine):

After a successful call, subsequent writes into the range
specified by offset and len are guaranteed not to fail _because of
lack of disk space_

So, it's not a blanket guarantee that all writes will always succeed,
but that any writes into that range will not fail due to lack of disk
space. As you mentioned, writes may happen out-of-place in one or more
layer. But the fallocate(FALLOC_FL_PROVISION) ensures that each layer
will preserve space for writes into that range to not fail with ENOSPC
(so eg. ext4 and dm-thinp will set aside enough extents to fulfil that
promise later on for all writes).



Powered by blists - more mailing lists