Whamcloud - gitweb
LU-803 echo: fill OBD_MAGIC for echo device
authorJinshan Xiong <jinshan.xiong@whamcloud.com>
Wed, 7 Dec 2011 06:08:53 +0000 (22:08 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 Dec 2011 15:20:50 +0000 (10:20 -0500)
Otherwise it will cause failure on obdfilter-survey.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I505da432cdf04fe3275d2a529f4115b1a3238e94
Reviewed-on: http://review.whamcloud.com/1804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd.h
lustre/obdecho/echo.c

index f32d5ca..2728674 100644 (file)
@@ -584,11 +584,12 @@ struct obd_id_info {
 /* */
 
 struct echo_obd {
 /* */
 
 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 {
 };
 
 struct ost_obd {
index 6e8a459..f77a8b4 100644 (file)
@@ -554,6 +554,7 @@ static int echo_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
         char                       ns_name[48];
         ENTRY;
 
         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;
 
         cfs_spin_lock_init(&obd->u.echo.eo_lock);
         obd->u.echo.eo_lastino = ECHO_INIT_OID;