~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to net/ceph/osd_client.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2013-07-11 18:35:20 UTC
  • Revision ID: package-import@ubuntu.com-20130711183520-htnf1x4y5r11hndr
Tags: 3.5.0-229.42
* Release Tracking Bug
  - LP: #1199276

[ Paolo Pisati ]

* [Config] CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
672
672
        if (atomic_dec_and_test(&osd->o_ref) && osd->o_auth.authorizer) {
673
673
                struct ceph_auth_client *ac = osd->o_osdc->client->monc.auth;
674
674
 
675
 
                if (ac->ops && ac->ops->destroy_authorizer)
676
 
                        ac->ops->destroy_authorizer(ac, osd->o_auth.authorizer);
 
675
                ceph_auth_destroy_authorizer(ac, osd->o_auth.authorizer);
677
676
                kfree(osd);
678
677
        }
679
678
}
1301
1300
 * Requeue requests whose mapping to an OSD has changed.  If requests map to
1302
1301
 * no osd, request a new map.
1303
1302
 *
1304
 
 * Caller should hold map_sem for read and request_mutex.
 
1303
 * Caller should hold map_sem for read.
1305
1304
 */
1306
1305
static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
1307
1306
{
1359
1358
 
1360
1359
                dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid,
1361
1360
                     req->r_osd ? req->r_osd->o_osd : -1);
 
1361
                __register_request(osdc, req);
1362
1362
                __unregister_linger_request(osdc, req);
1363
 
                __register_request(osdc, req);
1364
1363
        }
 
1364
        reset_changed_osds(osdc);
1365
1365
        mutex_unlock(&osdc->request_mutex);
1366
1366
 
1367
1367
        if (needmap) {
1424
1424
                                osdc->osdmap = newmap;
1425
1425
                        }
1426
1426
                        kick_requests(osdc, 0);
1427
 
                        reset_changed_osds(osdc);
1428
1427
                } else {
1429
1428
                        dout("ignoring incremental map %u len %d\n",
1430
1429
                             epoch, maplen);
2151
2150
        struct ceph_auth_handshake *auth = &o->o_auth;
2152
2151
 
2153
2152
        if (force_new && auth->authorizer) {
2154
 
                if (ac->ops && ac->ops->destroy_authorizer)
2155
 
                        ac->ops->destroy_authorizer(ac, auth->authorizer);
 
2153
                ceph_auth_destroy_authorizer(ac, auth->authorizer);
2156
2154
                auth->authorizer = NULL;
2157
2155
        }
2158
 
        if (!auth->authorizer && ac->ops && ac->ops->create_authorizer) {
2159
 
                int ret = ac->ops->create_authorizer(ac, CEPH_ENTITY_TYPE_OSD,
2160
 
                                                        auth);
 
2156
        if (!auth->authorizer) {
 
2157
                int ret = ceph_auth_create_authorizer(ac, CEPH_ENTITY_TYPE_OSD,
 
2158
                                                      auth);
 
2159
                if (ret)
 
2160
                        return ERR_PTR(ret);
 
2161
        } else {
 
2162
                int ret = ceph_auth_update_authorizer(ac, CEPH_ENTITY_TYPE_OSD,
 
2163
                                                     auth);
2161
2164
                if (ret)
2162
2165
                        return ERR_PTR(ret);
2163
2166
        }
2173
2176
        struct ceph_osd_client *osdc = o->o_osdc;
2174
2177
        struct ceph_auth_client *ac = osdc->client->monc.auth;
2175
2178
 
2176
 
        /*
2177
 
         * XXX If ac->ops or ac->ops->verify_authorizer_reply is null,
2178
 
         * XXX which do we do:  succeed or fail?
2179
 
         */
2180
 
        return ac->ops->verify_authorizer_reply(ac, o->o_auth.authorizer, len);
 
2179
        return ceph_auth_verify_authorizer_reply(ac, o->o_auth.authorizer, len);
2181
2180
}
2182
2181
 
2183
2182
static int invalidate_authorizer(struct ceph_connection *con)
2186
2185
        struct ceph_osd_client *osdc = o->o_osdc;
2187
2186
        struct ceph_auth_client *ac = osdc->client->monc.auth;
2188
2187
 
2189
 
        if (ac->ops && ac->ops->invalidate_authorizer)
2190
 
                ac->ops->invalidate_authorizer(ac, CEPH_ENTITY_TYPE_OSD);
2191
 
 
 
2188
        ceph_auth_invalidate_authorizer(ac, CEPH_ENTITY_TYPE_OSD);
2192
2189
        return ceph_monc_validate_auth(&osdc->client->monc);
2193
2190
}
2194
2191