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
fa695b01
Commit
fa695b01
authored
Feb 26, 2016
by
David Sterba
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'misc-4.6' into for-chris-4.6
# Conflicts: # fs/btrfs/file.c
parents
f004fae0
f7e98a7f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
31 deletions
+20
-31
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+1
-1
fs/btrfs/file.c
fs/btrfs/file.c
+18
-22
fs/btrfs/ioctl.c
fs/btrfs/ioctl.c
+0
-2
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/tests/btrfs-tests.c
+0
-6
fs/btrfs/tests/free-space-tree-tests.c
fs/btrfs/tests/free-space-tree-tests.c
+1
-0
No files found.
fs/btrfs/ctree.h
View file @
fa695b01
...
...
@@ -2291,7 +2291,7 @@ struct btrfs_ioctl_defrag_range_args {
#define BTRFS_MOUNT_NOLOGREPLAY (1 << 27)
#define BTRFS_DEFAULT_COMMIT_INTERVAL (30)
#define BTRFS_DEFAULT_MAX_INLINE (
8192
)
#define BTRFS_DEFAULT_MAX_INLINE (
2048
)
#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt)
#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)
...
...
fs/btrfs/file.c
View file @
fa695b01
...
...
@@ -1533,12 +1533,9 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
reserve_bytes
=
round_up
(
write_bytes
+
sector_offset
,
root
->
sectorsize
);
if
(
BTRFS_I
(
inode
)
->
flags
&
(
BTRFS_INODE_NODATACOW
|
BTRFS_INODE_PREALLOC
))
{
ret
=
check_can_nocow
(
inode
,
pos
,
&
write_bytes
);
if
(
ret
<
0
)
break
;
if
(
ret
>
0
)
{
if
((
BTRFS_I
(
inode
)
->
flags
&
(
BTRFS_INODE_NODATACOW
|
BTRFS_INODE_PREALLOC
))
&&
check_can_nocow
(
inode
,
pos
,
&
write_bytes
)
>
0
)
{
/*
* For nodata cow case, no need to reserve
* data space.
...
...
@@ -1550,12 +1547,11 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
*/
num_pages
=
DIV_ROUND_UP
(
write_bytes
+
offset
,
PAGE_CACHE_SIZE
);
reserve_bytes
=
round_up
(
write_bytes
+
sector_offset
,
reserve_bytes
=
round_up
(
write_bytes
+
sector_offset
,
root
->
sectorsize
);
goto
reserve_metadata
;
}
}
ret
=
btrfs_check_data_free_space
(
inode
,
pos
,
write_bytes
);
if
(
ret
<
0
)
break
;
...
...
fs/btrfs/ioctl.c
View file @
fa695b01
...
...
@@ -2093,8 +2093,6 @@ static noinline int search_ioctl(struct inode *inode,
key
.
offset
=
(
u64
)
-
1
;
root
=
btrfs_read_fs_root_no_name
(
info
,
&
key
);
if
(
IS_ERR
(
root
))
{
btrfs_err
(
info
,
"could not find root %llu"
,
sk
->
tree_id
);
btrfs_free_path
(
path
);
return
-
ENOENT
;
}
...
...
fs/btrfs/tests/btrfs-tests.c
View file @
fa695b01
...
...
@@ -189,12 +189,6 @@ btrfs_alloc_dummy_block_group(unsigned long length)
kfree
(
cache
);
return
NULL
;
}
cache
->
fs_info
=
btrfs_alloc_dummy_fs_info
();
if
(
!
cache
->
fs_info
)
{
kfree
(
cache
->
free_space_ctl
);
kfree
(
cache
);
return
NULL
;
}
cache
->
key
.
objectid
=
0
;
cache
->
key
.
offset
=
length
;
...
...
fs/btrfs/tests/free-space-tree-tests.c
View file @
fa695b01
...
...
@@ -485,6 +485,7 @@ static int run_test(test_func_t test_func, int bitmaps)
cache
->
bitmap_low_thresh
=
0
;
cache
->
bitmap_high_thresh
=
(
u32
)
-
1
;
cache
->
needs_free_space
=
1
;
cache
->
fs_info
=
root
->
fs_info
;
btrfs_init_dummy_trans
(
&
trans
);
...
...
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