On 3/16/18 2:48 PM, Nikolay Borisov wrote: > > > On 16.03.2018 20:36, [email protected] wrote: >> From: Jeff Mahoney <[email protected]> >> >> While running btrfs/011, I hit the following lockdep splat. >> >> This is the important bit: >> pcpu_alloc+0x1ac/0x5e0 >> __percpu_counter_init+0x4e/0xb0 >> btrfs_init_fs_root+0x99/0x1c0 [btrfs] >> btrfs_get_fs_root.part.54+0x5b/0x150 [btrfs] >> resolve_indirect_refs+0x130/0x830 [btrfs] >> find_parent_nodes+0x69e/0xff0 [btrfs] >> btrfs_find_all_roots_safe+0xa0/0x110 [btrfs] >> btrfs_find_all_roots+0x50/0x70 [btrfs] >> btrfs_qgroup_prepare_account_extents+0x53/0x90 [btrfs] >> btrfs_commit_transaction+0x3ce/0x9b0 [btrfs] >> >> The percpu_counter_init call in btrfs_alloc_subvolume_writers >> uses GFP_KERNEL, which we can't do during transaction commit. >> >> This switches it to GFP_NOFS. > > Given there is effort underway to actually kill GFP_NOFS and replace it > with the context annotation routines, shouldn't instead use those > routines directly ?
I don't think those have landed yet. When they do, it should obsolete the gfp flags here in any context since we can also read roots from code that doesn't need GFP_NOFS. -Jeff -- Jeff Mahoney SUSE Labs
signature.asc
Description: OpenPGP digital signature
