diff options
author | David Sterba <dsterba@suse.com> | 2017-02-17 09:27:44 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 08:29:24 -0500 |
commit | 4d53dddbec671bcb64a936a3d2b7bf1ce2252ed0 (patch) | |
tree | 332a2d50116a1842e1b205f5137abce8ea606628 /fs/btrfs/disk-io.c | |
parent | c3988d630a4dfec5c09f2b6496734f320949ea9c (diff) |
btrfs: document existence of extent_io ops callbacks
Some of the callbacks defined in btree_extent_io_ops and
btrfs_extent_io_ops do always exist so we don't need to check the
existence before each call. This patch just reorders the definition and
documents which are mandatory/optional.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 67d663ab658a..60d4f1b210d7 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -4653,9 +4653,12 @@ static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info) | |||
4653 | } | 4653 | } |
4654 | 4654 | ||
4655 | static const struct extent_io_ops btree_extent_io_ops = { | 4655 | static const struct extent_io_ops btree_extent_io_ops = { |
4656 | .readpage_end_io_hook = btree_readpage_end_io_hook, | 4656 | /* mandatory callbacks */ |
4657 | .readpage_io_failed_hook = btree_io_failed_hook, | ||
4658 | .submit_bio_hook = btree_submit_bio_hook, | 4657 | .submit_bio_hook = btree_submit_bio_hook, |
4658 | .readpage_end_io_hook = btree_readpage_end_io_hook, | ||
4659 | /* note we're sharing with inode.c for the merge bio hook */ | 4659 | /* note we're sharing with inode.c for the merge bio hook */ |
4660 | .merge_bio_hook = btrfs_merge_bio_hook, | 4660 | .merge_bio_hook = btrfs_merge_bio_hook, |
4661 | |||
4662 | /* optional callbacks */ | ||
4663 | .readpage_io_failed_hook = btree_io_failed_hook, | ||
4661 | }; | 4664 | }; |