Whamcloud - gitweb
LU-5531 osc: Debug to match extent to brw RPC 48/11548/3
authorPatrick Farrell <paf@cray.com>
Thu, 21 Aug 2014 20:59:23 +0000 (15:59 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 18 Sep 2014 10:24:46 +0000 (10:24 +0000)
Currently, it's difficult to match brw RPCs to objects and
extents from client logs.  This patch adds a D_RPCTRACE
debug message giving the necessary information.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ic3470a805f00b5d9c0f6f72470d3f3eb48a10b7a
Reviewed-on: http://review.whamcloud.com/11548
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ann Koehler <amk@cray.com>
Reviewed-by: Ryan Haasken <haasken@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osc/osc_request.c

index 4fa4259..c2203c4 100644 (file)
@@ -1413,7 +1413,11 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
         if (ocapa && reserve)
                 aa->aa_ocapa = capa_get(ocapa);
 
-        *reqp = req;
+       *reqp = req;
+       niobuf = req_capsule_client_get(pill, &RMF_NIOBUF_REMOTE);
+       CDEBUG(D_RPCTRACE, "brw rpc %p - object "DOSTID" offset %lld<>%lld\n",
+               req, POSTID(&oa->o_oi), niobuf[0].rnb_offset,
+               niobuf[niocount - 1].rnb_offset + niobuf[niocount - 1].rnb_len);
         RETURN(0);
 
  out: