From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Christoph Hellwig <hch@lst.de>, Paul Eggert <eggert@cs.ucla.edu>,
Florian Weimer <fweimer@redhat.com>
Cc: Trond Myklebust <trondmy@hammerspace.com>,
libc-alpha@sourceware.org, linux-fsdevel@vger.kernel.org
Subject: Re: posix_fallocate behavior in glibc
Date: Mon, 29 Jul 2024 14:54:23 -0300 [thread overview]
Message-ID: <d8a20aa6-aa21-485f-b4c0-e60f654d1733@linaro.org> (raw)
In-Reply-To: <20240729174344.GA31982@lst.de>
On 29/07/24 14:43, Christoph Hellwig wrote:
> Hi Paul,
>
> thanks for the answer. I don't have a current glibc assignment, so me
> directly sending a patch is probably not productive.
>
> I don't really know which file systems benefit from doing a zeroing
> operations - after all this requires writing the data twice which usually
> actually is a bad idea unless offset by extremely suboptimal allocation
> behavior for small allocations, which got fixed in most file systems
> people actually use. So candidates where it actually would be useful
> might be things like hfsplus. But these are often used on cheap
> consumer media, where the double write will actually meaningfully cause
> additional write and erase cycle harming the device lifetime and long
> term performance.
>
> Note that the kernel has a few implementations of fallocate that are
> basically a slightly more optimized implementation of this pattern
> (fat, gfs2) so some maintainers through it useful at least for
> some workloads and use cases.
We already have discussed this some years ago, where some bug were marked
as WONTFIx:
* Bug 6865 - fallback posix_fallocate() implementation is racy
* Bug 18515 - posix_fallocate disastrous fallback behavior is no longer mandated by POSIX and should be fixed
* Bug 15661 - posix_fallocate fallback code buggy and dangerous
Florian even sent a patch to remove the posix_fallocate implementations [1],
which generated a long thread of potential pitfalls of the fallback
removal [2].
Florian and Carlos, has anything changes in this behavior?
[1] https://sourceware.org/legacy-ml/libc-alpha/2015-04/msg00309.html
[2] https://sourceware.org/legacy-ml/libc-alpha/2015-05/msg00058.html
next prev parent reply other threads:[~2024-07-29 17:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 16:09 posix_fallocate behavior in glibc Christoph Hellwig
2024-07-29 17:23 ` Paul Eggert
2024-07-29 17:43 ` Christoph Hellwig
2024-07-29 17:54 ` Adhemerval Zanella Netto [this message]
[not found] ` <CAPBLoAf11hM0PLhqPG5gUyivU9U1manpOOhDWCPugUmWc1VVUw@mail.gmail.com>
2024-07-29 18:45 ` Christoph Hellwig
2024-07-29 17:57 ` Florian Weimer
2024-07-29 18:44 ` Christoph Hellwig
2024-07-29 18:52 ` Florian Weimer
2024-07-29 19:01 ` Christoph Hellwig
2024-07-29 19:23 ` Florian Weimer
2024-07-30 15:47 ` Christoph Hellwig
2024-07-30 16:11 ` Paul Eggert
2024-07-30 16:20 ` Christoph Hellwig
2024-07-30 17:03 ` Florian Weimer
2024-07-30 17:08 ` Christoph Hellwig
2024-07-30 17:29 ` Florian Weimer
2024-07-30 17:52 ` Mark Wielaard
2024-07-31 2:32 ` Theodore Ts'o
2024-07-29 23:53 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2024-06-26 6:01 Christoph Hellwig
2024-07-29 15:09 ` Christoph Hellwig
2024-07-29 15:11 ` Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8a20aa6-aa21-485f-b4c0-e60f654d1733@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
--cc=hch@lst.de \
--cc=libc-alpha@sourceware.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=trondmy@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).