alistair23-linux/include/linux/ceph
Ilya Dryomov 0d9c1ab3be libceph: preallocate message data items
Currently message data items are allocated with ceph_msg_data_create()
in setup_request_data() inside send_request().  send_request() has never
been allowed to fail, so each allocation is followed by a BUG_ON:

  data = ceph_msg_data_create(...);
  BUG_ON(!data);

It's been this way since support for multiple message data items was
added in commit 6644ed7b7e ("libceph: make message data be a pointer")
in 3.10.

There is no reason to delay the allocation of message data items until
the last possible moment and we certainly don't need a linked list of
them as they are only ever appended to the end and never erased.  Make
ceph_msg_new2() take max_data_items and adapt the rest of the code.

Reported-by: Jerry Lee <leisurelysw24@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-10-22 10:28:22 +02:00
..
auth.h libceph: add authorizer challenge 2018-08-02 21:33:24 +02:00
buffer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_features.h libceph: implement CEPHX_V2 calculation mode 2018-08-02 21:33:25 +02:00
ceph_frag.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_fs.h ceph: always get rstat from auth mds 2018-06-04 20:45:55 +02:00
ceph_hash.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cls_lock_client.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
decode.h libceph: remove now unused ceph_{en,de}code_timespec() 2018-08-02 21:33:20 +02:00
libceph.h libceph: bump CEPH_MSG_MAX_DATA_LEN 2018-10-22 10:28:20 +02:00
mdsmap.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
messenger.h libceph: preallocate message data items 2018-10-22 10:28:22 +02:00
mon_client.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msgpool.h libceph: preallocate message data items 2018-10-22 10:28:22 +02:00
msgr.h libceph: add authorizer challenge 2018-08-02 21:33:24 +02:00
osd_client.h libceph: osd_req_op_cls_init() doesn't need to take opcode 2018-10-22 10:28:20 +02:00
osdmap.h libceph: allocate the locator string with GFP_NOFAIL 2018-06-04 20:46:00 +02:00
pagelist.h libceph: introduce ceph_pagelist_alloc() 2018-10-22 10:28:21 +02:00
rados.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
string_table.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
striper.h libceph, ceph: move ceph_calc_file_object_mapping() to striper.c 2018-04-02 10:12:43 +02:00
types.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00