summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2019-04-22 15:07:31 +0200
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:52 +0200
commit51d470aeaa3a4ac5bdf98743ac1d32008e8dafa4 (patch)
tree9428c09bab978a904767d79f5334609be3dd1307 /fs/btrfs/file-item.c
parentBtrfs: improve performance on fsync of files with multiple hardlinks (diff)
downloadlinux-51d470aeaa3a4ac5bdf98743ac1d32008e8dafa4.tar.xz
linux-51d470aeaa3a4ac5bdf98743ac1d32008e8dafa4.zip
btrfs: Document btrfs_csum_one_bio
Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/file-item.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 5a3be16ca93d..d431ea8198e4 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -413,6 +413,16 @@ fail:
return ret;
}
+/*
+ * btrfs_csum_one_bio - Calculates checksums of the data contained inside a bio
+ * @inode: Owner of the data inside the bio
+ * @bio: Contains the data to be checksummed
+ * @file_start: offset in file this bio begins to describe
+ * @contig: Boolean. If true/1 means all bio vecs in this bio are
+ * contiguous and they begin at @file_start in the file. False/0
+ * means this bio can contains potentially discontigous bio vecs
+ * so the logical offset of each should be calculated separately.
+ */
blk_status_t btrfs_csum_one_bio(struct inode *inode, struct bio *bio,
u64 file_start, int contig)
{