btrfs: add ram_bytes and offset to btrfs_ordered_extent
authorOmar Sandoval <osandov@fb.com>
Wed, 6 Nov 2019 20:11:56 +0000 (12:11 -0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 15 Feb 2022 15:54:49 +0000 (16:54 +0100)
commitba069f1fdae3d3d1e1cf25aa281c816d82bd4fe2
treecfeee71f2bc7a28a2f06735458fc76625bf69627
parent987a6fef9b85885204a07facac21f3c3fadc8289
btrfs: add ram_bytes and offset to btrfs_ordered_extent

Currently, we only create ordered extents when ram_bytes == num_bytes
and offset == 0. However, BTRFS_IOC_ENCODED_WRITE writes may create
extents which only refer to a subset of the full unencoded extent, so we
need to plumb these fields through the ordered extent infrastructure and
pass them down to insert_reserved_file_extent().

Since we're changing the btrfs_add_ordered_extent* signature, let's get
rid of the trivial wrappers and add a kernel-doc.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h