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
6f568d35
Commit
6f568d35
authored
Jan 29, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: mount -o max_inline=size to control the maximum inline extent size
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
291d673e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
3 deletions
+22
-3
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+1
-0
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-0
fs/btrfs/extent_io.c
fs/btrfs/extent_io.c
+0
-1
fs/btrfs/file.c
fs/btrfs/file.c
+2
-1
fs/btrfs/super.c
fs/btrfs/super.c
+18
-1
No files found.
fs/btrfs/ctree.h
View file @
6f568d35
...
@@ -325,6 +325,7 @@ struct btrfs_fs_info {
...
@@ -325,6 +325,7 @@ struct btrfs_fs_info {
u64
last_trans_committed
;
u64
last_trans_committed
;
unsigned
long
mount_opt
;
unsigned
long
mount_opt
;
u64
max_extent
;
u64
max_extent
;
u64
max_inline
;
u64
alloc_start
;
u64
alloc_start
;
struct
btrfs_transaction
*
running_transaction
;
struct
btrfs_transaction
*
running_transaction
;
struct
btrfs_super_block
super_copy
;
struct
btrfs_super_block
super_copy
;
...
...
fs/btrfs/disk-io.c
View file @
6f568d35
...
@@ -659,6 +659,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
...
@@ -659,6 +659,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
fs_info
->
throttles
=
0
;
fs_info
->
throttles
=
0
;
fs_info
->
mount_opt
=
0
;
fs_info
->
mount_opt
=
0
;
fs_info
->
max_extent
=
(
u64
)
-
1
;
fs_info
->
max_extent
=
(
u64
)
-
1
;
fs_info
->
max_inline
=
8192
*
1024
;
fs_info
->
delalloc_bytes
=
0
;
fs_info
->
delalloc_bytes
=
0
;
fs_info
->
btree_inode
=
new_inode
(
sb
);
fs_info
->
btree_inode
=
new_inode
(
sb
);
fs_info
->
btree_inode
->
i_ino
=
1
;
fs_info
->
btree_inode
->
i_ino
=
1
;
...
...
fs/btrfs/extent_io.c
View file @
6f568d35
...
@@ -2451,7 +2451,6 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
...
@@ -2451,7 +2451,6 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
goto
out
;
goto
out
;
sector
=
(
em
->
block_start
+
start
-
em
->
start
)
>>
inode
->
i_blkbits
;
sector
=
(
em
->
block_start
+
start
-
em
->
start
)
>>
inode
->
i_blkbits
;
printk
(
"bmap finds %Lu %Lu block %Lu
\n
"
,
em
->
start
,
em
->
len
,
em
->
block_start
);
out:
out:
free_extent_map
(
em
);
free_extent_map
(
em
);
return
sector
;
return
sector
;
...
...
fs/btrfs/file.c
View file @
6f568d35
...
@@ -301,7 +301,8 @@ static int noinline dirty_and_release_pages(struct btrfs_trans_handle *trans,
...
@@ -301,7 +301,8 @@ static int noinline dirty_and_release_pages(struct btrfs_trans_handle *trans,
*/
*/
inline_size
=
end_pos
;
inline_size
=
end_pos
;
if
(
isize
>=
BTRFS_MAX_INLINE_DATA_SIZE
(
root
)
||
if
(
isize
>=
BTRFS_MAX_INLINE_DATA_SIZE
(
root
)
||
inline_size
>
8192
||
inline_size
>
root
->
fs_info
->
max_inline
||
(
inline_size
&
(
root
->
sectorsize
-
1
))
==
0
||
inline_size
>=
BTRFS_MAX_INLINE_DATA_SIZE
(
root
))
{
inline_size
>=
BTRFS_MAX_INLINE_DATA_SIZE
(
root
))
{
u64
last_end
;
u64
last_end
;
u64
existing_delalloc
=
0
;
u64
existing_delalloc
=
0
;
...
...
fs/btrfs/super.c
View file @
6f568d35
...
@@ -64,7 +64,7 @@ static void btrfs_put_super (struct super_block * sb)
...
@@ -64,7 +64,7 @@ static void btrfs_put_super (struct super_block * sb)
enum
{
enum
{
Opt_subvol
,
Opt_nodatasum
,
Opt_nodatacow
,
Opt_max_extent
,
Opt_subvol
,
Opt_nodatasum
,
Opt_nodatacow
,
Opt_max_extent
,
Opt_alloc_start
,
Opt_nobarrier
,
Opt_ssd
,
Opt_err
,
Opt_
max_inline
,
Opt_
alloc_start
,
Opt_nobarrier
,
Opt_ssd
,
Opt_err
,
};
};
static
match_table_t
tokens
=
{
static
match_table_t
tokens
=
{
...
@@ -73,6 +73,7 @@ static match_table_t tokens = {
...
@@ -73,6 +73,7 @@ static match_table_t tokens = {
{
Opt_nodatacow
,
"nodatacow"
},
{
Opt_nodatacow
,
"nodatacow"
},
{
Opt_nobarrier
,
"nobarrier"
},
{
Opt_nobarrier
,
"nobarrier"
},
{
Opt_max_extent
,
"max_extent=%s"
},
{
Opt_max_extent
,
"max_extent=%s"
},
{
Opt_max_inline
,
"max_inline=%s"
},
{
Opt_alloc_start
,
"alloc_start=%s"
},
{
Opt_alloc_start
,
"alloc_start=%s"
},
{
Opt_ssd
,
"ssd"
},
{
Opt_ssd
,
"ssd"
},
{
Opt_err
,
NULL
}
{
Opt_err
,
NULL
}
...
@@ -178,6 +179,22 @@ static int parse_options (char * options,
...
@@ -178,6 +179,22 @@ static int parse_options (char * options,
}
}
}
}
break
;
break
;
case
Opt_max_inline
:
if
(
info
)
{
char
*
num
=
match_strdup
(
&
args
[
0
]);
if
(
num
)
{
info
->
max_inline
=
btrfs_parse_size
(
num
);
kfree
(
num
);
info
->
max_inline
=
max_t
(
u64
,
info
->
max_inline
,
root
->
sectorsize
);
printk
(
"btrfs: max_inline at %Lu
\n
"
,
info
->
max_inline
);
}
}
break
;
case
Opt_alloc_start
:
case
Opt_alloc_start
:
if
(
info
)
{
if
(
info
)
{
char
*
num
=
match_strdup
(
&
args
[
0
]);
char
*
num
=
match_strdup
(
&
args
[
0
]);
...
...
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