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
50b78c24
Commit
50b78c24
authored
Sep 20, 2007
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs_get_extent should treat inline extents as though they hold a whole block
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
b3cfa35a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
fs/btrfs/inode.c
fs/btrfs/inode.c
+7
-5
No files found.
fs/btrfs/inode.c
View file @
50b78c24
...
...
@@ -1505,13 +1505,13 @@ again:
size
=
btrfs_file_extent_inline_len
(
leaf
->
items
+
path
->
slots
[
0
]);
extent_end
=
extent_start
+
size
;
extent_end
=
extent_start
|
((
u64
)
root
->
blocksize
-
1
)
;
if
(
start
<
extent_start
||
start
>=
extent_end
)
{
em
->
start
=
start
;
if
(
start
<
extent_start
)
{
if
(
end
<
extent_start
)
goto
not_found
;
em
->
end
=
extent_end
-
1
;
em
->
end
=
extent_end
;
}
else
{
em
->
end
=
end
;
}
...
...
@@ -1520,17 +1520,19 @@ again:
em
->
block_start
=
EXTENT_MAP_INLINE
;
em
->
block_end
=
EXTENT_MAP_INLINE
;
em
->
start
=
extent_start
;
em
->
end
=
extent_end
-
1
;
em
->
end
=
extent_end
;
if
(
!
page
)
{
goto
insert
;
}
ptr
=
btrfs_file_extent_inline_start
(
item
);
map
=
kmap
(
page
);
memcpy
(
map
+
page_offset
,
ptr
,
size
);
flush_dcache_page
(
result
->
b_page
);
memset
(
map
+
page_offset
+
size
,
0
,
root
->
blocksize
-
(
page_offset
+
size
));
flush_dcache_page
(
page
);
kunmap
(
page
);
set_extent_uptodate
(
em_tree
,
extent_start
,
extent_end
-
1
,
GFP_NOFS
);
extent_end
,
GFP_NOFS
);
goto
insert
;
}
else
{
printk
(
"unkknown found_type %d
\n
"
,
found_type
);
...
...
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