OSDN Git Service

btrfs: be more explicit about allowed flush states
authorJosef Bacik <josef@toxicpanda.com>
Wed, 21 Nov 2018 19:03:12 +0000 (14:03 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:13:35 +0000 (14:13 +0100)
commit8a1bbe1d5cba415c771fe5ff68b83b93701c1d7f
treeb92b2b2f52ec69e177df6d227f975152fe4ed1b9
parent5df1136363cabc4d3f92fc91e3f92bd6a5eebd27
btrfs: be more explicit about allowed flush states

For FLUSH_LIMIT flushers we really can only allocate chunks and flush
delayed inode items, everything else is problematic.  I added a bunch of
new states and it lead to weirdness in the FLUSH_LIMIT case because I
forgot about how it worked.  So instead explicitly declare the states
that are ok for flushing with FLUSH_LIMIT and use that for our state
machine.  Then as we add new things that are safe we can just add them
to this list.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c