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
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
Show 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,
...
@@ -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
;
struct
extent_io_tree
*
io_tree
=
&
BTRFS_I
(
inode
)
->
io_tree
;
path
=
btrfs_alloc_path
();
path
=
btrfs_alloc_path
();
path
->
reada
=
2
;
WARN_ON
(
bio
->
bi_vcnt
<=
0
);
WARN_ON
(
bio
->
bi_vcnt
<=
0
);
...
@@ -177,6 +176,7 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode,
...
@@ -177,6 +176,7 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode,
printk
(
"no csum found for inode %lu start "
printk
(
"no csum found for inode %lu start "
"%llu
\n
"
,
inode
->
i_ino
,
"%llu
\n
"
,
inode
->
i_ino
,
(
unsigned
long
long
)
offset
);
(
unsigned
long
long
)
offset
);
item
=
NULL
;
goto
found
;
goto
found
;
}
}
btrfs_item_key_to_cpu
(
path
->
nodes
[
0
],
&
found_key
,
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,
...
@@ -376,7 +376,9 @@ int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
if
(
!
(
rw
&
(
1
<<
BIO_RW
)))
{
if
(
!
(
rw
&
(
1
<<
BIO_RW
)))
{
if
(
!
btrfs_test_opt
(
root
,
NODATASUM
)
&&
if
(
!
btrfs_test_opt
(
root
,
NODATASUM
)
&&
!
btrfs_test_flag
(
inode
,
NODATASUM
))
{
!
btrfs_test_flag
(
inode
,
NODATASUM
))
{
mutex_lock
(
&
BTRFS_I
(
inode
)
->
csum_mutex
);
btrfs_lookup_bio_sums
(
root
,
inode
,
bio
);
btrfs_lookup_bio_sums
(
root
,
inode
,
bio
);
mutex_unlock
(
&
BTRFS_I
(
inode
)
->
csum_mutex
);
}
}
goto
mapit
;
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