]> git.hungrycats.org Git - linux/commit
Btrfs: fill relocation block rsv after allocation
authorJosef Bacik <jbacik@fb.com>
Fri, 27 May 2016 17:08:26 +0000 (13:08 -0400)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 17 Aug 2016 02:10:00 +0000 (22:10 -0400)
commit8d772e1197df3f7e1b2d46170f70066101afa887
tree0c61c2424345ff9468b2840b34f20b8041ecb136
parent7768b7ed281485dbac9d5c4ad067388f91792a11
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>
(cherry picked from commit ac2fabac4211431b607b326c2233e73b81e86af2)
fs/btrfs/relocation.c