From: Alin Dobre <alin.dobre@elastichosts.com>
To: linux-btrfs@vger.kernel.org
Subject: Subvolume creation returns file exists
Date: Fri, 15 Nov 2013 14:33:58 +0000 [thread overview]
Message-ID: <528630D6.5090103@elastichosts.com> (raw)
Hello,
We are using btrfs filesystems in our infrastructure and, at some point
of time, they start refusing to create new subvolumes.
Each file system is being quota initialized immediately after its
creation (with "btrfs quota enable") and then all subfolders under the
root directory are created as subvolumes (btrfs subvolume create). Over
time, these subvolumes may also be deleted. What's under subvolumes are
just various files and directories, should not be related to this problem.
After a while of using this setup, without any obvious steps to
reproduce it, the filesystem goes into a state where the following happens:
# btrfs subvolume create btrfs_mount/test_subvolume
Create subvolume 'btrfs_mount/test_subvolume'
ERROR: cannot create subvolume - File exists
In regards to data, the filesystem is pretty empty, it only has a single
empty directory. I don't know about the metadata, at this point.
The problem goes away if we disable and re-enable the quota. It all
seems to be some dead metadata lying around.
Next are some facts about this. Since we found that it's the ioctl call
which returns EEXIST, the place to further track the problem down was
into the kernel module, which assumes that the userspace tools are not
generating the problem. Here is a high level traceback of the problem:
ioctl.c:create_subvol() returns -EEXIST
cgroup.c:btrfs_qgroup_inherit() returns -EEXIST
qgroup.c:add_qgroup_item() returns -EEXIST
ctree.c:btrfs_insert_empty_item() returns -EEXIST
ctree.c:btrfs_search_slot() returns 0
ctree.c:key_search() returns 0
The problem appeared before our current kernel, which is a 3.8 version
(along with Btrfs progs v0.19), however mounting an already broken
filesystem in a 3.12 kernel (with Btrfs progs v0.20-rc1-358-g194aa4a)
doesn't do any better.
Any thoughts on this? We can provide you with more information, if
needed, even the broken filesystem itself.
Cheers,
Alin.
next reply other threads:[~2013-11-15 15:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 14:33 Alin Dobre [this message]
2013-11-15 15:27 ` Subvolume creation returns file exists Hugo Mills
2013-11-15 16:39 ` cwillu
2013-11-15 16:07 ` Duncan
2013-11-16 18:57 ` Duncan
2013-11-18 13:22 ` Alin Dobre
2013-11-28 10:01 ` Alin Dobre
2013-11-29 5:40 ` Wang Shilong
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=528630D6.5090103@elastichosts.com \
--to=alin.dobre@elastichosts.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).