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
77ce6846
Commit
77ce6846
authored
Mar 02, 2007
by
Chris Mason
Committed by
David Woodhouse
Mar 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: period commit during initial fill in the random tester
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
f0930a37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-2
fs/btrfs/random-test.c
fs/btrfs/random-test.c
+11
-3
No files found.
fs/btrfs/disk-io.c
View file @
77ce6846
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include "disk-io.h"
#include "disk-io.h"
static
int
allocated_blocks
=
0
;
static
int
allocated_blocks
=
0
;
int
cache_size
=
0
;
int
cache_max
=
10000
;
int
cache_max
=
10000
;
static
int
check_tree_block
(
struct
ctree_root
*
root
,
struct
tree_buffer
*
buf
)
static
int
check_tree_block
(
struct
ctree_root
*
root
,
struct
tree_buffer
*
buf
)
...
@@ -36,7 +35,7 @@ static int free_some_buffers(struct ctree_root *root)
...
@@ -36,7 +35,7 @@ static int free_some_buffers(struct ctree_root *root)
list_del_init
(
&
b
->
cache
);
list_del_init
(
&
b
->
cache
);
tree_block_release
(
root
,
b
);
tree_block_release
(
root
,
b
);
if
(
root
->
cache_size
<
cache_max
)
if
(
root
->
cache_size
<
cache_max
)
return
0
;
break
;
}
}
}
}
return
0
;
return
0
;
...
...
fs/btrfs/random-test.c
View file @
77ce6846
...
@@ -202,15 +202,23 @@ static int fill_tree(struct ctree_root *root, struct radix_tree_root *radix,
...
@@ -202,15 +202,23 @@ static int fill_tree(struct ctree_root *root, struct radix_tree_root *radix,
int
count
)
int
count
)
{
{
int
i
;
int
i
;
int
err
;
int
ret
=
0
;
int
ret
=
0
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
ret
=
ins_one
(
root
,
radix
);
ret
=
ins_one
(
root
,
radix
);
if
(
ret
)
{
if
(
ret
)
{
printf
(
"fill failed
\n
"
);
fprintf
(
stderr
,
"fill failed
\n
"
);
err
=
ret
;
goto
out
;
goto
out
;
}
}
if
(
i
%
1000
==
0
)
{
ret
=
commit_transaction
(
root
);
if
(
ret
)
{
fprintf
(
stderr
,
"fill commit failed
\n
"
);
return
ret
;
}
}
if
(
i
%
10000
==
0
)
{
printf
(
"bigfill %d
\n
"
,
i
);
}
if
(
!
keep_running
)
if
(
!
keep_running
)
break
;
break
;
}
}
...
...
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