linux/net/ceph/msgpool.c
<<
>>
Prefs
   1#include <linux/ceph/ceph_debug.h>
   2
   3#include <linux/err.h>
   4#include <linux/sched.h>
   5#include <linux/types.h>
   6#include <linux/vmalloc.h>
   7
   8#include <linux/ceph/msgpool.h>
   9
  10static void *msgpool_alloc(gfp_t gfp_mask, void *arg)
  11{
  12        struct ceph_msgpool *pool = arg;
  13        struct ceph_msg *msg;
  14
  15        msg = ceph_msg_new(pool->type, pool->front_len, gfp_mask, true);
  16        if (!msg) {
  17                dout("msgpool_alloc %s failed\n", pool->name);
  18        } else {
  19                dout("msgpool_alloc %s %p\n", pool->name, msg);
  20                msg->pool = pool;
  21        }
  22        return msg;
  23}
  24
  25static void msgpool_free(void *element, void *arg)
  16       26
  17 2     2        ceph_msgpool *pool = arg;
  18 2     28       ceph_msg *msg;
element, void *  19 2     2="net/ceph/msgpool.c#L10" id="L10" 3lass="li3e" name="L20">  20 3     3        dout("msgpool_alloc %s rvoia"ne\n", pool->name, msg);
  21 3     31       msg->pool = pool =   22 3     32       dout((msg);
   3#in  24
3a hre3="net/ceph/msgpool.c#L25" id="L25" 3lass="li3e" name="L25">  25s3atic 3oid dout((ceph_msgpool *pool = type,   16 3     3if (!front_len, type, pool = name);
  17 3     37
  18 3     38       dout("msgpool_alloc %se\n"inifn>, name);
  19 3     39       pool->type, type,   20 4     4        pool->front_len, front_len,   21 4     41       pool->pool = msgpool_freetype, msgpool_alloc(msgpool_free(void *pool->  22 4     42       pool->pool =    3#i4pool =    4#ina hre44       pool->name);
name);
  25s4atic 4  16 4     46="net/ceph/msgpool.c#L24" id="L24" 4lass="li4e" name="L17">  17 4     4="net/ceph/msgpool.c#L8" id="L8" cl4lass="li4e" name="L18">  18 4     48    "+code=msgpool_free"/a>(dout((ceph_msgpool *pool =   19 4     49
  20 5     5        dout("msgpool_alloc %se\n"de;msoyn>, pool->name);
  21 5     51       dout(pool->pool->  22 5     52="net/ceph/msgpool.c#L24" id="L24" 5ass="lin5e" name="L3">   3#i5   4#i5a hre54id ceph_msg *ceph_msgpool *pool =    5#inatic 55f (!front_len,   16 5     56
  17 5     5        ceph_msg *msg;
  18 5     58"net/ceph/msgpool.c#L8" id="L8" cl5lass="li5e" name="L19">  19 5     59       front_len, pool->front_len,   20 6     6        dout("msgpool_alloc %s >
	e\n"need , ,   21 6     61f (!pool->name, front_len, pool->front_len,   22 6     62       front_lenWARN_ONass="1nt/ceph/msgpool.c#L6" id="L6" claass="lin6e" name="L3">   3#i6   4#i6a hre64       "comsref">/* try to %pa , esh message */ 
ceph/msgpool.c#L8" id="L8" cl6ass="lin6e" name="L5"> 5#i6atic 65f (!ceph_msg_new(pool->type, front_len, front_lenGFP_NOFS="+code=pool" class="aut t">front_len,ut t="+cnt/ceph/msgpool.c#L6" id="L6" claass="linee" name="L6"> 6#in 6if (! 17 6 6="net/ceph/msgpool.c#L8" id="L8" cl6lass="li6e" name="L18"> 18 6 68 msg; msgpool_allocpool->pool->front_lenGFP_NOFS="+cnt/ceph/msgpool.c#L6" id="L6" clalass="li6e" name="L19"> 19 6 69 dout("msgpool_alloc %s > e\n", pool->name, msg); 20 7 7 msg; 21 7 71="net/ceph/msgpool.c#L24" id="L24" 7lass="li7e" name="L22"> 22 7 7="net/ceph/msgpool.c#L3" id="L3" cl7ass="lin7e" name="L3"> 3#i7(dout((ceph_msgpool *pool = ceph_msg *msg; 4#i7a hre74 5#i7atic 7dout("msgpool_alloc %s den"\n", pool->name, msg); 6#i7 76"net/ceph/msgpool.c#L3" id="L3" cl7ass="linee" name="L7"> 7 "comsref">/* es e id , ceph/msgpool.c#L8" id="L8" cl7lass="li7e" name="L18"> 18 7 78 msg; front_len, front_leniovsref="necode=arg" class="ssref">pool->front_len, 19 7 79 msg; msg; front_len, pool->front_len, 20 8 80"net/ceph/msgpool.c#L3" id="L3" cl8lass="li8e" name="L21"> 21 8 81 dout(msg; dout("comsref">/* etake sgpole ef */
ceph/msgpool.c#L8" id="L8" cl8lass="li8e" name="L22"> 22 8 82 msgpool_freemsg; pool->pool-> 3#i8 4#i8a hre84 id="content">name="Lfooter"> The original LXR software by the ceph/msgphttp://sourceforge.ool.projects/lxr">LXR comsunify="neod lxr@gpool.no="ne. id="conent">name="Lsubfooter"> lxr.gpool.no kindly hosted by ceph/msgphttp://www.redpill-gpopro.no">Redpill Lpopro AS="+codprovider of Lpouxdconsultgpo and opera mets services sgpce 1995. id="conte/bodyone/html