[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bmv_oflags not being set



Hi,
  I emailed this a few weeks ago, but now took a little more
of an aggresive attack on the problem and found that from what I
can tell BMV_OF_PREALLOC is never set from the linux/fs/xfs kernel
calls. Indeed a 
xfs]$ find . -type f -exec grep BMV_OF_PREALLOC {} \;
fails to see anything in the kernel code using that value.


in /usr/include/xfs_fs.h #line:133
/*	bmv_oflags values - returned for for each non-header segment */
#define BMV_OF_PREALLOC		0x1	/* segment = unwritten pre-allocation */

and I had monstered my private xfs_bmap to output the 
printf(" bmv_oflags=\"%lld\" ", map[i+1].bmv_oflags);
which are always == 0;

It seems that from line 5759 in fs/xfs/xfs_bmap.c
		if (   prealloced
		    && map[i].br_startblock == HOLESTARTBLOCK
		    && out.bmv_offset + out.bmv_length == bmvend) {
			/*
			 * came to hole at end of file
			 */
			goto unlock_and_return;
		} else {
that just before the goto maybe 
if( interface & BMV_IF_PREALLOC )
        bmv->bmv_oflags |= BMV_OF_PREALLOC;

though I have not looked very deeply at the code, it definately 
seems to be a bug that the oflags are not being set.

-- 
-----------------------------------------------------
http://witme.sourceforge.net/libferris.web/