Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
aadfeb6e
Commit
aadfeb6e
authored
Jan 29, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Add some extra debugging around file data checksum failures
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
c2a8b6e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
fs/btrfs/file-item.c
fs/btrfs/file-item.c
+4
-0
fs/btrfs/inode.c
fs/btrfs/inode.c
+5
-3
No files found.
fs/btrfs/file-item.c
View file @
aadfeb6e
...
...
@@ -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
]);
...
...
fs/btrfs/inode.c
View file @
aadfeb6e
...
...
@@ -318,6 +318,7 @@ int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end)
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
,
...
...
@@ -336,7 +337,7 @@ int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end)
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
;
...
...
@@ -362,8 +363,9 @@ int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end)
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment