]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_dir2_block.c
xfs: buffer type overruns blf_flags field
authorDave Chinner <dchinner@redhat.com>
Fri, 7 Jun 2013 00:25:42 +0000 (10:25 +1000)
committerBen Myers <bpm@sgi.com>
Tue, 6 Aug 2013 19:04:09 +0000 (14:04 -0500)
commitbdc16ee528513e684c98ed7f31e2cc0cf544948f
treeee3515b6b7c1c475cc71a50652397a3d0a5246b6
parent8b4dc4a965a681fd4b5564f568c3e81ac12b1494
xfs: buffer type overruns blf_flags field

The buffer type passed to log recvoery in the buffer log item
overruns the blf_flags field. I had assumed that flags field was a
32 bit value, and it turns out it is a unisgned short. Therefore
having 19 flags doesn't really work.

Convert the buffer type field to numeric value, and use the top 5
bits of the flags field for it. We currently have 17 types of
buffers, so using 5 bits gives us plenty of room for expansion in
future....

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
13 files changed:
include/xfs_buf_item.h
include/xfs_trans.h
libxfs/trans.c
libxfs/xfs_alloc.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_bmap.c
libxfs/xfs_btree.c
libxfs/xfs_da_btree.c
libxfs/xfs_dir2_block.c
libxfs/xfs_dir2_data.c
libxfs/xfs_dir2_leaf.c
libxfs/xfs_dir2_node.c
libxfs/xfs_ialloc.c