xfs
[Top] [All Lists]

bmv_oflags not being set

To: linux-xfs@xxxxxxxxxxx
Subject: bmv_oflags not being set
From: monkeyiq <monkeyiq@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Feb 2002 18:13:58 +1000
Cc: monkeyiq@xxxxxxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
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/


<Prev in Thread] Current Thread [Next in Thread>