Whamcloud - gitweb
add temporary backpointer from lu_device to obd_device
authornikita <nikita>
Mon, 3 Apr 2006 15:27:28 +0000 (15:27 +0000)
committernikita <nikita>
Mon, 3 Apr 2006 15:27:28 +0000 (15:27 +0000)
lustre/include/linux/lu_object.h
lustre/include/linux/obd_class.h

index e2cee58..42beb50 100644 (file)
@@ -182,6 +182,9 @@ struct lu_device {
        struct lu_device_operations *ld_ops;
        struct lu_site              *ld_site;
         struct proc_dir_entry       *ld_proc_entry;
+
+        /* XXX: temporary back pointer into obd. */
+        struct obd_device           *ld_obd;
 };
 
 struct lu_device_type_operations;
index 409ac7b..2757b5f 100644 (file)
@@ -318,6 +318,7 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg)
                 d = ldt->ldt_ops->ldto_device_alloc(ldt, cfg);
                 if (!IS_ERR(d)) {
                         obd->obd_lu_dev = d;
+                        d->ld_obd = obd;
                         rc = 0;
                 } else
                         rc = PTR_ERR(d);