diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-16 18:12:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-16 18:12:56 -0400 |
commit | a18f8775419d3df282dd83efdb51c5a64d092f31 (patch) | |
tree | 1e0abc5c1d30e8bc58dc23099017eca496992fd2 /fs/btrfs/btrfs_inode.h | |
parent | 3eb514866f20c5eb74637279774b6d73b855480a (diff) | |
parent | e02d48eaaed77f6c36916a7aa65c451e1f9d9aab (diff) |
Merge tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba:
"Highlights:
- chunks that have been trimmed and unchanged since last mount are
tracked and skipped on repeated trims
- use hw assissed crc32c on more arches, speedups if native
instructions or optimized implementation is available
- the RAID56 incompat bit is automatically removed when the last
block group of that type is removed
Fixes:
- fsync fix for reflink on NODATACOW files that could lead to ENOSPC
- fix data loss after inode eviction, renaming it, and fsync it
- fix fsync not persisting dentry deletions due to inode evictions
- update ctime/mtime/iversion after hole punching
- fix compression type validation (reported by KASAN)
- send won't be allowed to start when relocation is in progress, this
can cause spurious errors or produce incorrect send stream
Core:
- new tracepoints for space update
- tree-checker: better check for end of extents for some tree items
- preparatory work for more checksum algorithms
- run delayed iput at unlink time and don't push the work to cleaner
thread where it's not properly throttled
- wrap block mapping to structures and helpers, base for further
refactoring
- split large files, part 1:
- space info handling
- block group reservations
- delayed refs
- delayed allocation
- other cleanups and refactoring"
* tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (103 commits)
btrfs: fix memory leak of path on error return path
btrfs: move the subvolume reservation stuff out of extent-tree.c
btrfs: migrate the delalloc space stuff to it's own home
btrfs: migrate btrfs_trans_release_chunk_metadata
btrfs: migrate the delayed refs rsv code
btrfs: Evaluate io_tree in find_lock_delalloc_range()
btrfs: migrate the global_block_rsv helpers to block-rsv.c
btrfs: migrate the block-rsv code to block-rsv.c
btrfs: stop using block_rsv_release_bytes everywhere
btrfs: cleanup the target logic in __btrfs_block_rsv_release
btrfs: export __btrfs_block_rsv_release
btrfs: export btrfs_block_rsv_add_bytes
btrfs: move btrfs_block_rsv definitions into it's own header
btrfs: Simplify update of space_info in __reserve_metadata_bytes()
btrfs: unexport can_overcommit
btrfs: move reserve_metadata_bytes and supporting code to space-info.c
btrfs: move dump_space_info to space-info.c
btrfs: export block_rsv_use_bytes
btrfs: move btrfs_space_info_add_*_bytes to space-info.c
btrfs: move the space info update macro to space-info.h
...
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index d5b438706b77..f853835c409c 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
@@ -337,22 +337,34 @@ static inline void btrfs_inode_resume_unlocked_dio(struct btrfs_inode *inode) | |||
337 | clear_bit(BTRFS_INODE_READDIO_NEED_LOCK, &inode->runtime_flags); | 337 | clear_bit(BTRFS_INODE_READDIO_NEED_LOCK, &inode->runtime_flags); |
338 | } | 338 | } |
339 | 339 | ||
340 | /* Array of bytes with variable length, hexadecimal format 0x1234 */ | ||
341 | #define CSUM_FMT "0x%*phN" | ||
342 | #define CSUM_FMT_VALUE(size, bytes) size, bytes | ||
343 | |||
340 | static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode, | 344 | static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode, |
341 | u64 logical_start, u32 csum, u32 csum_expected, int mirror_num) | 345 | u64 logical_start, u8 *csum, u8 *csum_expected, int mirror_num) |
342 | { | 346 | { |
343 | struct btrfs_root *root = inode->root; | 347 | struct btrfs_root *root = inode->root; |
348 | struct btrfs_super_block *sb = root->fs_info->super_copy; | ||
349 | const u16 csum_size = btrfs_super_csum_size(sb); | ||
344 | 350 | ||
345 | /* Output minus objectid, which is more meaningful */ | 351 | /* Output minus objectid, which is more meaningful */ |
346 | if (root->root_key.objectid >= BTRFS_LAST_FREE_OBJECTID) | 352 | if (root->root_key.objectid >= BTRFS_LAST_FREE_OBJECTID) |
347 | btrfs_warn_rl(root->fs_info, | 353 | btrfs_warn_rl(root->fs_info, |
348 | "csum failed root %lld ino %lld off %llu csum 0x%08x expected csum 0x%08x mirror %d", | 354 | "csum failed root %lld ino %lld off %llu csum " CSUM_FMT " expected csum " CSUM_FMT " mirror %d", |
349 | root->root_key.objectid, btrfs_ino(inode), | 355 | root->root_key.objectid, btrfs_ino(inode), |
350 | logical_start, csum, csum_expected, mirror_num); | 356 | logical_start, |
357 | CSUM_FMT_VALUE(csum_size, csum), | ||
358 | CSUM_FMT_VALUE(csum_size, csum_expected), | ||
359 | mirror_num); | ||
351 | else | 360 | else |
352 | btrfs_warn_rl(root->fs_info, | 361 | btrfs_warn_rl(root->fs_info, |
353 | "csum failed root %llu ino %llu off %llu csum 0x%08x expected csum 0x%08x mirror %d", | 362 | "csum failed root %llu ino %llu off %llu csum " CSUM_FMT " expected csum " CSUM_FMT " mirror %d", |
354 | root->root_key.objectid, btrfs_ino(inode), | 363 | root->root_key.objectid, btrfs_ino(inode), |
355 | logical_start, csum, csum_expected, mirror_num); | 364 | logical_start, |
365 | CSUM_FMT_VALUE(csum_size, csum), | ||
366 | CSUM_FMT_VALUE(csum_size, csum_expected), | ||
367 | mirror_num); | ||
356 | } | 368 | } |
357 | 369 | ||
358 | #endif | 370 | #endif |