From: Russell Coker <russell@coker.com.au>
To: Astro Xe <astroxeu@yahoo.it>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs fi df output is not updated in a timely manner after subvolumes have been deleted
Date: Wed, 21 May 2014 00:26:14 +1000 [thread overview]
Message-ID: <1904314.55zAnN3BMv@xev> (raw)
In-Reply-To: <1400593810.31610.YahooMailNeo@web172206.mail.ir2.yahoo.com>
On Tue, 20 May 2014 14:50:10 Astro Xe wrote:
> On my box, the "used" value in the output of "btrfs filesystem df" is not
> updated in a timely manner, after that one or more subvolumes have been
> deleted. I need to execute "btrfs filesystem sync", in order to update the
> value.
>
> How do I fix this? Or, could someone fix this in btrfs-progs, please?
>
> I suspect the cause is that subvolumes are marked immediately as deleted,
> but cleaned up at a later time, is this right?
That appears to be the case. I've deleted subvolumes and then had btrfs take
10+ minutes to reclaim all the disk space. I've even had the system crash
during the process (due to btrfs bugs that seem fixed in 3.14) and the space
keeps getting freed after the reboot.
Do we really want to make it the default to block on a btrfs sync? In the
case of manual sysadmin tasks it's probably going to be preferable to run the
delete command and then move on to other things.
In the case of cron jobs we have to consider bulk performance, maybe it would
be better for the authors of cron jobs to run a filesystem sync after deleting
all snapshots to avoid driving the load average too high (I have had issues in
the past when cron jobs to remove snapshots end up running at the same time as
creating snapshots and scrubbing the filesystem). If a cron job was to delete
dozens of snapshots and sync after each one would that cause more disk access
than syncing once after all deletes?
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
next prev parent reply other threads:[~2014-05-20 14:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 13:50 btrfs fi df output is not updated in a timely manner after subvolumes have been deleted Astro Xe
2014-05-20 14:26 ` Russell Coker [this message]
2014-05-20 14:33 ` Hugo Mills
-- strict thread matches above, loose matches on Subject: below --
2014-05-20 13:46 Astro Xe
2014-05-20 16:51 ` Calvin Walton
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=1904314.55zAnN3BMv@xev \
--to=russell@coker.com.au \
--cc=astroxeu@yahoo.it \
--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).