Skip to contentSkip to conversation

TAKE 958639 - xfs buftarg flags are almost broken

DISCUSSION David Chinner 1 participant 1 message Nov 29, 2006

lore
Share & tools
lore
#0 lore raw

Current usage of buftarg flags is incorrect.

The {test,set,clear}_bit() operations take a bit index for the bit to operate on. The XBT_* flags are defined as bit fields which is incorrect, not to mention the way the bit fields are enumerated is broken too. This was only working by chance.

Fix the definitions of the flags and make the code using them use the {test,set,clear}_bit() operations correctly.

Date:  Wed Nov 29 14:32:56 AEDT 2006
Workarea:  chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by:  tes

The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb

Modid: xfs-linux-melb:xfs-kern:27565a fs/xfs/linux-2.6/xfs_buf.h - 1.118 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_buf.h.diff?r1=text&tr1=1.118&r2=text&tr2=1.117&f=h
- Fix enumeration of xfs_buftarg_flags_t to declare bit indexes rather than bit fields as required by test_bit() and friends.

fs/xfs/linux-2.6/xfs_buf.c - 1.231 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_buf.c.diff?r1=text&tr1=1.231&r2=text&tr2=1.230&f=h
- Set bt_flags appropriately for delwri list flushing rather than abusing flag indexes.