Hi guys, Looks like that current code does GFP_KERNEL allocation inside __link_block_group. the function invokes kobject_add and internally creates sysfs files with the GFP_KERNEL flag set. But since do_chunk_alloc executes insides the btrfs transaction it's not allowed to sleep.
Thanks!