Whamcloud - gitweb
Introduction of lu_env.
[fs/lustre-release.git] / lustre / cmm / mdc_internal.h
index 1f66261..7d08740 100644 (file)
@@ -1,23 +1,30 @@
 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
  * vim:expandtab:shiftwidth=8:tabstop=8:
  *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
+ *  lustre/cmm/cmm_internal.h
+ *  Lustre Cluster Metadata Manager (cmm),
+ *  MDC device
  *
- *   This file is part of Lustre, http://www.lustre.org.
+ *  Copyright (C) 2006 Cluster File Systems, Inc.
+ *   Author: Mike Pershin <tappro@clusterfs.com>
  *
- *   Lustre is free 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.
+ *   This file is part of the Lustre file system, http://www.lustre.org
+ *   Lustre is a trademark of Cluster File Systems, Inc.
  *
- *   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
- *   GNU General Public License for more details.
+ *   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.
  *
- *   You should have received a copy of the GNU General Public License
- *   along with Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *   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.
  *
+ *   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.
  */
 
 #ifndef _CMM_MDC_INTERNAL_H
 #include <md_object.h>
 
 struct mdc_cli_desc {
-        struct obd_connect_data  cl_conn_data;
+        struct lustre_handle     cl_conn;
+        /* uuid of remote MDT to connect */
         struct obd_uuid          cl_srv_uuid;
+        /* mdc uuid */
+        struct obd_uuid          cl_cli_uuid;
+        /* export of mdc obd */
         struct obd_export        *cl_exp;
 };
 
@@ -39,17 +50,14 @@ struct mdc_device {
         struct md_device        mc_md_dev;
         /* other MD servers in cluster */
         struct list_head        mc_linkage;
-        __u32                   mc_num;
+        mdsno_t                 mc_num;
         struct mdc_cli_desc     mc_desc;
 };
 
-#ifdef CMM_CODE
 struct mdc_thread_info {
-        const struct lu_context *mci_ctxt;
         struct md_op_data       mci_opdata;
         struct ptlrpc_request   *mci_req;
 };
-#endif
 
 struct mdc_object {
        struct md_object        mco_obj;
@@ -67,7 +75,7 @@ static inline struct mdc_device *md2mdc_dev(struct md_device *md)
 
 static inline struct mdc_device *mdc_obj2dev(struct mdc_object *mco)
 {
-       return (md2mdc_dev(md_device_get(&mco->mco_obj)));
+       return (md2mdc_dev(md_obj2dev(&mco->mco_obj)));
 }
 
 static inline struct mdc_object *lu2mdc_obj(struct lu_object *lo)
@@ -85,8 +93,14 @@ static inline struct mdc_device *lu2mdc_dev(struct lu_device *ld)
        return container_of0(ld, struct mdc_device, mc_md_dev.md_lu_dev);
 }
 
-struct lu_object *mdc_object_alloc(const struct lu_context *,
+struct lu_object *mdc_object_alloc(const struct lu_env *,
                                    const struct lu_object_header *,
                                    struct lu_device *);
+#ifdef HAVE_SPLIT_SUPPORT
+int mdc_send_page(struct cmm_device *cmm, const struct lu_env *env,
+                  struct md_object *mo, struct page *page, __u32 end,
+                  struct md_ucred *uc);
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _CMM_MDC_INTERNAL_H */