From 9c43ca9b3e51bdb92930266c4a7dfd12059535db Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Thu, 5 Jul 2012 07:16:18 -0400 Subject: [PATCH] LU-1581 ofd: revert learn osd to be used from lmi This reverts commit 92ff6ccdfb8b069d36840db97820d3ebe44dfd5b This patch has broken builds: ofd_dev.c>:106: error: 'struct lustre_sb_info' has no member named 'lsi_osd_type' Change-Id: Id3aa27c513575689c3b33754639b64f716d651f0 Reviewed-on: http://review.whamcloud.com/3279 Reviewed-by: Johann Lombardi Tested-by: Johann Lombardi --- lustre/ofd/ofd_dev.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 8711a30..9297ec3 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -70,21 +70,14 @@ static int ofd_stack_init(const struct lu_env *env, struct lu_device_type *ldt; struct lu_device *d; struct ofd_thread_info *info = ofd_info(env); - struct lustre_mount_info *lmi; int rc; ENTRY; - lmi = server_get_mount_2(dev); - if (lmi == NULL) { - CERROR("Cannot get mount info for %s!\n", dev); - RETURN(-EFAULT); - } - - type = class_get_type(s2lsi(lmi->lmi_sb)->lsi_osd_type); + /* XXX: we should be able to use different OSDs here */ + type = class_get_type(LUSTRE_OSD_NAME); if (!type) { - CERROR("Unknown type: '%s'\n", - s2lsi(lmi->lmi_sb)->lsi_osd_type); + CERROR("Unknown type: '%s'\n", LUSTRE_OSD_NAME); RETURN(-ENODEV); } @@ -96,15 +89,14 @@ static int ofd_stack_init(const struct lu_env *env, ldt = type->typ_lu; if (ldt == NULL) { - CERROR("type: '%s'\n", s2lsi(lmi->lmi_sb)->lsi_osd_type); + CERROR("type: '%s'\n", LUSTRE_OSD_NAME); GOTO(out_type, rc = -EINVAL); } ldt->ldt_obd_type = type; d = ldt->ldt_ops->ldto_device_alloc(env, ldt, cfg); if (IS_ERR(d)) { - CERROR("Cannot allocate device: '%s'\n", - s2lsi(lmi->lmi_sb)->lsi_osd_type); + CERROR("Cannot allocate device: '%s'\n", LUSTRE_OSD_NAME); GOTO(out_type, rc = -ENODEV); } @@ -117,8 +109,7 @@ static int ofd_stack_init(const struct lu_env *env, type->typ_refcnt++; rc = ldt->ldt_ops->ldto_device_init(env, d, dev, NULL); if (rc) { - CERROR("can't init device '%s', rc = %d\n", - s2lsi(lmi->lmi_sb)->lsi_osd_type, rc); + CERROR("can't init device '%s', rc %d\n", LUSTRE_OSD_NAME, rc); GOTO(out_free, rc); } lu_device_get(d); -- 1.8.3.1