lustre-src/lustre/obdclass/cl_internal.h

00001 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
00002  * vim:expandtab:shiftwidth=8:tabstop=8:
00003  *
00004  * GPL HEADER START
00005  *
00006  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License version 2 only,
00010  * as published by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * General Public License version 2 for more details (a copy is included
00016  * in the LICENSE file that accompanied this code).
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * version 2 along with this program; If not, see
00020  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
00021  *
00022  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
00023  * CA 95054 USA or visit www.sun.com if you need additional information or
00024  * have any questions.
00025  *
00026  * GPL HEADER END
00027  */
00028 /*
00029  * Copyright  2008 Sun Microsystems, Inc. All rights reserved
00030  * Use is subject to license terms.
00031  */
00032 /*
00033  * This file is part of Lustre, http://www.lustre.org/
00034  * Lustre is a trademark of Sun Microsystems, Inc.
00035  *
00036  * Internal cl interfaces.
00037  *
00038  *   Author: Nikita Danilov <nikita.danilov@sun.com>
00039  */
00040 #ifndef _CL_INTERNAL_H
00041 #define _CL_INTERNAL_H
00042 
00043 #define CLT_PVEC_SIZE (14)
00044 
00050 enum clt_nesting_level {
00051         CNL_TOP,
00052         CNL_SUB,
00053         CNL_NR
00054 };
00055 
00059 struct cl_thread_counters {
00064         int           ctc_nr_locks_locked;
00066         struct lu_ref ctc_locks_locked;
00068         int           ctc_nr_held;
00070         int           ctc_nr_used;
00072         int           ctc_nr_locks_acquired;
00073 };
00074 
00078 struct cl_thread_info {
00079         /*
00080          * Common fields.
00081          */
00082         struct cl_io         clt_io;
00083         struct cl_2queue     clt_queue;
00084 
00085         /*
00086          * Fields used by cl_lock.c
00087          */
00088         struct cl_lock_descr clt_descr;
00089         struct cl_page_list  clt_list;
00093         struct cl_thread_counters clt_counters[CNL_NR];
00096         /*
00097          * Fields used by cl_page.c
00098          */
00099         struct cl_page      *clt_pvec[CLT_PVEC_SIZE];
00100 
00101         /*
00102          * Fields used by cl_io.c
00103          */
00107         struct cl_io        *clt_current_io;
00111         struct cl_sync_io    clt_anchor;
00112 };
00113 
00114 struct cl_thread_info *cl_env_info(const struct lu_env *env);
00115 
00116 #endif /* _CL_INTERNAL_H */

Generated on Mon Apr 12 04:18:21 2010 for Lustre 1.10.0.40-0-g9a80ff7 by doxygen 1.4.7

Contact | About Sun | News | Employment | Privacy | Terms of Use | Trademarks | (C) 2008 Sun Microsystems, Inc.