linux/fs/btrfs
Liu Bo 64ecdb647d Btrfs: add one more sanity check for shared ref type
Every shared ref has a parent tree block, which can be get from
btrfs_extent_inline_ref_offset().  And the tree block must be aligned
to the nodesize, so we'd know this inline ref is not valid if this
block's bytenr is not aligned to the nodesize, in which case, most
likely the ref type has been misused.

This adds the above mentioned check and also updates
print_extent_item() called by btrfs_print_leaf() to point out the
invalid ref while printing the tree structure.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-08-21 17:47:43 +02:00
..
tests btrfs: remove unused sectorsize member 2017-08-16 14:19:53 +02:00
acl.c btrfs: preserve i_mode if __btrfs_set_acl() fails 2017-08-21 17:47:42 +02:00
async-thread.c btrfs: constify tracepoint arguments 2017-08-16 14:19:53 +02:00
async-thread.h btrfs: constify tracepoint arguments 2017-08-16 14:19:53 +02:00
backref.c Btrfs: convert to use btrfs_get_extent_inline_ref_type 2017-08-21 17:47:43 +02:00
backref.h btrfs: backref, add tracepoints for prelim_ref insertion and merging 2017-08-16 16:12:01 +02:00
btrfs_inode.h btrfs: separate defrag and property compression 2017-08-16 16:12:05 +02:00
check-integrity.c btrfs: use appropriate define for the fsid 2017-08-18 16:36:29 +02:00
check-integrity.h
compression.c Btrfs: add skeleton code for compression heuristic 2017-08-16 16:12:04 +02:00
compression.h btrfs: remove unused BTRFS_COMPRESS_LAST 2017-08-18 16:36:29 +02:00
ctree.c btrfs: get fs_info from eb in btrfs_print_leaf, remove argument 2017-08-16 16:12:03 +02:00
ctree.h Btrfs: remove BUG() in btrfs_extent_inline_ref_size 2017-08-21 17:47:43 +02:00
dedupe.h
delayed-inode.c btrfs: increase ctx->pos for delayed dir index 2017-08-18 16:36:20 +02:00
delayed-inode.h
delayed-ref.c
delayed-ref.h
dev-replace.c btrfs: simplify btrfs_dev_replace_kthread 2017-08-16 16:12:03 +02:00
dev-replace.h
dir-item.c
disk-io.c btrfs: Do not use data_alloc_cluster in ssd mode 2017-08-21 17:47:42 +02:00
disk-io.h btrfs: use named constant for bdev blocksize 2017-08-16 16:12:04 +02:00
export.c
export.h
extent_io.c Btrfs: fix out of bounds array access while reading extent buffer 2017-08-21 17:47:14 +02:00
extent_io.h btrfs: struct-funcs, constify readers 2017-08-16 14:19:53 +02:00
extent_map.c
extent_map.h
extent-tree.c Btrfs: add one more sanity check for shared ref type 2017-08-21 17:47:43 +02:00
file-item.c
file.c btrfs: fix readdir deadlock with pagefault 2017-08-16 16:12:05 +02:00
free-space-cache.c btrfs: drop newlines from strings when using btrfs_* helpers 2017-08-16 16:12:02 +02:00
free-space-cache.h
free-space-tree.c
free-space-tree.h btrfs: expose internal free space tree routine only if sanity tests are enabled 2017-08-18 16:36:29 +02:00
hash.c
hash.h
inode-item.c
inode-map.c
inode-map.h
inode.c btrfs: Move skip checksum check from btrfs_submit_direct to __btrfs_submit_dio_bio 2017-08-18 16:36:29 +02:00
ioctl.c btrfs: Fix -EOVERFLOW handling in btrfs_ioctl_tree_search_v2 2017-08-18 16:36:29 +02:00
Kconfig
locking.c
locking.h
lzo.c
Makefile
math.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c Btrfs: add one more sanity check for shared ref type 2017-08-21 17:47:43 +02:00
print-tree.h btrfs: get fs_info from eb in btrfs_print_tree, remove argument 2017-08-16 16:12:03 +02:00
props.c btrfs: prepare for extensions in compression options 2017-08-16 16:12:05 +02:00
props.h
qgroup.c btrfs: drop newlines from strings when using btrfs_* helpers 2017-08-16 16:12:02 +02:00
qgroup.h
raid56.c Merge branch 'for-4.13-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux 2017-07-14 22:55:52 -07:00
raid56.h
rcu-string.h
reada.c
relocation.c Btrfs: remove BUG_ON in __add_tree_block 2017-08-21 17:47:43 +02:00
root-tree.c btrfs: get fs_info from eb in btrfs_print_leaf, remove argument 2017-08-16 16:12:03 +02:00
scrub.c btrfs: scrub: simplify scrub worker initialization 2017-08-21 17:47:42 +02:00
send.c Btrfs: incremental send, fix emission of invalid clone operations 2017-08-21 17:47:42 +02:00
send.h
struct-funcs.c btrfs: struct-funcs, constify readers 2017-08-16 14:19:53 +02:00
super.c btrfs: Do not use data_alloc_cluster in ssd mode 2017-08-21 17:47:42 +02:00
sysfs.c
sysfs.h
transaction.c
transaction.h
tree-defrag.c
tree-log.c btrfs: Remove extra parentheses from condition in copy_items() 2017-08-21 17:47:42 +02:00
tree-log.h
ulist.c
ulist.h
uuid-tree.c
volumes.c btrfs: Remove extraneous chunk_objectid variable 2017-08-21 17:47:42 +02:00
volumes.h btrfs: Remove unused sectorsize variable from struct map_lookup 2017-08-18 16:36:29 +02:00
xattr.c
xattr.h
zlib.c