btrfs: add sysfs interface for qgroup
v2 cover btrfs: add sysfs interface for qgroup
This patchset will add the following sysfs interfaces for qgroup:
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/reference /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/exclusive /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_reference /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_exclusive /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/limit_flags
^^^ Above are already in "btrfs qgroup show" command output ^^^
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_data /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_meta_pertrans /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_meta_prealloc
These interfaces are mostly for debug purpose, to give us a clear view of which part is leaking.
Changelog:
v2:
- Add a new patch to change the return value type of btrfs_qgroup_level()
- Fix the wrong btrfs_sysfs_add_one_qgroup() call timming That function needs to allocate memory, thus can't be called in add_qgroup_rb() where some call sites are holding a spin lock. Delay btrfs_sysfs_add_one_qgroup() after add_qgroup_rb() until the spin lock is released.
- Skip qgroup sysfs interface for qgroup selftest
This makes no sense for selftest to initialize the sysfs interface and since we don't initialize fs_devices->kobj either, it's not possible to utilize the sysfs interface in selftest.
- Use proper helpers for qgroup BTRFS_ATTRs
- Use more human-readable names in qgroup sysfs entries
- Remove the unneeded completion for qgroup
Qu Wenruo (2):
btrfs: use __u16 for the return value of btrfs_qgroup_level()
btrfs: qgroup: add sysfs interface for debug
fs/btrfs/ctree.h | 1 + fs/btrfs/qgroup.c | 46 +++++++--- fs/btrfs/qgroup.h | 11 +++ fs/btrfs/sysfs.c | 151 ++++++++++++++++++++++++++++++++ fs/btrfs/sysfs.h | 6 ++ include/uapi/linux/btrfs_tree.h | 4 +- 6 files changed, 207 insertions(+), 12 deletions(-)
Signature · 1 line
2.27.0
PATCH v2 1/2 btrfs: use __u16 for the return value of btrfs_qgroup_level()
Btrfs qgroup level is limited to u16, so no need to use u64 for it.
--- fs/btrfs/qgroup.c | 2 +- include/uapi/linux/btrfs_tree.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/qgroup.c +1 -1
@@ -538,7 +538,7 @@ bool btrfs_check_quota_leak(struct btrfs_fs_info *fs_info)if (qgroup->rsv.values[i]) { ret = true;btrfs_warn (fs_info, -"qgroup %llu/%llu has unreleased space, type %d rsv %llu" , +"qgroup %hu/%llu has unreleased space, type %d rsv %llu" ,btrfs_qgroup_level (qgroup->qgroupid),btrfs_qgroup_subvolid (qgroup->qgroupid), i, qgroup->rsv.values[i]);
include/uapi/linux/btrfs_tree.h +2 -2
@@ -913,9 +913,9 @@ struct btrfs_free_space_info {#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)#define BTRFS_QGROUP_LEVEL_SHIFT 48 -static inline __u64 btrfs_qgroup_level (__u64 qgroupid) +static inline __u16 btrfs_qgroup_level (__u64 qgroupid) { -return qgroupid >>BTRFS_QGROUP_LEVEL_SHIFT ; +return (__u16)(qgroupid >>BTRFS_QGROUP_LEVEL_SHIFT ); }/*
Signature · 1 line
2.27.0
PATCH v2 2/2 btrfs: qgroup: add sysfs interface for debug
In reply to Qu WenruoThis patch will add the following sysfs interface:
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/reference /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/exclusive /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_reference /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_exclusive /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/limit_flags
^^^ Above are already in "btrfs qgroup show" command output ^^^
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_data /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_meta_pertrans /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_meta_prealloc
The last 3 rsv related members are not visible to users, but can be very useful to debug qgroup limit related bugs.
Also, to avoid '/' used in <qgroup_id>, the separator between qgroup level and qgroup id is changed to '_'.
The interface is not hidden behind 'debug' as I want this interface to be included into production build so we could have an easier life to debug qgroup rsv related bugs.
--- fs/btrfs/ctree.h | 1 + fs/btrfs/qgroup.c | 44 +++++++++++--- fs/btrfs/qgroup.h | 11 ++++ fs/btrfs/sysfs.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/sysfs.h | 6 ++ 5 files changed, 204 insertions(+), 9 deletions(-)
fs/btrfs/ctree.h +1 -0
@@ -779,6 +779,7 @@ struct btrfs_fs_info {u32 thread_pool_size;struct kobject *space_info_kobj; +struct kobject *qgroups_kobj;u64 total_pinned;
fs/btrfs/qgroup.c +35 -9
137 lines not on this page · raw message
fs/btrfs/qgroup.h +11 -0
@@ -8,6 +8,7 @@#include <linux/spinlock.h> #include <linux/rbtree.h> +#include <linux/kobject.h> #include "ulist.h" #include "delayed-ref.h"
@@ -223,8 +224,18 @@ struct btrfs_qgroup {*/ u64 old_refcnt;u64 new_refcnt; + +/* +* Sysfs kobjectid +*/ +struct kobject kobj; }; +static inline u64 btrfs_qgroup_subvolid (u64 qgroupid) +{ +return (qgroupid & ((1ULL <<BTRFS_QGROUP_LEVEL_SHIFT ) -1 )); +} +/* * For qgroup event trace points only */
fs/btrfs/sysfs.c +151 -0
163 lines not on this page · raw message
fs/btrfs/sysfs.h +6 -0
@@ -36,4 +36,10 @@ int btrfs_sysfs_add_space_info_type(struct btrfs_fs_info *fs_info,void btrfs_sysfs_remove_space_info (struct btrfs_space_info *space_info);void btrfs_sysfs_update_devid (struct btrfs_device *device); +int btrfs_sysfs_add_one_qgroup (struct btrfs_fs_info *fs_info, +struct btrfs_qgroup *qgroup); +void btrfs_sysfs_del_qgroups (struct btrfs_fs_info *fs_info); +int btrfs_sysfs_add_qgroups (struct btrfs_fs_info *fs_info); +void btrfs_sysfs_del_one_qgroup (struct btrfs_fs_info *fs_info, +struct btrfs_qgroup *qgroup);#endif
Signature · 1 line
2.27.0
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 1 line · Qu Wenruo
+QGROUP_ATTR(rfer, reference);
Note that this is 'referenced'.
fs/btrfs/sysfs.c int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) · line 1496
Quoted 2 lines
fs/btrfs/sysfs.c +2
-0+QGROUP_ATTR (excl, exclusive); +QGROUP_ATTR (max_rfer, max_reference);
And here max_referenced.
fs/btrfs/sysfs.c int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) · line 1501
Quoted 5 lines
fs/btrfs/sysfs.c +5
-0+QGROUP_ATTR (max_excl, max_exclusive); +QGROUP_ATTR (lim_flags, limit_flags); +QGROUP_RSV_ATTR (data,BTRFS_QGROUP_RSV_DATA ); +QGROUP_RSV_ATTR (meta_pertrans,BTRFS_QGROUP_RSV_META_PERTRANS ); +QGROUP_RSV_ATTR (meta_prealloc,BTRFS_QGROUP_RSV_META_PREALLOC );
The two above fixed but otherwise it's good, thanks.
The qgroup membership and relations could be added to the sysfs export too, but we're limited by the PAGE_SIZE output buffer so the information could be incomplete.
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 18 lines · David Sterba
Quoted 1 line · Qu Wenruo
+QGROUP_ATTR(rfer, reference);
Note that this is 'referenced'.
fs/btrfs/sysfs.c int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) · line 1496
Quoted 2 lines
fs/btrfs/sysfs.c +2
-0+QGROUP_ATTR (excl, exclusive); +QGROUP_ATTR (max_rfer, max_reference);And here
max_referenced.fs/btrfs/sysfs.c int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) · line 1501
Quoted 5 lines
fs/btrfs/sysfs.c +5
-0+QGROUP_ATTR (max_excl, max_exclusive); +QGROUP_ATTR (lim_flags, limit_flags); +QGROUP_RSV_ATTR (data,BTRFS_QGROUP_RSV_DATA ); +QGROUP_RSV_ATTR (meta_pertrans,BTRFS_QGROUP_RSV_META_PERTRANS ); +QGROUP_RSV_ATTR (meta_prealloc,BTRFS_QGROUP_RSV_META_PREALLOC );The two above fixed but otherwise it's good, thanks.
Quoted 4 lines
The qgroup membership and relations could be added to the sysfs export too, but we're limited by the
PAGE_SIZEoutput buffer so the information could be incomplete.
Yep, PAGE_SIZE is one limitation.
But we can also go another direction, just using a new dir for related qgroups, then we can workaround the limitation.
But personally speaking, the main objective is still the rsv_* members for debug.
I don't really want to turn the sysfs interface into a way to export all qgroup info yet.
But if this inspired us to explore more usage of sysfs other than adding new ioctls to get information from btrfs, then I can't be more happier.
Thanks,
Qu
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 23 lines · Qu Wenruo
Quoted 18 lines · David Sterba
Quoted 1 line · Qu Wenruo
+QGROUP_ATTR(rfer, reference);
Note that this is 'referenced'.
fs/btrfs/sysfs.c int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) · line 1496
Quoted 2 lines
fs/btrfs/sysfs.c +2
-0+QGROUP_ATTR (excl, exclusive); +QGROUP_ATTR (max_rfer, max_reference);And here
max_referenced.fs/btrfs/sysfs.c int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) · line 1501
Quoted 5 lines
fs/btrfs/sysfs.c +5
-0+QGROUP_ATTR (max_excl, max_exclusive); +QGROUP_ATTR (lim_flags, limit_flags); +QGROUP_RSV_ATTR (data,BTRFS_QGROUP_RSV_DATA ); +QGROUP_RSV_ATTR (meta_pertrans,BTRFS_QGROUP_RSV_META_PERTRANS ); +QGROUP_RSV_ATTR (meta_prealloc,BTRFS_QGROUP_RSV_META_PREALLOC );The two above fixed but otherwise it's good, thanks.
Quoted 4 lines
The qgroup membership and relations could be added to the sysfs export too, but we're limited by the
PAGE_SIZEoutput buffer so the information could be incomplete.
Quoted 8 lines
Yep,
PAGE_SIZEis one limitation.
But we can also go another direction, just using a new dir for related qgroups, then we can workaround the limitation.But personally speaking, the main objective is still the rsv_* members for debug.
I don't really want to turn the sysfs interface into a way to export all qgroup info yet.
Well, that's a bit of a problem, if you're designing a public interface for your own needs and neglecting that it will be used as a way to read qgroup information. Sooner or later someone will ask for the additional information to be added.
If it's just for debugging then it should be under 'debug', but as the bug reporter does not want to apply patches/change config you ask to make it visible unconditionally. I'm ok with that as long as the interface is done right because any mistake will be potentially much harder to fix in the future.
We need to at lest have a solid idea how to extend it, not neccessarily to implement it right now. Adding the group membership to qgroup directories under the qgroup directory as symlinks between the kobjects sounds ok-ish to me but it's a new idea and I need to think about it.
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 4 lines · David Sterba
We need to at lest have a solid idea how to extend it, not neccessarily to implement it right now. Adding the group membership to qgroup directories under the qgroup directory as symlinks between the kobjects sounds ok-ish to me but it's a new idea and I need to think about it.
So my current winner idea for the hierarchy representation is to keep all child qgroups as symlinks in the parent group. This does not require extra kojbect to keep, and the path in sysfs would reflect the hierarchy, like:
/sys/fs/btrfs/UUID/qgroups/4_1/3_1/2_1/1234_0
This tracks only the parent -> child pointers, so to see all parent qgroups one has to build the reverse graph or simply search which 1st level directories contain the group as child.
Implementation is one more sysfs_create_link, the leaf qgroups representing subvolumes will contain only the files with stats.
One potential drawback is the maximum size of path that will not allow to show deep qgroup hierarchies, but still about 200-400 in case of average qgroup id 20 or 10 respectively.
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
In reply to Qu WenruoQuoted 13 lines · Qu Wenruo
fs/btrfs/qgroup.c +5
-0@@ -1030,6 +1040,11 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)btrfs_abort_transaction (trans, ret); goto out_free_path; } + ret =btrfs_sysfs_add_one_qgroup (fs_info, qgroup); +if (ret <0 ) { +btrfs_abort_transaction (trans, ret); + goto out_free_path; + } } ret =btrfs_next_item (tree_root, path);if (ret <0 ) {
fs/btrfs/qgroup.c int btrfs_quota_enable(struct btrfs_fs_info *fs_info) · line 1076
Quoted 8 lines
fs/btrfs/qgroup.c +5
-0@@ -1054,6 +1069,11 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)btrfs_abort_transaction (trans, ret); goto out_free_path; } + ret =btrfs_sysfs_add_one_qgroup (fs_info, qgroup); +if (ret <0 ) { +btrfs_abort_transaction (trans, ret); + goto out_free_path; + }
This adds 2 new transaction abort sites altough I don't think it's justified, the filesystem is fine. If system is that low on memory it's gonna be very bad elsewhere too so we don't need to make things worse jsut because of some missing sysfs entries.
A warning would be better, though in that case the validity of the kobjects should be double checked where it's accessed.
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 19 lines · David Sterba
Quoted 18 lines · Qu Wenruo
fs/btrfs/qgroup.c +7
-0@@ -1030,6 +1040,11 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)btrfs_abort_transaction (trans, ret); goto out_free_path; } + ret =btrfs_sysfs_add_one_qgroup (fs_info, qgroup); +if (ret <0 ) { +btrfs_abort_transaction (trans, ret); + goto out_free_path; + } } ret =btrfs_next_item (tree_root, path);if (ret <0 ) {@@ -1054,6 +1069,11 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)btrfs_abort_transaction (trans, ret); goto out_free_path; } + ret =btrfs_sysfs_add_one_qgroup (fs_info, qgroup); +if (ret <0 ) {
Quoted 8 lines
fs/btrfs/qgroup.c int btrfs_quota_enable(struct btrfs_fs_info *fs_info) · line 1047
Quoted 3 lines
fs/btrfs/qgroup.c +3
-0+btrfs_abort_transaction (trans, ret); + goto out_free_path; + }This adds 2 new transaction abort sites altough I don't think it's justified, the filesystem is fine. If system is that low on memory it's gonna be very bad elsewhere too so we don't need to make things worse jsut because of some missing sysfs entries.
The problem here is, we don't have good enough way to revert back to previous status.
This is common among a lot of qgroup code, and I prefer to fix them later, as it will be a big qgroup error patch cleanup.
Quoted 4 lines
A warning would be better, though in that case the validity of the kobjects should be double checked where it's accessed.
It would be even worse if the qgroup relationship is also exported through sysfs.
In that case, warning is not good enough.
So I still prefer error path cleanup as the ultimate fix. The objective is, if we hit any error during qgroup enabling or other qgroup operations, we revert to previous status if possible.
For qgroup enable, if we hit any non-critical error, we don't abort trans at all, but remove all qgroups along with its qgroup items, remove the qgroup tree, then reverts back to qgroup disabled case. This includes -ENOMEM case.
While for critical error like tree operations errors, we still abort transaction.
In fact, I'm already working on a similar project, but for extent_changeset. So I guess it won't take too long for qgroup.
Thanks,
Qu
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
In reply to Qu WenruoHi Wenruo,
While testing my pending patches on top of linux-next, I encountered a bug that seems related to this patch during btrfs unmount. Specifically, a null pointer dereference in kobject_del inside btrfs_sysfs_del_qgroups from close_ctree.
The fix may be as simple as checking if the kobject is initialised, although perhaps it should always be initialised in this case, so I'll leave you to work out what the real issue is :-)
RIP: kobject_del+0x1/0x20
[...]
Call Trace:
btrfs_sysfs_del_qgroups+0xa5/0xe0
close_ctree+0x1cd/0x2c0
generic_shutdown_super+0x6c/0x100
kill_anon_super+0x14/0x30
btrfs_kill_super+0x12/0x20
deactivate_locked_super+0x36/0x90
cleanup_mnt+0x12d/0x190
task_work_run+0x5c/0x90
__prepare_exit_to_usermode+0x164/0x170
[...]Thanks,
Chris
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 10 lines · Chris Down
Hi Wenruo,
While testing my pending patches on top of linux-next, I encountered a bug that seems related to this patch during btrfs unmount. Specifically, a null pointer dereference in
kobject_delinsidebtrfs_sysfs_del_qgroupsfromclose_ctree.The fix may be as simple as checking if the kobject is initialised, although perhaps it should always be initialised in this case, so I'll leave you to work out what the real issue is :-)
Thank you very much for the report.
May I ask if the qgroup is enabled? Or qgroup is not enabled at all?
Thanks,
Qu
Quoted 21 lines
RIP: kobject_del+0x1/0x20[...]
Call Trace: btrfs_sysfs_del_qgroups+0xa5/0xe0 close_ctree+0x1cd/0x2c0 generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x36/0x90 cleanup_mnt+0x12d/0x190 task_work_run+0x5c/0x90 __prepare_exit_to_usermode+0x164/0x170[...]
Thanks,
Chris
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 6 lines · Qu Wenruo
Quoted 5 lines · Chris Down
While testing my pending patches on top of linux-next, I encountered a bug that seems related to this patch during btrfs unmount. Specifically, a null pointer dereference in
kobject_delinsidebtrfs_sysfs_del_qgroupsfromclose_ctree.
Quoted 7 lines
Quoted 3 lines
The fix may be as simple as checking if the kobject is initialised, although perhaps it should always be initialised in this case, so I'll leave you to work out what the real issue is :-)
Thank you very much for the report.
May I ask if the qgroup is enabled? Or qgroup is not enabled at all?
I have quotas disabled, so I assume qgroup is also implicitly disabled.
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
In reply to Qu WenruoQuoted 10 lines · Qu Wenruo
Quoted 7 lines · Chris Down
Hi Wenruo,
While testing my pending patches on top of linux-next, I encountered a bug that seems related to this patch during btrfs unmount. Specifically, a null pointer dereference in
kobject_delinsidebtrfs_sysfs_del_qgroupsfromclose_ctree.
Quoted 7 lines
Quoted 3 lines
The fix may be as simple as checking if the kobject is initialised, although perhaps it should always be initialised in this case, so I'll leave you to work out what the real issue is :-)
Thank you very much for the report.
May I ask if the qgroup is enabled? Or qgroup is not enabled at all?
BTW, after checking the code, it looks a little strange to me.
Firstly, both kobject_del and kobject_put() has extra check on NULL pointers, thus if fs_info->qgroups_kobj is NULL, it should do nothing and exit.
Secondly, the fs_info->qgroup_kobj is initialized to zero, by kvzalloc() in btrfs_mount_root().
Thus unless we modified it manually, it should always be NULL.
And for the locations modifying qgroups_kobj, it's either allocating it, in btrfs_sysfs_add_qgroups(), or removing it and set it back to NULL in btrfs_sysfs_del_qgroups().
Thus this looks pretty weird.
Would you please provide the full call trace (especially the address causing the NULL pointer deref) and the reproducer (if possible)?
Thanks,
Qu
Quoted 25 lines
Thanks,
QuQuoted 21 lines
RIP: kobject_del+0x1/0x20[...]
Call Trace: btrfs_sysfs_del_qgroups+0xa5/0xe0 close_ctree+0x1cd/0x2c0 generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x36/0x90 cleanup_mnt+0x12d/0x190 task_work_run+0x5c/0x90 __prepare_exit_to_usermode+0x164/0x170[...]
Thanks,
Chris
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 8 lines · Chris Down
Quoted 2 lines · Qu Wenruo
Would you please provide the full call trace (especially the address causing the NULL pointer deref) and the reproducer (if possible)?
I'll try to reproduce it again when I have time. I didn't have kdump set, and am not currently running linux-next, so until then, you can have this crappy photo that I rushed to take earlier before panic=30 took effect :-)
No problem, the image is already good enough for me to lookinto the case.
And the extra clue of linux-next would also help a lot.
Thank you very much again for the report,
Qu
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
In reply to a message not in the archiveQuoted 8 lines · Chris Down
Quoted 2 lines · Qu Wenruo
Would you please provide the full call trace (especially the address causing the NULL pointer deref) and the reproducer (if possible)?
I'll try to reproduce it again when I have time. I didn't have kdump set, and am not currently running linux-next, so until then, you can have this crappy photo that I rushed to take earlier before panic=30 took effect :-)
The linux-next is using an older version of that patch, which has a bad memory allocation inside atomic critical section.
If you're unlucky enough, it could cause various weird bugs. Thankfully, David has exposed it and the latest version in btrfs tree should have it fixed.
If you're uncertain if that's the case, feel free to try the latest misc-next branch to see if it's fixed.
https://github.com/kdave/btrfs-devel/tree/misc-next
Thanks for your report,
Qu
Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Quoted 12 lines · Qu Wenruo
Quoted 8 lines · Chris Down
Quoted 2 lines · Qu Wenruo
Would you please provide the full call trace (especially the address causing the NULL pointer deref) and the reproducer (if possible)?
I'll try to reproduce it again when I have time. I didn't have kdump set, and am not currently running linux-next, so until then, you can have this crappy photo that I rushed to take earlier before panic=30 took effect :-)
Quoted 6 lines
The linux-next is using an older version of that patch, which has a bad memory allocation inside atomic critical section.
If you're unlucky enough, it could cause various weird bugs. Thankfully, David has exposed it and the latest version in btrfs tree should have it fixed.
Great, thanks! When I run my tests again on linux-next I'll be sure to reapply the latest version of your patch first, then.
Thanks,
Chris