]> 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)
commit9f99949938d30157e3ed6fa9ab44626605334fd9
treeae893ce479dfd9ae522322e890ef105fb7acd14a
parentcf35550c87b5bd1d55540d1ef146426081b9b60c
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