diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-10-09 09:28:20 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-02-08 22:58:58 +0100 |
commit | 5deb17e18e27a3502f21581ba4d086e762b86b31 (patch) | |
tree | e42ea3752a860bc9f209527bfaeb76703fa67883 /fs/btrfs/ctree.h | |
parent | ac1ea10e757a57fb61512ae9beb2ef67e5340e31 (diff) | |
download | linux-5deb17e18e27a3502f21581ba4d086e762b86b31.tar.gz linux-5deb17e18e27a3502f21581ba4d086e762b86b31.tar.bz2 linux-5deb17e18e27a3502f21581ba4d086e762b86b31.zip |
btrfs: track ordered bytes instead of just dio ordered bytes
We track dio_bytes because the shrink delalloc code needs to know if we
have more DIO in flight than we have normal buffered IO. The reason for
this is because we can't "flush" DIO, we have to just wait on the
ordered extents to finish.
However this is true of all ordered extents. If we have more ordered
space outstanding than dirty pages we should be waiting on ordered
extents. We already are ok on this front technically, because we always
do a FLUSH_DELALLOC_WAIT loop, but I want to use the ordered counter in
the preemptive flushing code as well, so change this to count all
ordered bytes instead of just DIO ordered bytes.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ed6bb46a2572..7d8660227520 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -797,7 +797,7 @@ struct btrfs_fs_info { /* used to keep from writing metadata until there is a nice batch */ struct percpu_counter dirty_metadata_bytes; struct percpu_counter delalloc_bytes; - struct percpu_counter dio_bytes; + struct percpu_counter ordered_bytes; s32 dirty_metadata_batch; s32 delalloc_batch; |