found:
csum_result = btrfs_csum_data(root, data, csum_result, len);
btrfs_csum_final(csum_result, (char *)&csum_result);
+ if (csum_result == 0) {
+ printk("csum result is 0 for inode %lu offset %Lu\n", inode->i_ino, offset);
+ }
+
write_extent_buffer(leaf, &csum_result, (unsigned long)item,
BTRFS_CRC32_SIZE);
btrfs_mark_buffer_dirty(path->nodes[0]);
if (ret == -ENOENT || ret == -EFBIG)
ret = 0;
csum = 0;
+ printk("no csum found for inode %lu start %Lu\n", inode->i_ino, start);
goto out;
}
read_extent_buffer(path->nodes[0], &csum, (unsigned long)item,
struct inode *inode = page->mapping->host;
struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
char *kaddr;
- u64 private;
+ u64 private = ~(u32)0;
int ret;
struct btrfs_root *root = BTRFS_I(inode)->root;
u32 csum = ~(u32)0;
return 0;
zeroit:
- printk("btrfs csum failed ino %lu off %llu\n",
- page->mapping->host->i_ino, (unsigned long long)start);
+ printk("btrfs csum failed ino %lu off %llu csum %u private %Lu\n",
+ page->mapping->host->i_ino, (unsigned long long)start, csum,
+ private);
memset(kaddr + offset, 1, end - start + 1);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_IRQ0);