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
5cf66426
Commit
5cf66426
authored
Nov 16, 2007
by
Yan
Committed by
Chris Mason
Sep 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Off by one fixes for extent-tree.c
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
5e5745dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+3
-7
No files found.
fs/btrfs/extent-tree.c
View file @
5cf66426
...
...
@@ -150,12 +150,9 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(struct
return
NULL
;
block_group
=
(
struct
btrfs_block_group_cache
*
)(
unsigned
long
)
ptr
;
if
(
block_group
->
key
.
objectid
<=
bytenr
&&
bytenr
<=
if
(
block_group
->
key
.
objectid
<=
bytenr
&&
bytenr
<
block_group
->
key
.
objectid
+
block_group
->
key
.
offset
)
return
block_group
;
return
NULL
;
}
static
u64
find_search_start
(
struct
btrfs_root
*
root
,
...
...
@@ -195,7 +192,7 @@ static u64 find_search_start(struct btrfs_root *root,
continue
;
}
if
(
data
!=
BTRFS_BLOCK_GROUP_MIXED
&&
start
+
num
>
=
cache
->
key
.
objectid
+
cache
->
key
.
offset
)
start
+
num
>
cache
->
key
.
objectid
+
cache
->
key
.
offset
)
goto
new_group
;
return
start
;
}
...
...
@@ -1088,9 +1085,8 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
if
(
ins
->
objectid
+
num_bytes
>=
search_end
)
goto
enospc
;
if
(
!
full_scan
&&
data
!=
BTRFS_BLOCK_GROUP_MIXED
&&
ins
->
objectid
+
num_bytes
>
=
block_group
->
ins
->
objectid
+
num_bytes
>
block_group
->
key
.
objectid
+
block_group
->
key
.
offset
)
{
search_start
=
block_group
->
key
.
objectid
+
block_group
->
key
.
offset
;
...
...
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