]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fill relocation block rsv after allocation
authorJosef Bacik <jbacik@fb.com>
Fri, 27 May 2016 17:08:26 +0000 (13:08 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jul 2016 16:45:53 +0000 (18:45 +0200)
commit1637bc177494ace02e02b259086596b536b24812
treeae893ce479dfd9ae522322e890ef105fb7acd14a
parentc343aa532bbb6bcb7c27008dd6fc71ee4800c44b
Btrfs: fill relocation block rsv after allocation

Since we set the reloc control before we've reserved our space for relocation we
could race with a root being dirtied and not actually have space to do our init
reloc root.  So once we've allocated it and set it up go ahead and make our
reservation before setting the relocate control, that way anybody who tries to
do the reloc root init has space to use.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c