Skip to contentSkip to conversation

TAKE 966503 - Kill off xfs_count_bits

DISCUSSION David Chinner 1 participant 1 message Jun 20, 2007

lore
Share & tools
lore
#0 lore raw

Kill off xfs_count_bits

xfs_count_bits is only called once, and is then compared to 0. IOW, what it really wants to know is, is the bitmap empty. This can be done more simply, certainly.

Date:  Wed Jun 20 14:16:30 AEST 2007
Workarea:  chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by:  [email protected]

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

Modid: xfs-linux-melb:xfs-kern:28944a fs/xfs/xfs_buf_item.c - 1.162 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_buf_item.c.diff?r1=text&tr1=1.162&r2=text&tr2=1.161&f=h
- Use xfs_bitmap_empty instead of xfs_count_bits to determine if the buf item is clean.

fs/xfs/xfs_bit.h - 1.20 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bit.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h
- xfs_count_bits is not really used to count bits, just to determine if the bitmap is empty or not. Replace it with a function that does just that.

fs/xfs/xfs_bit.c - 1.31 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bit.c.diff?r1=text&tr1=1.31&r2=text&tr2=1.30&f=h
- xfs_count_bits is not really used to count bits, just to determine if the bitmap is empty or not. Replace it with a function that does just that.