summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2017-02-13 15:35:09 -0800
committerDavid Sterba <dsterba@suse.com>2017-02-17 12:03:48 +0100
commit1af4a0aaa5d4bfcd17020f0620017a3057a9fb8d (patch)
treecc2ae71ae332926dd0083896993496ba82683894 /fs/btrfs/inode.c
parent6f9994dbabe5756df1922d84a568cbff74ae1323 (diff)
downloadop-kernel-dev-1af4a0aaa5d4bfcd17020f0620017a3057a9fb8d.zip
op-kernel-dev-1af4a0aaa5d4bfcd17020f0620017a3057a9fb8d.tar.gz
Btrfs: specify a new ordered extent type for create_io_em
As 0 refers to an existing type BTRFS_ORDERED_IO_DONE, this specifies a new type 'REGULAR' for regular IO. 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/inode.c')
-rw-r--r--fs/btrfs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b37b062..151d192 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -991,7 +991,7 @@ static noinline int cow_file_range(struct inode *inode,
ins.offset, /* orig_block_len */
ram_size, /* ram_bytes */
BTRFS_COMPRESS_NONE, /* compress_type */
- 0 /* type */);
+ BTRFS_ORDERED_REGULAR /* type */);
if (IS_ERR(em))
goto out_reserve;
free_extent_map(em);
@@ -7506,7 +7506,7 @@ static struct extent_map *create_io_em(struct inode *inode, u64 start, u64 len,
ASSERT(type == BTRFS_ORDERED_PREALLOC ||
type == BTRFS_ORDERED_COMPRESSED ||
type == BTRFS_ORDERED_NOCOW ||
- type == 0);
+ type == BTRFS_ORDERED_REGULAR);
em_tree = &BTRFS_I(inode)->extent_tree;
em = alloc_extent_map();
@@ -7523,9 +7523,9 @@ static struct extent_map *create_io_em(struct inode *inode, u64 start, u64 len,
em->ram_bytes = ram_bytes;
em->generation = -1;
set_bit(EXTENT_FLAG_PINNED, &em->flags);
- if (type == BTRFS_ORDERED_PREALLOC)
+ if (type == BTRFS_ORDERED_PREALLOC) {
set_bit(EXTENT_FLAG_FILLING, &em->flags);
- else if (type == BTRFS_ORDERED_COMPRESSED) {
+ } else if (type == BTRFS_ORDERED_COMPRESSED) {
set_bit(EXTENT_FLAG_COMPRESSED, &em->flags);
em->compress_type = compress_type;
}
OpenPOWER on IntegriCloud