xfs: buffer type overruns blf_flags field
authorDave Chinner <dchinner@redhat.com>
Wed, 3 Apr 2013 05:11:30 +0000 (16:11 +1100)
committerBen Myers <bpm@sgi.com>
Sat, 27 Apr 2013 18:01:58 +0000 (13:01 -0500)
commit61fe135c1dde112f483bba01d645debd881b5428
tree6ec57ed9730f555b29b94aeb6983b4ddbebffe51
parentd75afeb3d302019527331520a2632b6614425b40
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>
14 files changed:
fs/xfs/xfs_alloc.c
fs/xfs/xfs_attr_leaf.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_btree.c
fs/xfs/xfs_buf_item.h
fs/xfs/xfs_da_btree.c
fs/xfs/xfs_dir2_block.c
fs/xfs/xfs_dir2_data.c
fs/xfs/xfs_dir2_leaf.c
fs/xfs/xfs_dir2_node.c
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_trans.h
fs/xfs/xfs_trans_buf.c