diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 10:07:25 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-25 19:12:29 -0400 |
commit | 7a28f59bf9fb220cdf56ac6ab539fc4a0ae59414 (patch) | |
tree | 043c6542efd161eb0a6fc3d4dbc3efd842f0f9e3 /net | |
parent | 0247a0cf3e777932a0cae37ab1d8055a3881458c (diff) |
libceph: allocate ceph_osd with GFP_NOFAIL
create_osd() is called way too deep in the stack to be able to error
out in a sane way; a failing create_osd() just messes everything up.
The current req_notarget list solution is broken - the list is never
traversed as it's not entirely clear when to do it, I guess.
If we were to start traversing it at regular intervals and retrying
each request, we wouldn't be far off from what __GFP_NOFAIL is doing,
so allocate OSD sessions with __GFP_NOFAIL, at least until we come up
with a better fix.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 77f37b63622d..b6950c2c6cc4 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1043,10 +1043,7 @@ static struct ceph_osd *create_osd(struct ceph_osd_client *osdc, int onum) | |||
1043 | 1043 | ||
1044 | WARN_ON(onum == CEPH_HOMELESS_OSD); | 1044 | WARN_ON(onum == CEPH_HOMELESS_OSD); |
1045 | 1045 | ||
1046 | osd = kzalloc(sizeof(*osd), GFP_NOFS); | 1046 | osd = kzalloc(sizeof(*osd), GFP_NOIO | __GFP_NOFAIL); |
1047 | if (!osd) | ||
1048 | return NULL; | ||
1049 | |||
1050 | osd_init(osd); | 1047 | osd_init(osd); |
1051 | osd->o_osdc = osdc; | 1048 | osd->o_osdc = osdc; |
1052 | osd->o_osd = onum; | 1049 | osd->o_osd = onum; |