diff options
author | David Sterba <dsterba@suse.com> | 2017-02-17 15:27:44 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 14:29:24 +0100 |
commit | 4d53dddbec671bcb64a936a3d2b7bf1ce2252ed0 (patch) | |
tree | 332a2d50116a1842e1b205f5137abce8ea606628 /fs/btrfs/disk-io.c | |
parent | c3988d630a4dfec5c09f2b6496734f320949ea9c (diff) | |
download | op-kernel-dev-4d53dddbec671bcb64a936a3d2b7bf1ce2252ed0.zip op-kernel-dev-4d53dddbec671bcb64a936a3d2b7bf1ce2252ed0.tar.gz |
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 67d663a..60d4f1b 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) } static const struct extent_io_ops btree_extent_io_ops = { - .readpage_end_io_hook = btree_readpage_end_io_hook, - .readpage_io_failed_hook = btree_io_failed_hook, + /* mandatory callbacks */ .submit_bio_hook = btree_submit_bio_hook, + .readpage_end_io_hook = btree_readpage_end_io_hook, /* note we're sharing with inode.c for the merge bio hook */ .merge_bio_hook = btrfs_merge_bio_hook, + + /* optional callbacks */ + .readpage_io_failed_hook = btree_io_failed_hook, }; |