From 5b294bf35dd4c55c22169321ab7c1c9a6d5ec153 Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Wed, 18 Aug 2010 17:31:59 +0400 Subject: [PATCH] b=23335 Allocate echo objects that can be mapped to a valid FID With the change to using valid FIDs for all OST objects in bug 19427, the echo objid needs to be below 2^32, because regular FID numbers are limited to 2^32 objects in a single sequence number. o=andreas.dilger i=aleksandr.guzovskiy i=mikhail.pershin --- lustre/obdecho/echo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index f791233..79b1020 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -52,7 +52,9 @@ #include #include -#define ECHO_INIT_OBJID 0x1000000000000000ULL +/* The echo objid needs to be below 2^32, because regular FID numbers are + * limited to 2^32 objects in f_oid for the FID_SEQ_ECHO range. b=23335 */ +#define ECHO_INIT_OID 0x10000000ULL #define ECHO_HANDLE_MAGIC 0xabcd0123fedc9876ULL #define ECHO_PERSISTENT_PAGES (ECHO_PERSISTENT_SIZE >> CFS_PAGE_SHIFT) @@ -150,7 +152,7 @@ int echo_destroy(struct obd_export *exp, struct obdo *oa, RETURN(-EINVAL); } - if (oa->o_id > obd->u.echo.eo_lastino || oa->o_id < ECHO_INIT_OBJID) { + if (oa->o_id > obd->u.echo.eo_lastino || oa->o_id < ECHO_INIT_OID) { CERROR("bad destroy objid: "LPX64"\n", oa->o_id); RETURN(-EINVAL); } @@ -506,7 +508,7 @@ static int echo_setup(struct obd_device *obd, obd_count len, void *buf) ENTRY; spin_lock_init(&obd->u.echo.eo_lock); - obd->u.echo.eo_lastino = ECHO_INIT_OBJID; + obd->u.echo.eo_lastino = ECHO_INIT_OID; sprintf(ns_name, "echotgt-%s", obd->obd_uuid.uuid); obd->obd_namespace = ldlm_namespace_new(obd, ns_name, -- 1.8.3.1