rbd: store and use obj_request->object_no
authorIlya Dryomov <idryomov@gmail.com>
Wed, 25 Jan 2017 17:16:23 +0000 (18:16 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 20 Feb 2017 11:16:15 +0000 (12:16 +0100)
commita90bb0c1d47dc1195bc6ac753b34a52535089f80
treef3d8e851d5f9c471d6154b08ae5eb736be546aa3
parent223768d02e2ca5c1747099e03cf949c17aebffd2
rbd: store and use obj_request->object_no

object_no can be trivially formatted into an object name.  We already
store object names in OSD requests with special care to avoid dynamic
allocations for short names.  Storing a name in obj_request, obtained
as below (!), is a waste and will be removed in the next commit.

    name = kmem_cache_alloc(rbd_segment_name_cache, ...);
    snprintf(name, ...);
    obj_request->object_name = kstrdup(name);
    kmem_cache_free(rbd_segment_name_cache, name);
    ...
    ceph_oid_aprintf(..., "%s", obj_request->object_name);

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
drivers/block/rbd.c