summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2018-12-03 10:20:35 -0500
committerDavid Sterba <dsterba@suse.com>2018-12-17 08:51:47 -0500
commit413df7252d5256df406a23d7efb679f46d19a23d (patch)
treec64980d392f57896c9d70cf0e561b47dd6e5d26e /fs/btrfs/ctree.h
parent4c8edbc75cb9ff846066cd9781ede4f27caf3cf4 (diff)
btrfs: add new flushing states for the delayed refs rsv
A nice thing we gain with the delayed refs rsv is the ability to flush the delayed refs on demand to deal with enospc pressure. Add states to flush delayed refs on demand, and this will allow us to remove a lot of ad-hoc work around checking to see if we should commit the transaction to run our delayed refs. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ab9d9ed20e0c..d07a23f15e22 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2765,10 +2765,12 @@ enum btrfs_reserve_flush_enum {
2765enum btrfs_flush_state { 2765enum btrfs_flush_state {
2766 FLUSH_DELAYED_ITEMS_NR = 1, 2766 FLUSH_DELAYED_ITEMS_NR = 1,
2767 FLUSH_DELAYED_ITEMS = 2, 2767 FLUSH_DELAYED_ITEMS = 2,
2768 FLUSH_DELALLOC = 3, 2768 FLUSH_DELAYED_REFS_NR = 3,
2769 FLUSH_DELALLOC_WAIT = 4, 2769 FLUSH_DELAYED_REFS = 4,
2770 ALLOC_CHUNK = 5, 2770 FLUSH_DELALLOC = 5,
2771 COMMIT_TRANS = 6, 2771 FLUSH_DELALLOC_WAIT = 6,
2772 ALLOC_CHUNK = 7,
2773 COMMIT_TRANS = 8,
2772}; 2774};
2773 2775
2774int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes); 2776int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes);