From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, Greed Rong <greedrong@gmail.com>
Subject: Re: [PATCH] btrfs: Share the same anonymous block device for the whole filesystem
Date: Fri, 12 Jun 2020 19:24:13 +0200 [thread overview]
Message-ID: <20200612172413.GX27795@twin.jikos.cz> (raw)
In-Reply-To: <20200612064237.13439-1-wqu@suse.com>
On Fri, Jun 12, 2020 at 02:42:37PM +0800, Qu Wenruo wrote:
> [BUG]
> There is a bug report about transaction abort due to -EMFILE error.
>
> ------------[ cut here ]------------
> BTRFS: Transaction aborted (error -24)
> WARNING: CPU: 17 PID: 17041 at fs/btrfs/transaction.c:1576 create_pending_snapshot+0xbc4/0xd10 [btrfs]
> RIP: 0010:create_pending_snapshot+0xbc4/0xd10 [btrfs]
> Call Trace:
> create_pending_snapshots+0x82/0xa0 [btrfs]
> btrfs_commit_transaction+0x275/0x8c0 [btrfs]
> btrfs_mksubvol+0x4b9/0x500 [btrfs]
> btrfs_ioctl_snap_create_transid+0x174/0x180 [btrfs]
> btrfs_ioctl_snap_create_v2+0x11c/0x180 [btrfs]
> btrfs_ioctl+0x11a4/0x2da0 [btrfs]
> do_vfs_ioctl+0xa9/0x640
> ksys_ioctl+0x67/0x90
> __x64_sys_ioctl+0x1a/0x20
> do_syscall_64+0x5a/0x110
> entry_SYSCALL_64_after_hwframe+0x44/0xa9
> ---[ end trace 33f2f83f3d5250e9 ]---
> BTRFS: error (device sda1) in create_pending_snapshot:1576: errno=-24 unknown
> BTRFS info (device sda1): forced readonly
> BTRFS warning (device sda1): Skipping commit of aborted transaction.
> BTRFS: error (device sda1) in cleanup_transaction:1831: errno=-24 unknown
>
> The workload involves creating and deleting a lot of snapshots in a
> short period.
The ids get returned to the IDA range once the last reference to the
root object is reached, but there's no distinction between a regular
subvolume and a deleted one.
I think we could call free_anon_bdev once the subvolume is deleted in
btrfs_delete_subvolume and not wait until it gets processed by
btrfs_clean_one_deleted_snapshot . This should be save, as once the
subvolume disappears from the file hierarchy, the bdev cannot be queried
by users.
prev parent reply other threads:[~2020-06-12 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 6:42 [PATCH] btrfs: Share the same anonymous block device for the whole filesystem Qu Wenruo
2020-06-12 13:33 ` David Sterba
2020-06-12 16:48 ` David Sterba
2020-06-13 0:38 ` Qu Wenruo
2020-06-12 17:24 ` David Sterba [this message]
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=20200612172413.GX27795@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=greedrong@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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).