Whamcloud - gitweb
LU-11304 misc: update all url links to whamcloud
[fs/lustre-release.git] / lustre / ofd / ofd_obd.c
index 28bef97..aa59c14 100644 (file)
@@ -72,8 +72,6 @@ static int ofd_export_stats_init(struct ofd_device *ofd,
        int                      rc;
        ENTRY;
 
-       LASSERT(obd->obd_uses_nid_stats);
-
        if (obd_uuid_equals(&exp->exp_client_uuid, &obd->obd_uuid))
                /* Self-export gets no proc entry */
                RETURN(0);
@@ -84,14 +82,11 @@ static int ofd_export_stats_init(struct ofd_device *ofd,
                RETURN(rc == -EALREADY ? 0 : rc);
 
        stats = exp->exp_nid_stats;
-       stats->nid_stats = lprocfs_alloc_stats(NUM_OBD_STATS +
-                                               LPROC_OFD_STATS_LAST,
-                                               LPROCFS_STATS_FLAG_NOPERCPU);
+       stats->nid_stats = lprocfs_alloc_stats(LPROC_OFD_STATS_LAST,
+                                              LPROCFS_STATS_FLAG_NOPERCPU);
        if (stats->nid_stats == NULL)
                RETURN(-ENOMEM);
 
-       lprocfs_init_ops_stats(LPROC_OFD_STATS_LAST, stats->nid_stats);
-
        ofd_stats_counter_init(stats->nid_stats);
 
        rc = lprocfs_register_stats(stats->nid_proc, "stats", stats->nid_stats);
@@ -246,7 +241,7 @@ static int ofd_parse_connect_data(const struct lu_env *env,
                CWARN("!!! This export (nid %s) used object group %d "
                      "earlier; now it's trying to use group %d!  This could "
                      "be a bug in the MDS. Please report to "
-                     "https://jira.hpdd.intel.com/\n",
+                     "https://jira.whamcloud.com/\n",
                      obd_export_nid2str(exp), fed->fed_group,
                      data->ocd_group);
                RETURN(-EPROTO);
@@ -832,8 +827,9 @@ int ofd_statfs(const struct lu_env *env,  struct obd_export *exp,
                struct tg_export_data *ted;
 
                ted = &obd->obd_self_export->exp_target_data;
-               osfs->os_bavail -= min_t(u64, osfs->os_bavail,
-                                        ted->ted_grant >> tgd->tgd_blockbits);
+               osfs->os_granted = min_t(u64, osfs->os_bavail,
+                                         ted->ted_grant >> tgd->tgd_blockbits);
+               osfs->os_bavail -= osfs->os_granted;
        }
 
        tgt_grant_sanity_check(obd, __func__);
@@ -863,6 +859,7 @@ int ofd_statfs(const struct lu_env *env,  struct obd_export *exp,
                osfs->os_blocks <<= tgd->tgd_blockbits - COMPAT_BSIZE_SHIFT;
                osfs->os_bfree  <<= tgd->tgd_blockbits - COMPAT_BSIZE_SHIFT;
                osfs->os_bavail <<= tgd->tgd_blockbits - COMPAT_BSIZE_SHIFT;
+               osfs->os_granted <<= tgd->tgd_blockbits - COMPAT_BSIZE_SHIFT;
                osfs->os_bsize    = 1 << COMPAT_BSIZE_SHIFT;
        }