diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2017-09-13 12:18:22 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-10-30 12:27:56 +0100 |
commit | 18fdc67900c5bfd1eeb41cfa50ea6f2eb7266f73 (patch) | |
tree | fcfa26b0ddb1e771da0177539d4bbc1d13f7496d /fs/btrfs/extent_io.h | |
parent | 6300463b14c1c2665674eb8f15843e5bb7a7ff84 (diff) | |
download | linux-stable-18fdc67900c5bfd1eeb41cfa50ea6f2eb7266f73.tar.gz linux-stable-18fdc67900c5bfd1eeb41cfa50ea6f2eb7266f73.tar.bz2 linux-stable-18fdc67900c5bfd1eeb41cfa50ea6f2eb7266f73.zip |
Btrfs: remove bio_flags which indicates a meta block of log-tree
Since both committing transaction and writing log-tree are doing
plugging on metadata IO, we can unify to use %sync_writers to benefit
both cases, instead of checking bio_flags while writing meta blocks of
log-tree.
We can remove this bio_flags because in order to write dirty blocks,
log tree also uses btrfs_write_marked_extents(), inside which we
have enabled %sync_writers, therefore, every write goes in a
synchronous way, so does checksuming.
Please also note that, bio_flags is applied per-context while
%sync_writers is applied per-inode, so this might incur some overhead, ie.
1) while log tree is flushing its dirty blocks via
btrfs_write_marked_extents(), in which %sync_writers is increased
by one.
2) in the meantime, some writeback operations may happen upon btrfs's
metadata inode, so these writes go synchronously, too.
However, AFAICS, the overhead is not a big one while the win is that
we unify the two places that needs synchronous way and remove a
special hack/flag.
This removes the bio_flags related stuff for writing log-tree.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index faffa28ba707..861dacb371c7 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -33,7 +33,6 @@ * type for this bio */ #define EXTENT_BIO_COMPRESSED 1 -#define EXTENT_BIO_TREE_LOG 2 #define EXTENT_BIO_FLAG_SHIFT 16 /* these are bit numbers for test/set bit */ |