X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Flu_time.c;h=8b1310aa3a4b2810dc3dbe2be3f58fba4d51f056;hp=77c053dd5eac55b5b9a101bb1eceb352b00e934e;hb=b0f08a4e902411a8fbdb660e5b32c5821ca7159f;hpb=1f8b7d9dd5ecf9eecaf52327f114201c3c171554 diff --git a/lustre/obdclass/lu_time.c b/lustre/obdclass/lu_time.c index 77c053d..8b1310a 100644 --- a/lustre/obdclass/lu_time.c +++ b/lustre/obdclass/lu_time.c @@ -1,38 +1,48 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: +/* + * GPL HEADER START * - * Lustre Time Tracking. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. * - * Copyright (C) 2006 Cluster File Systems, Inc. - * Author: Nikita Danilov + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. + * 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 * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. + * 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. * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. + * GPL HEADER END + */ +/* + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. + * lustre/obdclass/lu_time.c * + * Lustre Time Tracking. * These are the only exported functions, they provide some generic - * infrastructure for managing object devices + * infrastructure for managing object devices. + * + * Author: Nikita Danilov */ #define DEBUG_SUBSYSTEM S_CLASS -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif +#include /* OBD_{ALLOC,FREE}_PTR() */ #include #include @@ -116,7 +126,7 @@ EXPORT_SYMBOL(lu_time_named_init); int lu_time_init(struct lprocfs_stats **stats, cfs_proc_dir_entry_t *entry, const char **names, int nr) { - return lu_time_named_init(stats, "stats", entry, names, nr); + return lu_time_named_init(stats, "lu_stats", entry, names, nr); } EXPORT_SYMBOL(lu_time_init); @@ -146,7 +156,7 @@ unsigned long long lu_time_stamp_get(void) /* * Return timestamp with microsecond precision. This has to be cheap. */ -//#ifdef CONFIG_X86 +//#ifdef CONFIG_X86 #if defined(CONFIG_X86) && !defined(CONFIG_X86_64) /* * do_gettimeofday() goes backwards sometimes :(. Usethe TSC @@ -160,7 +170,7 @@ unsigned long long lu_time_stamp_get(void) struct timeval now; unsigned long long ret; - do_gettimeofday(&now); + cfs_gettimeofday(&now); ret = now.tv_sec; ret *= 1000000; ret += now.tv_usec;