Thread (16 messages) 16 messages, 2 authors, 2017-08-21

Re: [PATCH v3 7/7] Btrfs: add one more sanity check for shared ref type

From: David Sterba <hidden>
Date: 2017-08-21 15:01:58

On Fri, Aug 18, 2017 at 03:15:24PM -0600, Liu Bo wrote:
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 <redacted>
Reviewed-by: David Sterba <dsterba@suse.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help