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
Kirill Smelkov
linux
Commits
9afbb0b7
Commit
9afbb0b7
authored
Feb 15, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Disable tree defrag in SSD mode
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
df68b8a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+2
-1
fs/btrfs/tree-defrag.c
fs/btrfs/tree-defrag.c
+3
-0
No files found.
fs/btrfs/extent-tree.c
View file @
9afbb0b7
...
...
@@ -1835,7 +1835,8 @@ struct extent_buffer *__btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
buf
->
start
,
buf
->
start
+
buf
->
len
-
1
,
EXTENT_CSUM
,
GFP_NOFS
);
buf
->
flags
|=
EXTENT_CSUM
;
btrfs_set_buffer_defrag
(
buf
);
if
(
!
btrfs_test_opt
(
root
,
SSD
))
btrfs_set_buffer_defrag
(
buf
);
trans
->
blocks_used
++
;
return
buf
;
}
...
...
fs/btrfs/tree-defrag.c
View file @
9afbb0b7
...
...
@@ -179,6 +179,9 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
if
(
root
->
ref_cows
==
0
&&
!
is_extent
)
goto
out
;
if
(
btrfs_test_opt
(
root
,
SSD
))
goto
out
;
path
=
btrfs_alloc_path
();
if
(
!
path
)
return
-
ENOMEM
;
...
...
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