From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] Use real FS block size in fallocate05
Date: Fri, 13 Dec 2019 14:40:02 +0100 [thread overview]
Message-ID: <20191213134002.GE20795@rei.lan> (raw)
In-Reply-To: <0c8a52b4-0c71-4efa-f58a-66524055e32a@suse.cz>
Hi!
> I think it might be better to change the test scenario a bit:
> 1. fallocate(FALLOCATE_BLOCKS * blocksize)
> 2. tst_fill_fs()
> 3. write(FALLOCATE_BLOCKS * blocksize)
> 4. repeat fallocate(blocksize) until we get ENOSPC
> 5. write() into all blocks allocated in step 4
> 6. check that another write() will get ENOSPC
> 7. test fallocate(PUNCH_HOLE | KEEP_SIZE)
>
> This should get us around the issue with tst_fill_fs() and still
> properly validate that fallocate() handles full FS gracefully.
Looping over the second fallocate until we got ENOSPC sounds reasonable
to me.
> The only remaining issue is whether it's correct for Btrfs to only
> release blocks when you deallocate the whole file. I still haven't heard
> back from our Btrfs dev.
So the punched hole does not free space on Btrfs even if we are FS block
aligned? I was under an impression that it should, but again Btrfs is
copy-on-write filesystem, so it may want to keep a copy of the discarded
blocks anyways.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-12-13 13:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 9:36 [LTP] [PATCH 0/1] Use real FS block size in fallocate05 Martin Doucha
2019-11-28 9:36 ` [LTP] [PATCH 1/1] " Martin Doucha
2019-11-28 17:47 ` Petr Vorel
2019-11-29 9:54 ` Martin Doucha
2019-11-29 12:01 ` Jan Stancek
2019-11-29 15:25 ` Martin Doucha
2019-11-29 16:17 ` Jan Stancek
2019-12-04 10:38 ` Martin Doucha
2019-12-13 13:40 ` Cyril Hrubis [this message]
2019-12-17 13:17 ` [LTP] [PATCH v2] " Martin Doucha
2019-12-17 21:02 ` Jan Stancek
2019-12-18 9:09 ` Martin Doucha
2019-12-18 10:01 ` Martin Doucha
2019-12-18 10:07 ` Jan Stancek
2019-12-18 13:15 ` [LTP] [PATCH v3] " Martin Doucha
2020-01-02 10:01 ` Jan Stancek
2020-01-07 15:21 ` Cyril Hrubis
2020-01-07 15:50 ` Martin Doucha
2020-01-13 12:16 ` Martin Doucha
2020-01-13 13:16 ` Qu WenRuo
2020-01-13 13:25 ` Martin Doucha
2020-01-13 13:30 ` Qu WenRuo
2020-01-07 16:09 ` Martin Doucha
2020-01-07 16:29 ` Cyril Hrubis
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=20191213134002.GE20795@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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