[btrfs-devel]A question about extent buffer codes

Yan Zheng
2007-10-16T05:32:31Z

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