From 384878c3c51f46089ddabacfe82dd3e7ea1963b2 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Tue, 6 Dec 2011 22:08:53 -0800 Subject: [PATCH] LU-803 echo: fill OBD_MAGIC for echo device Otherwise it will cause failure on obdfilter-survey. Signed-off-by: Jinshan Xiong Change-Id: I505da432cdf04fe3275d2a529f4115b1a3238e94 Reviewed-on: http://review.whamcloud.com/1804 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- lustre/include/obd.h | 11 ++++++----- lustre/obdecho/echo.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index f32d5ca..2728674 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -584,11 +584,12 @@ struct obd_id_info { /* */ struct echo_obd { - struct obdo eo_oa; - cfs_spinlock_t eo_lock; - __u64 eo_lastino; - struct lustre_handle eo_nl_lock; - cfs_atomic_t eo_prep; + struct obd_device_target eo_obt; + struct obdo eo_oa; + cfs_spinlock_t eo_lock; + __u64 eo_lastino; + struct lustre_handle eo_nl_lock; + cfs_atomic_t eo_prep; }; struct ost_obd { diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index 6e8a459..f77a8b4 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -554,6 +554,7 @@ static int echo_setup(struct obd_device *obd, struct lustre_cfg *lcfg) char ns_name[48]; ENTRY; + obd->u.echo.eo_obt.obt_magic = OBT_MAGIC; cfs_spin_lock_init(&obd->u.echo.eo_lock); obd->u.echo.eo_lastino = ECHO_INIT_OID; -- 1.8.3.1