diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-02-23 13:53:25 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-03-16 17:02:44 +0100 |
commit | 5613d32e75fe6f55e1c41f86389624b46a9ef5a7 (patch) | |
tree | c719630163dae19f89f7bc84b434e67df44ded10 /ctree.h | |
parent | e8d2163e06e82dcc0f0987006fc08ecea08bc896 (diff) |
btrfs-progs: file: Introduce function to read out file content
Introduce a new function, btrfs_read_file(), to read out data of a file
inode.
This function will iterate through EXTENT_DATA items and handle
inline/prealloc/hole file extents.
Compression is not supported yet.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.h')
-rw-r--r-- | ctree.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2776,4 +2776,7 @@ int btrfs_get_extent(struct btrfs_trans_handle *trans, int btrfs_punch_hole(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 ino, u64 offset, u64 len); +int btrfs_read_file(struct btrfs_root *root, u64 ino, u64 start, u64 len, + char *dest); + #endif |