aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2023-01-21 07:49:59 +0100
committerDavid Sterba <[email protected]>2023-02-15 19:38:50 +0100
commite0cfbb2ccabbeaea9e6b3b203d83edca49c702b2 (patch)
treedeed2bdf1d731ffc71bb7bea6ed3fff7fdf18f49
parentfd8f8ede239bc0531aca65f408ecf44d6755c558 (diff)
btrfs: better document struct btrfs_bio
Update the comments on btrfs_bio to better describe the structure. Reviewed-by: Anand Jain <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
-rw-r--r--fs/btrfs/bio.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h
index b12f84b3b341..baaa27961cc8 100644
--- a/fs/btrfs/bio.h
+++ b/fs/btrfs/bio.h
@@ -26,9 +26,8 @@ struct btrfs_fs_info;
typedef void (*btrfs_bio_end_io_t)(struct btrfs_bio *bbio);
/*
- * Additional info to pass along bio.
- *
- * Mostly for btrfs specific features like csum and mirror_num.
+ * Highlevel btrfs I/O structure. It is allocated by btrfs_bio_alloc and
+ * passed to btrfs_submit_bio for mapping to the physical devices.
*/
struct btrfs_bio {
unsigned int mirror_num:7;
@@ -42,7 +41,7 @@ struct btrfs_bio {
unsigned int is_metadata:1;
struct bvec_iter iter;
- /* for direct I/O */
+ /* File offset that this I/O operates on. */
u64 file_offset;
/* @device is for stripe IO submission. */
@@ -62,7 +61,7 @@ struct btrfs_bio {
btrfs_bio_end_io_t end_io;
void *private;
- /* For read end I/O handling */
+ /* For internal use in read end I/O handling */
struct work_struct end_io_work;
/*