diff options
author | Chris Mason <clm@fb.com> | 2017-02-28 17:35:09 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2017-02-28 17:35:09 -0500 |
commit | e9f467d028cd7d8bee2a4d6c4fb806caf8cd580b (patch) | |
tree | e0a2b8e21ed58952c13e6d1dc3646eecd1ea211e /fs/btrfs/disk-io.c | |
parent | ef6ebf324216eaea95ff30da5a8e78e2a4311eba (diff) | |
parent | 20a7db8ab3f2057a518448b1728d504ffadef65e (diff) |
Merge branch 'for-chris-4.11-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.11
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 32a9ec11888d..73fdc6bdaea9 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -219,12 +219,12 @@ void btrfs_set_buffer_lockdep_class(u64 objectid, struct extent_buffer *eb, | |||
219 | * extents on the btree inode are pretty simple, there's one extent | 219 | * extents on the btree inode are pretty simple, there's one extent |
220 | * that covers the entire device | 220 | * that covers the entire device |
221 | */ | 221 | */ |
222 | static struct extent_map *btree_get_extent(struct inode *inode, | 222 | static struct extent_map *btree_get_extent(struct btrfs_inode *inode, |
223 | struct page *page, size_t pg_offset, u64 start, u64 len, | 223 | struct page *page, size_t pg_offset, u64 start, u64 len, |
224 | int create) | 224 | int create) |
225 | { | 225 | { |
226 | struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); | 226 | struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); |
227 | struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; | 227 | struct extent_map_tree *em_tree = &inode->extent_tree; |
228 | struct extent_map *em; | 228 | struct extent_map *em; |
229 | int ret; | 229 | int ret; |
230 | 230 | ||
@@ -265,7 +265,7 @@ out: | |||
265 | return em; | 265 | return em; |
266 | } | 266 | } |
267 | 267 | ||
268 | u32 btrfs_csum_data(char *data, u32 seed, size_t len) | 268 | u32 btrfs_csum_data(const char *data, u32 seed, size_t len) |
269 | { | 269 | { |
270 | return btrfs_crc32c(seed, data, len); | 270 | return btrfs_crc32c(seed, data, len); |
271 | } | 271 | } |
@@ -3453,7 +3453,7 @@ static int write_dev_supers(struct btrfs_device *device, | |||
3453 | btrfs_set_super_bytenr(sb, bytenr); | 3453 | btrfs_set_super_bytenr(sb, bytenr); |
3454 | 3454 | ||
3455 | crc = ~(u32)0; | 3455 | crc = ~(u32)0; |
3456 | crc = btrfs_csum_data((char *)sb + | 3456 | crc = btrfs_csum_data((const char *)sb + |
3457 | BTRFS_CSUM_SIZE, crc, | 3457 | BTRFS_CSUM_SIZE, crc, |
3458 | BTRFS_SUPER_INFO_SIZE - | 3458 | BTRFS_SUPER_INFO_SIZE - |
3459 | BTRFS_CSUM_SIZE); | 3459 | BTRFS_CSUM_SIZE); |
@@ -4658,9 +4658,12 @@ static int btrfs_cleanup_transaction(struct btrfs_fs_info *fs_info) | |||
4658 | } | 4658 | } |
4659 | 4659 | ||
4660 | static const struct extent_io_ops btree_extent_io_ops = { | 4660 | static const struct extent_io_ops btree_extent_io_ops = { |
4661 | .readpage_end_io_hook = btree_readpage_end_io_hook, | 4661 | /* mandatory callbacks */ |
4662 | .readpage_io_failed_hook = btree_io_failed_hook, | ||
4663 | .submit_bio_hook = btree_submit_bio_hook, | 4662 | .submit_bio_hook = btree_submit_bio_hook, |
4663 | .readpage_end_io_hook = btree_readpage_end_io_hook, | ||
4664 | /* note we're sharing with inode.c for the merge bio hook */ | 4664 | /* note we're sharing with inode.c for the merge bio hook */ |
4665 | .merge_bio_hook = btrfs_merge_bio_hook, | 4665 | .merge_bio_hook = btrfs_merge_bio_hook, |
4666 | .readpage_io_failed_hook = btree_io_failed_hook, | ||
4667 | |||
4668 | /* optional callbacks */ | ||
4666 | }; | 4669 | }; |