add 2 macros for the length of a fid string 0xSEQ:0xOID:0xVER
and it's brace version (FID_NOBRACE_LEN, and FID_LEN)
Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: If257b7e12f43ea48bbdf6a6788d285d465c6a1bc
Reviewed-on: http://review.whamcloud.com/5299
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
/* printf display format
e.g. printf("file FID is "DFID"\n", PFID(fid)); */
+#define FID_NOBRACE_LEN 40
+#define FID_LEN (FID_NOBRACE_LEN + 2)
#define DFID_NOBRACE LPX64":0x%x:0x%x"
#define DFID "["DFID_NOBRACE"]"
#define PFID(fid) \
struct lprocfs_static_vars lvars;
int rc;
+ CLASSERT(sizeof("0x0123456789ABCDEF:0x01234567:0x01234567") ==
+ FID_NOBRACE_LEN + 1);
+ CLASSERT(sizeof("[0x0123456789ABCDEF:0x01234567:0x01234567]") ==
+ FID_LEN + 1);
rc = lu_kmem_init(mdt_caches);
if (rc)
return rc;