[btrfs-devel]A question about extent buffer codes

Yan Zheng yanzheng at 21cn.com
Tue Oct 16 05:32:21 PDT 2007


Hello

Some xxx_extent_buffer functions have codes like:
-- 
offset = dst_offset & ((unsigned long)PAGE_CACHE_SIZE - 1);
if (i == 0)
	offset += start_offset;

I can't understand why these is a test.  I feel the variable 'offset'
should be computed by code like:
--
 offset = (dst_offset + start_offset) & ((unsigned long)PAGE_CACHE_SIZE - 1);

Thanks
YZ



More information about the Btrfs-devel mailing list