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
b9bfb93c
Commit
b9bfb93c
authored
Nov 18, 2009
by
Sage Weil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: move mempool creation to ceph_create_client
Signed-off-by:
Sage Weil
<
sage@newdream.net
>
parent
4e7a5dcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
fs/ceph/super.c
fs/ceph/super.c
+12
-11
No files found.
fs/ceph/super.c
View file @
b9bfb93c
...
@@ -534,10 +534,18 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
...
@@ -534,10 +534,18 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
if
(
client
->
trunc_wq
==
NULL
)
if
(
client
->
trunc_wq
==
NULL
)
goto
fail_pg_inv_wq
;
goto
fail_pg_inv_wq
;
/* set up mempools */
err
=
-
ENOMEM
;
client
->
wb_pagevec_pool
=
mempool_create_kmalloc_pool
(
10
,
client
->
mount_args
->
wsize
>>
PAGE_CACHE_SHIFT
);
if
(
!
client
->
wb_pagevec_pool
)
goto
fail_trunc_wq
;
/* subsystems */
/* subsystems */
err
=
ceph_monc_init
(
&
client
->
monc
,
client
);
err
=
ceph_monc_init
(
&
client
->
monc
,
client
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
fail_
trunc_wq
;
goto
fail_
mempool
;
err
=
ceph_osdc_init
(
&
client
->
osdc
,
client
);
err
=
ceph_osdc_init
(
&
client
->
osdc
,
client
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
fail_monc
;
goto
fail_monc
;
...
@@ -550,6 +558,8 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
...
@@ -550,6 +558,8 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
ceph_osdc_stop
(
&
client
->
osdc
);
ceph_osdc_stop
(
&
client
->
osdc
);
fail_monc:
fail_monc:
ceph_monc_stop
(
&
client
->
monc
);
ceph_monc_stop
(
&
client
->
monc
);
fail_mempool:
mempool_destroy
(
client
->
wb_pagevec_pool
);
fail_trunc_wq:
fail_trunc_wq:
destroy_workqueue
(
client
->
trunc_wq
);
destroy_workqueue
(
client
->
trunc_wq
);
fail_pg_inv_wq:
fail_pg_inv_wq:
...
@@ -581,8 +591,7 @@ static void ceph_destroy_client(struct ceph_client *client)
...
@@ -581,8 +591,7 @@ static void ceph_destroy_client(struct ceph_client *client)
if
(
client
->
msgr
)
if
(
client
->
msgr
)
ceph_messenger_destroy
(
client
->
msgr
);
ceph_messenger_destroy
(
client
->
msgr
);
if
(
client
->
wb_pagevec_pool
)
mempool_destroy
(
client
->
wb_pagevec_pool
);
mempool_destroy
(
client
->
wb_pagevec_pool
);
destroy_mount_args
(
client
->
mount_args
);
destroy_mount_args
(
client
->
mount_args
);
...
@@ -845,14 +854,6 @@ static int ceph_get_sb(struct file_system_type *fs_type,
...
@@ -845,14 +854,6 @@ static int ceph_get_sb(struct file_system_type *fs_type,
dout
(
"get_sb got existing client %p
\n
"
,
client
);
dout
(
"get_sb got existing client %p
\n
"
,
client
);
}
else
{
}
else
{
dout
(
"get_sb using new client %p
\n
"
,
client
);
dout
(
"get_sb using new client %p
\n
"
,
client
);
/* set up mempools */
err
=
-
ENOMEM
;
client
->
wb_pagevec_pool
=
mempool_create_kmalloc_pool
(
10
,
client
->
mount_args
->
wsize
>>
PAGE_CACHE_SHIFT
);
if
(
!
client
->
wb_pagevec_pool
)
goto
out_splat
;
err
=
ceph_register_bdi
(
sb
,
client
);
err
=
ceph_register_bdi
(
sb
,
client
);
if
(
err
<
0
)
if
(
err
<
0
)
goto
out_splat
;
goto
out_splat
;
...
...
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