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
f9ef6604
Commit
f9ef6604
authored
Jan 03, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: 32 bit compile fixes for the resizer and enospc checks
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
4313b399
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+3
-1
fs/btrfs/inode.c
fs/btrfs/inode.c
+7
-3
No files found.
fs/btrfs/extent-tree.c
View file @
f9ef6604
...
...
@@ -2501,6 +2501,7 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans,
u64
nr
=
0
;
u64
cur_byte
;
u64
old_size
;
unsigned
long
rem
;
struct
btrfs_block_group_cache
*
cache
;
struct
btrfs_block_group_item
*
item
;
struct
btrfs_fs_info
*
info
=
root
->
fs_info
;
...
...
@@ -2538,7 +2539,8 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans,
struct
btrfs_block_group_item
);
btrfs_set_disk_block_group_used
(
leaf
,
item
,
0
);
if
(
nr
%
3
)
{
div_long_long_rem
(
nr
,
3
,
&
rem
);
if
(
rem
)
{
btrfs_set_disk_block_group_flags
(
leaf
,
item
,
BTRFS_BLOCK_GROUP_DATA
);
}
else
{
...
...
fs/btrfs/inode.c
View file @
f9ef6604
...
...
@@ -81,9 +81,11 @@ int btrfs_check_free_space(struct btrfs_root *root, u64 num_required,
int
ret
=
0
;
if
(
for_del
)
thresh
=
(
total
*
90
)
/
10
0
;
thresh
=
total
*
9
0
;
else
thresh
=
(
total
*
85
)
/
100
;
thresh
=
total
*
85
;
do_div
(
thresh
,
100
);
spin_lock
(
&
root
->
fs_info
->
delalloc_lock
);
if
(
used
+
root
->
fs_info
->
delalloc_bytes
+
num_required
>
thresh
)
...
...
@@ -2475,7 +2477,9 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg)
ret
=
-
EFBIG
;
goto
out_unlock
;
}
new_size
=
(
new_size
/
root
->
sectorsize
)
*
root
->
sectorsize
;
do_div
(
new_size
,
root
->
sectorsize
);
new_size
*=
root
->
sectorsize
;
printk
(
"new size is %Lu
\n
"
,
new_size
);
if
(
new_size
>
old_size
)
{
...
...
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