Yep, this flag is never set to anything but zero - even Irix looks that
way. The question is what should the flag mean - that we are in an
extent which goes beyond the end of file, it looks like that is the
intent.
Steve
On Fri, 2002-02-22 at 02:13, monkeyiq wrote:
> 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/
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: lord@xxxxxxx
|