Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6dab8157
Commit
6dab8157
authored
Aug 04, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Hold csum mutex while reading in sums during readpages
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
2dd3e67b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
fs/btrfs/file-item.c
fs/btrfs/file-item.c
+1
-1
fs/btrfs/inode.c
fs/btrfs/inode.c
+2
-0
No files found.
fs/btrfs/file-item.c
View file @
6dab8157
...
...
@@ -150,7 +150,6 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode,
struct
extent_io_tree
*
io_tree
=
&
BTRFS_I
(
inode
)
->
io_tree
;
path
=
btrfs_alloc_path
();
path
->
reada
=
2
;
WARN_ON
(
bio
->
bi_vcnt
<=
0
);
...
...
@@ -177,6 +176,7 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode,
printk
(
"no csum found for inode %lu start "
"%llu
\n
"
,
inode
->
i_ino
,
(
unsigned
long
long
)
offset
);
item
=
NULL
;
goto
found
;
}
btrfs_item_key_to_cpu
(
path
->
nodes
[
0
],
&
found_key
,
...
...
fs/btrfs/inode.c
View file @
6dab8157
...
...
@@ -376,7 +376,9 @@ int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
if
(
!
(
rw
&
(
1
<<
BIO_RW
)))
{
if
(
!
btrfs_test_opt
(
root
,
NODATASUM
)
&&
!
btrfs_test_flag
(
inode
,
NODATASUM
))
{
mutex_lock
(
&
BTRFS_I
(
inode
)
->
csum_mutex
);
btrfs_lookup_bio_sums
(
root
,
inode
,
bio
);
mutex_unlock
(
&
BTRFS_I
(
inode
)
->
csum_mutex
);
}
goto
mapit
;
}
...
...
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