[Btrfs-devel][PATCH]Minor fix for btrfs_csum_file_block.
Yan Zheng
yanzheng at 21cn.com
Mon Oct 29 16:13:46 PDT 2007
2007/10/30, Chris Mason <chris.mason at oracle.com>:
> I made one small change here:
> > @@ -238,7 +236,7 @@ insert:
> > csum_offset = 0;
> > if (found_next) {
> > u64 tmp = min((u64)i_size_read(inode), next_offset);
> > - tmp -= offset + root->sectorsize - 1;
> > + tmp -= offset - root->sectorsize + 1;
> tmp -= offset & ~((u64)root->sectorsize - 1);
'offset' is already aligned to sector size, so this line is
equivalent to 'tmp -= offset'. I think it's better change this line
to 'tmp = tmp - offset + root->sectorsize - 1'
Regards
YZ
More information about the Btrfs-devel
mailing list