aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include/lu_target.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 11:40:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 11:40:23 -0700
commitce49b6289fa3878b190f15192e54bb23dca552b6 (patch)
tree666f246067e02968d9526fb3e1a5f6ba70c7a4ca /drivers/staging/lustre/lustre/include/lu_target.h
parentMerge tag 'tty-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty (diff)
parentRevert "Revert "Revert "staging/lustre: drop CONFIG_BROKEN dependency""" (diff)
downloadlinux-dev-ce49b6289fa3878b190f15192e54bb23dca552b6.tar.xz
linux-dev-ce49b6289fa3878b190f15192e54bb23dca552b6.zip
Merge tag 'staging-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging tree update from Greg KH: "Here's the large staging tree merge for 3.11-rc1 Huge thing here is the Lustre client code. Unfortunatly, due to it not building properly on a wide variety of different architectures (this was production code???), it is currently disabled from the build so as to not annoy people. Other than Lustre, there are loads of comedi patches, working to clean up that subsystem, iio updates and new drivers, and a load of cleanups from the OPW applicants in their quest to get a summer internship. All of these have been in the linux-next releases for a while (hence the Lustre code being disabled)" Fixed up trivial conflict in drivers/staging/serqt_usb2/serqt_usb2.c due to independent renamings in the staging driver cleanup and the USB tree.. * tag 'staging-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (868 commits) Revert "Revert "Revert "staging/lustre: drop CONFIG_BROKEN dependency""" staging: rtl8192u: fix line length in r819xU_phy.h staging: rtl8192u: rename variables in r819xU_phy.h staging: rtl8192u: fix comments in r819xU_phy.h staging: rtl8192u: fix whitespace in r819xU_phy.h staging: rtl8192u: fix newlines in r819xU_phy.c staging: comedi: unioxx5: use comedi_alloc_spriv() staging: comedi: unioxx5: fix unioxx5_detach() silicom: checkpatch: errors caused by macros Staging: silicom: remove the board_t typedef in bpctl_mod.c Staging: silicom: capitalize labels in the bp_media_type enum Staging: silicom: remove bp_media_type enum typedef staging: rtl8192u: replace msleep(1) with usleep_range() in r819xU_phy.c staging: rtl8192u: rename dwRegRead and rtStatus in r819xU_phy.c staging: rtl8192u: replace __FUNCTION__ in r819xU_phy.c staging: rtl8192u: limit line size in r819xU_phy.c zram: allow request end to coincide with disksize staging: drm/imx: use generic irq chip unused field to block out invalid irqs staging: drm/imx: use generic irqchip staging: drm/imx: ipu-dmfc: use defines for ipu channel numbers ...
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lu_target.h')
-rw-r--r--drivers/staging/lustre/lustre/include/lu_target.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/include/lu_target.h b/drivers/staging/lustre/lustre/include/lu_target.h
new file mode 100644
index 000000000000..8d48cf4e27ee
--- /dev/null
+++ b/drivers/staging/lustre/lustre/include/lu_target.h
@@ -0,0 +1,91 @@
+/*
+ * GPL HEADER START
+ *
+ * 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.
+ *
+ * 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
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+ *
+ * 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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2012, Intel Corporation.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ */
+
+#ifndef _LUSTRE_LU_TARGET_H
+#define _LUSTRE_LU_TARGET_H
+
+#include <dt_object.h>
+#include <lustre_disk.h>
+
+struct lu_target {
+ struct obd_device *lut_obd;
+ struct dt_device *lut_bottom;
+ /** last_rcvd file */
+ struct dt_object *lut_last_rcvd;
+ /* transaction callbacks */
+ struct dt_txn_callback lut_txn_cb;
+ /** server data in last_rcvd file */
+ struct lr_server_data lut_lsd;
+ /** Server last transaction number */
+ __u64 lut_last_transno;
+ /** Lock protecting last transaction number */
+ spinlock_t lut_translock;
+ /** Lock protecting client bitmap */
+ spinlock_t lut_client_bitmap_lock;
+ /** Bitmap of known clients */
+ unsigned long *lut_client_bitmap;
+};
+
+typedef void (*tgt_cb_t)(struct lu_target *lut, __u64 transno,
+ void *data, int err);
+struct tgt_commit_cb {
+ tgt_cb_t tgt_cb_func;
+ void *tgt_cb_data;
+};
+
+void tgt_boot_epoch_update(struct lu_target *lut);
+int tgt_last_commit_cb_add(struct thandle *th, struct lu_target *lut,
+ struct obd_export *exp, __u64 transno);
+int tgt_new_client_cb_add(struct thandle *th, struct obd_export *exp);
+int tgt_init(const struct lu_env *env, struct lu_target *lut,
+ struct obd_device *obd, struct dt_device *dt);
+void tgt_fini(const struct lu_env *env, struct lu_target *lut);
+int tgt_client_alloc(struct obd_export *exp);
+void tgt_client_free(struct obd_export *exp);
+int tgt_client_del(const struct lu_env *env, struct obd_export *exp);
+int tgt_client_add(const struct lu_env *env, struct obd_export *exp, int);
+int tgt_client_new(const struct lu_env *env, struct obd_export *exp);
+int tgt_client_data_read(const struct lu_env *env, struct lu_target *tg,
+ struct lsd_client_data *lcd, loff_t *off, int index);
+int tgt_client_data_write(const struct lu_env *env, struct lu_target *tg,
+ struct lsd_client_data *lcd, loff_t *off, struct thandle *th);
+int tgt_server_data_read(const struct lu_env *env, struct lu_target *tg);
+int tgt_server_data_write(const struct lu_env *env, struct lu_target *tg,
+ struct thandle *th);
+int tgt_server_data_update(const struct lu_env *env, struct lu_target *tg, int sync);
+int tgt_truncate_last_rcvd(const struct lu_env *env, struct lu_target *tg, loff_t off);
+
+#endif /* __LUSTRE_LU_TARGET_H */