Whamcloud - gitweb
LU-709 build: clean up quota_read, follow_link and RCU
[fs/lustre-release.git] / lustre / include / linux / lustre_log.h
index 2f21583..e9c8e56 100644 (file)
@@ -1,81 +1,57 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
+/*
+ * GPL HEADER START
  *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com>
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *   This file is part of Lustre, http://www.lustre.org.
+ * 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.
  *
- *   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 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).
  *
- *   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 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 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.
+ * 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.
  *
- * Generic infrastructure for managing a collection of logs.
+ * GPL HEADER END
+ */
+/*
+ * Copyright (c) 2003, 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.
  *
- * These logs are used for:
+ * lustre/include/linux/lustre_log.h
  *
- * - orphan recovery: OST adds record on create
- * - mtime/size consistency: the OST adds a record on first write
- * - open/unlinked objects: OST adds a record on destroy
+ * Generic infrastructure for managing a collection of logs.
+ * These logs are used for:
+ *  - orphan recovery: OST adds record on create
+ *  - mtime/size consistency: the OST adds a record on first write
+ *  - open/unlinked objects: OST adds a record on destroy
  *
- * - mds unlink log: the MDS adds an entry upon delete
+ *  - mds unlink log: the MDS adds an entry upon delete
  *
- * - raid1 replication log between OST's
- * - MDS replication logs
+ *  - raid1 replication log between OST's
+ *  - MDS replication logs
  */
 
-#ifndef _LUSTRE_LOG_H
-#define _LUSTRE_LOG_H
-
-#include <linux/lustre_idl.h>
-
-struct obd_trans_info;
-struct obd_device;
-struct lov_stripe_md;
-
-/* In-memory descriptor for a log object or log catalog */
-struct llog_handle {
-        struct list_head        lgh_list;
-        struct llog_cookie      lgh_cookie;
-        struct semaphore        lgh_lock;
-        struct obd_device      *lgh_obd;
-        void                   *lgh_hdr;
-        struct file            *lgh_file;
-        struct obd_uuid        *lgh_tgtuuid;
-        struct llog_handle     *lgh_current;
-        struct llog_handle     *(*lgh_log_create)(struct obd_device *obd);
-        struct llog_handle     *(*lgh_log_open)(struct obd_device *obd,
-                                                struct llog_cookie *logcookie);
-        int                     (*lgh_log_close)(struct llog_handle *cathandle,
-                                                 struct llog_handle *loghandle);
-        int                     lgh_index;
-};
-
-extern int llog_add_record(struct llog_handle *cathandle,
-                           struct llog_trans_hdr *rec,
-                           struct llog_cookie *logcookies);
+#ifndef _LINUX_LUSTRE_LOG_H
+#define _LINUX_LUSTRE_LOG_H
 
-extern int llog_cancel_records(struct llog_handle *cathandle, int count,
-                               struct llog_cookie *cookies);
+#ifndef _LUSTRE_LOG_H
+#error Do not #include this file directly. #include <lustre_log.h> instead
+#endif
 
-extern struct llog_handle *llog_alloc_handle(void);
-extern void llog_free_handle(struct llog_handle *handle);
-extern int llog_init_catalog(struct llog_handle *cathandle,
-                             struct obd_uuid *tgtuuid);
-extern int llog_delete_log(struct llog_handle *cathandle,
-                           struct llog_handle *loghandle);
-extern int llog_close_log(struct llog_handle *cathandle,
-                          struct llog_handle *loghandle);
-extern struct llog_handle *llog_new_log(struct llog_handle *cathandle,
-                                        struct obd_uuid *tgtuuid);
+#define LUSTRE_LOG_SERVER
 
 #endif
-