as the label is marked with ':' at the beginning
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I54b651392834278bf1b0d72807576970887ca2b3
Reviewed-on: http://review.whamcloud.com/3610
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
-static char *osd_label_get(const struct lu_env *env, const struct dt_device *d)
-{
- struct osd_device *dev = osd_dt_dev(d);
- int rc;
- ENTRY;
-
- rc = -udmu_userprop_get_str(&dev->od_objset, DMU_OSD_SVNAME,
- dev->od_svname, sizeof(dev->od_svname));
- if (rc != 0) {
- if (rc == -EOVERFLOW)
- CWARN("%s: buffer too small\n", dev->od_svname);
- RETURN(NULL);
- }
-
- RETURN(&dev->od_svname[0]);
-}
-
static struct dt_device_operations osd_dt_ops = {
.dt_root_get = osd_root_get,
.dt_statfs = osd_statfs,
static struct dt_device_operations osd_dt_ops = {
.dt_root_get = osd_root_get,
.dt_statfs = osd_statfs,
struct lustre_mount_info *lmi;
struct lustre_sb_info *lsi;
dmu_buf_t *rootdb;
struct lustre_mount_info *lmi;
struct lustre_sb_info *lsi;
dmu_buf_t *rootdb;
RETURN(-E2BIG);
strcpy(o->od_mntdev, dev);
RETURN(-E2BIG);
strcpy(o->od_mntdev, dev);
+ strcpy(o->od_svname, lsi->lsi_ldd->ldd_svname);
rc = -udmu_objset_open(o->od_mntdev, &o->od_objset);
if (rc) {
rc = -udmu_objset_open(o->od_mntdev, &o->od_objset);
if (rc) {
- label = osd_label_get(env, &o->od_dt_dev);
- if (label == NULL)
- GOTO(err, rc = -ENODEV);
-
/* Use our own ZAP for inode accounting by default, this can be changed
* via procfs to estimate the inode usage from the block usage */
o->od_quota_iused_est = 0;
/* Use our own ZAP for inode accounting by default, this can be changed
* via procfs to estimate the inode usage from the block usage */
o->od_quota_iused_est = 0;
- rc = osd_procfs_init(o, label);
+ rc = osd_procfs_init(o, o->od_svname);