aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2020-06-24 18:03:11 +0200
committerTom Rini <trini@konsulko.com>2020-09-07 21:00:36 -0400
commite3427184f38a3a5d2ac9a3c200a5c3fc17592ec6 (patch)
treeaa3021bacba25f9a905ad668ef8ad2136bdd7687 /fs/btrfs/btrfs.h
parent01347f64d5f86ae467141550f84ed0f97415a9ff (diff)
fs: btrfs: Implement btrfs_file_read()
This version of btrfs_file_read() has the following new features: - Tries all mirrors - More handling on unaligned size - Better compressed extent handling The old implementation doesn't handle compressed extent with offset properly: we need to read out the whole compressed extent, then decompress the whole extent, and only then copy the requested part. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'fs/btrfs/btrfs.h')
-rw-r--r--fs/btrfs/btrfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h
index 32ea2fc53aa..268ca077d96 100644
--- a/fs/btrfs/btrfs.h
+++ b/fs/btrfs/btrfs.h
@@ -59,6 +59,8 @@ int btrfs_readlink(struct btrfs_root *root, u64 ino, char *target);
u64 __btrfs_lookup_path(struct __btrfs_root *, u64, const char *, u8 *,
struct btrfs_inode_item *, int);
u64 __btrfs_file_read(const struct __btrfs_root *, u64, u64, u64, char *);
+int btrfs_file_read(struct btrfs_root *root, u64 ino, u64 file_offset, u64 len,
+ char *dest);
/* subvolume.c */
u64 btrfs_get_default_subvol_objectid(void);