X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ffld%2Ffld_cache.c;h=bb3dfe00fac8b92957453d4b9f7087a4c7587e7c;hb=9b924e86b27d;hp=3b6b898215ce7793ed78d489672b31142347234c;hpb=500f334631c6ebec72f5791472f21603da3e0ef9;p=fs%2Flustre-release.git diff --git a/lustre/fld/fld_cache.c b/lustre/fld/fld_cache.c index 3b6b898..bb3dfe0 100644 --- a/lustre/fld/fld_cache.c +++ b/lustre/fld/fld_cache.c @@ -15,11 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -92,23 +88,16 @@ struct fld_cache *fld_cache_init(const char *name, */ void fld_cache_fini(struct fld_cache *cache) { - __u64 pct; ENTRY; LASSERT(cache != NULL); fld_cache_flush(cache); - if (cache->fci_stat.fst_count > 0) { - pct = cache->fci_stat.fst_cache * 100; - do_div(pct, cache->fci_stat.fst_count); - } else { - pct = 0; - } - CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name); CDEBUG(D_INFO, " Total reqs: %llu\n", cache->fci_stat.fst_count); CDEBUG(D_INFO, " Cache reqs: %llu\n", cache->fci_stat.fst_cache); - CDEBUG(D_INFO, " Cache hits: %llu%%\n", pct); + CDEBUG(D_INFO, " Cache hits: %u%%\n", + pct(cache->fci_stat.fst_cache, cache->fci_stat.fst_count)); OBD_FREE_PTR(cache);