From: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: fallocate fail on btrfs
Date: Wed, 27 Aug 2014 23:33:55 +0000 (UTC) [thread overview]
Message-ID: <pan.2014.08.27.23.33.55@googlemail.com> (raw)
In-Reply-To: CADw2B2MmR41K3_qEeHUg0ZQAEojK4T3PTFUeUQxLLxsEiEa8_w@mail.gmail.com
On Wed, 27 Aug 2014 15:58:49 -0700, G. Richard Bellamy wrote:
> [..snip..]
I can use fallocate on btrfs as you tried in your first post, with or
without --keep-size, and it does the right things without errors. Running
kernel 3.14+ (patched btrfs), util-linux-2.24.2 on Gentoo.
> There are two things going wrong here.
>
> 1. The "open" command fallocate is using isn't passing along the O_CREAT
> flag properly.
> https://git.kernel.org/cgit/utils/util-linux/util-linux.git/tree/sys-
> utils/fallocate.c#n368
> CODE: fd = open(filename, O_RDWR | (!dig && !mode ? O_CREAT : 0), 0644);
> STRACE: open("test.test", O_RDWR) = -1 ENOENT (No such file or
> directory)
When you have fallocate.c open in cgit, go to its log and you will find a
recent commit:
https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/sys-
utils/fallocate.c?id=575718a04aa0c053875041dc387e360f2dcaa70d
aka: "fallocate: use O_CREAT only for the default behavior"
Seems to me you need to downgrade util-linux and/or complain to the util-
linux folks. In fact downgrade util-linux first (cfdisk in 2.25 eats
partitions) and try fallocate again on whatever kernel you have running,
just to rule out btrfs.
-h
next prev parent reply other threads:[~2014-08-27 23:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 5:05 fallocate fail on btrfs G. Richard Bellamy
2014-08-27 6:39 ` Duncan
2014-08-27 17:39 ` G. Richard Bellamy
2014-08-27 22:39 ` G. Richard Bellamy
2014-08-27 22:51 ` G. Richard Bellamy
2014-08-27 22:58 ` G. Richard Bellamy
2014-08-27 23:33 ` Holger Hoffstätte [this message]
2014-08-28 9:12 ` Duncan
2014-08-28 14:48 ` G. Richard Bellamy
2014-08-28 20:10 ` Duncan
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=pan.2014.08.27.23.33.55@googlemail.com \
--to=holger.hoffstaette@googlemail.com \
--cc=linux-btrfs@vger.kernel.org \
/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).