summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-29 09:10:27 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:59 -0400
commitaadfeb6e39ad6bde080cb3ab23f4da57ccb25f4a (patch)
tree9e5a1158b8857f26bfc7237adaa49e1784a163a4 /fs/btrfs/file-item.c
parentc2a8b6e11009398ca9363d8ba8d4e7e40fb897fd (diff)
Btrfs: Add some extra debugging around file data checksum failures
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r--fs/btrfs/file-item.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 614176e5285..3ebbc058d08 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -261,6 +261,10 @@ csum:
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]);