From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Negative qgroup sizes
Date: Thu, 1 May 2014 16:58:34 +0000 (UTC) [thread overview]
Message-ID: <pan$cea24$895c4bc2$f096e7bb$50b7a75d@cox.net> (raw)
In-Reply-To: 53624D07.2000602@elastichosts.com
Alin Dobre posted on Thu, 01 May 2014 14:32:55 +0100 as excerpted:
> I am having trouble with one of the btrfs subvolumes, as it shows
> negative quota accounting values
> Running a "btrfs quota rescan -w /tmp/test" seems to fix it, but it
> seems to come back pretty often (happened twice in the last couple of
> days).
> The kernel we are using is 3.14.1 (stable) and the btrfs-progs version
> is 3.12.
I'm not a qgroups user myself, but I know there were quite some
complaints about negative numbers some months ago. I hadn't seen any in
awhile and had hoped the problems were all fixed, but now you're
reporting them again, so I guess not.
Tho you are slightly outdated on your btrfs-progs version, 3.14.1 being
current. But I think the code in question is kernel code and the progs
simply report it, so I don't think that can be the problem in this case.
The earlier recommendation, back when the problem reports were common,
was not to use qgroups on btrfs as the code obviously wasn't accounting
for something correctly. Either use btrfs without qgroups, or if you
really need quotas, use some other filesystem where the quota code works
reliably.
As for the problems themselves, I saw some patches go by that fixed
qgroups issues related to snapshot maintenance, and it's possible there's
more work to do in that area. The problem there is apparently due to the
difficulty in properly accounting quotas for shared data, such that
deleting old snapshots could turn things negative as the code subtracted
the quota numbers repeatedly, once for each snapshot deleted, instead of
properly figuring out what was shared and only subtracting for the data
unique to that snapshot when it was deleted.
So if you are doing snapshots, you can try not doing them (switching to
conventional backup if necessary) and see if that stabilizes your
numbers. If so, you know there's still more problems in that area.
Of course if the subvolumes involved aren't snapshotted, then the problem
must be elsewhere, but I do know the snapshotting case /is/ reasonably
difficult to get right... while staying within a reasonable performance
envelope at least.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2014-05-01 16:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 13:32 Negative qgroup sizes Alin Dobre
2014-05-01 16:58 ` Duncan [this message]
2014-05-02 9:17 ` Alin Dobre
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$cea24$895c4bc2$f096e7bb$50b7a75d@cox.net' \
--to=1i5t5.duncan@cox.net \
--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).