/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright (C) 2005 Cluster File Systems, Inc.
- * Author: Lai Siyao <lsy@clusterfs.com>
+ * GPL HEADER START
*
- * This file is part of Lustre, http://www.lustre.org/
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * No redistribution or use is permitted outside of Cluster File Systems, Inc.
+ * 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.
*
- * A kernel module which tests the fsfilt quotacheck API from the OBD setup function.
+ * 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).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see [sun.com URL with a
+ * copy of GPLv2].
+ *
+ * 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.
+ *
+ * GPL HEADER END
+ */
+/*
+ * Copyright 2008 Sun Microsystems, Inc. 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.
+ *
+ * lustre/quota/quotacheck_test.c
+ *
+ * Author: Lai Siyao <lsy@clusterfs.com>
*/
#ifndef EXPORT_SYMTAB
S_ISLNK(inode->i_mode))
size = inode_get_bytes(inode);
- CERROR("%lu: uid: %u, size: %llu, blocks: %lu, real size: %llu\n",
+ CERROR("%lu: uid: %u, size: %llu, blocks: %llu, real size: %llu\n",
inode->i_ino, inode->i_uid, i_size_read(inode),
- inode->i_blocks, size);
+ (unsigned long long)inode->i_blocks, size);
}
/* Test quotaon */
return rc;
}
+#ifdef LPROCFS
+static struct lprocfs_vars lprocfs_quotacheck_test_obd_vars[] = { {0} };
+static struct lprocfs_vars lprocfs_quotacheck_test_module_vars[] = { {0} };
+
+void lprocfs_quotacheck_test_init_vars(struct lprocfs_static_vars *lvars)
+{
+ lvars->module_vars = lprocfs_quotacheck_test_module_vars;
+ lvars->obd_vars = lprocfs_quotacheck_test_obd_vars;
+}
+#endif
+
static int quotacheck_test_cleanup(struct obd_device *obd)
{
lprocfs_obd_cleanup(obd);
static int quotacheck_test_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
{
- struct lprocfs_static_vars lvars;
+ struct lprocfs_static_vars lvars = { 0 };
struct obd_device *tgt;
int rc;
ENTRY;
if (rc)
quotacheck_test_cleanup(obd);
- lprocfs_init_vars(quotacheck_test, &lvars);
+ lprocfs_quotacheck_test_init_vars(&lvars);
lprocfs_obd_setup(obd, lvars.obd_vars);
RETURN(rc);
.o_cleanup = quotacheck_test_cleanup,
};
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_obd_vars[] = { {0} };
-static struct lprocfs_vars lprocfs_module_vars[] = { {0} };
-LPROCFS_INIT_VARS(quotacheck_test, lprocfs_module_vars, lprocfs_obd_vars)
-#endif
-
static int __init quotacheck_test_init(void)
{
- struct lprocfs_static_vars lvars;
+ struct lprocfs_static_vars lvars = { 0 };
- lprocfs_init_vars(quotacheck_test, &lvars);
+ lprocfs_quotacheck_test_init_vars(&lvars);
return class_register_type("acheck_obd_ops, NULL, lvars.module_vars,
"quotacheck_test", NULL);
}
class_unregister_type("quotacheck_test");
}
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
+MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
MODULE_DESCRIPTION("quotacheck test module");
MODULE_LICENSE("GPL");