aboutsummaryrefslogtreecommitdiffstats
path: root/kernel4/autofs_i.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>1997-10-06 21:29:59 +0000
committerH. Peter Anvin <hpa@zytor.com>1997-10-06 21:29:59 +0000
commit3b7c3119b95b43f970c8784fcc946cdc44f9e56d (patch)
tree4b1e65f09cd0529221d564d57961a5fb8d910799 /kernel4/autofs_i.h
parent93aa1d55b4ffe513fb10d897dd52a09165484e4e (diff)
downloadautofs3-3b7c3119b95b43f970c8784fcc946cdc44f9e56d.tar.gz
autofs3-3b7c3119b95b43f970c8784fcc946cdc44f9e56d.tar.xz
autofs3-3b7c3119b95b43f970c8784fcc946cdc44f9e56d.zip
Added kernel v.4 code to the repository.
Diffstat (limited to 'kernel4/autofs_i.h')
-rw-r--r--kernel4/autofs_i.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/kernel4/autofs_i.h b/kernel4/autofs_i.h
new file mode 100644
index 0000000..763b5b7
--- /dev/null
+++ b/kernel4/autofs_i.h
@@ -0,0 +1,95 @@
+/* -*- linux-c -*- ------------------------------------------------------- *
+ *
+ * linux/fs/autofs/autofs_i.h
+ *
+ * Copyright 1997 Transmeta Corporation - All Rights Reserved
+ *
+ * This file is part of the Linux kernel and is made available under
+ * the terms of the GNU General Public License, version 2, or at your
+ * option, any later version, incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+/* Internal header file for autofs */
+
+#include <linux/auto_fs.h>
+#include <linux/auto_fs_i.h>
+
+/* This is the range of ioctl() numbers we claim as ours */
+#define AUTOFS_IOC_FIRST AUTOFS_IOC_READY
+#define AUTOFS_IOC_COUNT 32
+
+#include <linux/kernel.h>
+#include <linux/malloc.h>
+#include <linux/sched.h>
+#include <linux/string.h>
+#include <linux/wait.h>
+#include <asm/uaccess.h>
+
+#ifdef DEBUG
+#define DPRINTK(D) (printk D)
+#else
+#define DPRINTK(D) ((void)0)
+#endif
+
+#define AUTOFS_SUPER_MAGIC 0x0187
+
+/*
+ * If the daemon returns a negative response (AUTOFS_IOC_FAIL) then the
+ * kernel will keep the negative response cached for up to the time given
+ * here, although the time can be shorter if the kernel throws the dcache
+ * entry away. This probably should be settable from user space.
+ */
+#define AUTOFS_NEGATIVE_TIMEOUT (60*HZ) /* 1 minute */
+
+
+/* Magic directory wait queue structure */
+
+struct autofs_wait_queue {
+ unsigned long wait_queue_token;
+ struct wait_queue *queue;
+ struct autofs_wait_queue *next;
+ /* We use the following to see what we are waiting for */
+ int hash;
+ int len;
+ char *name;
+ /* This is for status reporting upon return */
+ int status;
+ int wait_ctr;
+};
+
+#define AUTOFS_ROOT_INO 1
+#define AUTOFS_FIRST_FREE_INO 2
+
+#ifndef END_OF_TIME
+#define END_OF_TIME ((time_t)((unsigned long)((time_t)(~0UL)) >> 1))
+#endif
+
+/* autofs_oz_mode(): do we see the man behind the curtain? (The
+ processes which do manipulations for us in user space sees the raw
+ filesystem without "magic".) */
+extern inline int autofs_oz_mode(struct super_block *sb) {
+ return ((sb->u.autofs_sb.oz_pgrp == current->pgrp) ||
+ (sb->u.autofs_sb.oz_pgrp == 0));
+}
+
+/* Expiration-handling functions */
+
+void autofs_update_usage(struct inode *);
+struct autofs_dir_ent *autofs_expire(struct super_block *, unsigned long);
+
+/* Initializing function */
+
+struct super_block *autofs_read_super(struct super_block *, void *, int);
+
+/* Queue management functions */
+
+int autofs_wait(struct super_block *, struct qstr *);
+int autofs_wait_release(struct super_block *, unsigned long, int);
+void autofs_catatonic_mode(struct super_block *);
+
+#ifdef DEBUG
+void autofs_say(const char *name, int len);
+#else
+#define autofs_say(n,l) ((void)0)
+#endif