From: "J. R. Okajima" <hooanon05@yahoo.co.jp>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, "J. R. Okajima" <hooanon05@yahoo.co.jp>
Subject: [RFC Aufs2 #2 02/28] aufs public header file
Date: Mon, 16 Mar 2009 16:20:14 +0900 [thread overview]
Message-ID: <1237188040-11404-3-git-send-email-hooanon05@yahoo.co.jp> (raw)
In-Reply-To: <1237188040-11404-1-git-send-email-hooanon05@yahoo.co.jp>
initial commit
public header file
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
---
include/linux/Kbuild | 1 +
include/linux/aufs_type.h | 98 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 include/linux/aufs_type.h
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 106c3ba..d0c7262 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -34,6 +34,7 @@ header-y += atmppp.h
header-y += atmsap.h
header-y += atmsvc.h
header-y += atm_zatm.h
+header-y += aufs_type.h
header-y += auto_fs4.h
header-y += ax25.h
header-y += b1lli.h
diff --git a/include/linux/aufs_type.h b/include/linux/aufs_type.h
new file mode 100644
index 0000000..419c853
--- /dev/null
+++ b/include/linux/aufs_type.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2005-2009 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __AUFS_TYPE_H__
+#define __AUFS_TYPE_H__
+
+#include <linux/ioctl.h>
+
+#define AUFS_VERSION "2"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
+
+/* ---------------------------------------------------------------------- */
+
+#ifdef CONFIG_AUFS_BRANCH_MAX_127
+/* some environments treat 'char' as 'unsigned char' by default */
+typedef signed char aufs_bindex_t;
+#define AUFS_BRANCH_MAX 127
+#else
+typedef short aufs_bindex_t;
+#ifdef CONFIG_AUFS_BRANCH_MAX_511
+#define AUFS_BRANCH_MAX 511
+#elif defined(CONFIG_AUFS_BRANCH_MAX_1023)
+#define AUFS_BRANCH_MAX 1023
+#elif defined(CONFIG_AUFS_BRANCH_MAX_32767)
+#define AUFS_BRANCH_MAX 32767
+#endif
+#endif
+
+#ifdef __KERNEL__
+#ifndef AUFS_BRANCH_MAX
+#error unknown CONFIG_AUFS_BRANCH_MAX value
+#endif
+#endif /* __KERNEL__ */
+
+/* ---------------------------------------------------------------------- */
+
+#define AUFS_NAME "aufs"
+#define AUFS_FSTYPE AUFS_NAME
+
+#define AUFS_ROOT_INO 2
+#define AUFS_FIRST_INO 11
+
+#define AUFS_WH_PFX ".wh."
+#define AUFS_WH_PFX_LEN ((int)sizeof(AUFS_WH_PFX) - 1)
+#define AUFS_XINO_FNAME "." AUFS_NAME ".xino"
+#define AUFS_XINO_DEFPATH "/tmp/" AUFS_XINO_FNAME
+#define AUFS_XINO_TRUNC_INIT 64 /* blocks */
+#define AUFS_XINO_TRUNC_STEP 4 /* blocks */
+#define AUFS_DIRWH_DEF 3
+#define AUFS_RDCACHE_DEF 10 /* seconds */
+#define AUFS_WKQ_NAME AUFS_NAME "d"
+#define AUFS_NWKQ_DEF 4
+#define AUFS_MFS_SECOND_DEF 30 /* seconds */
+#define AUFS_PLINK_WARN 100 /* number of plinks */
+
+#define AUFS_DIROPQ_NAME AUFS_WH_PFX ".opq" /* whiteouted doubly */
+#define AUFS_WH_DIROPQ AUFS_WH_PFX AUFS_DIROPQ_NAME
+
+#define AUFS_BASE_NAME AUFS_WH_PFX AUFS_NAME
+#define AUFS_PLINKDIR_NAME AUFS_WH_PFX "plnk"
+#define AUFS_ORPHDIR_NAME AUFS_WH_PFX "orph"
+
+/* doubly whiteouted */
+#define AUFS_WH_BASE AUFS_WH_PFX AUFS_BASE_NAME
+#define AUFS_WH_PLINKDIR AUFS_WH_PFX AUFS_PLINKDIR_NAME
+#define AUFS_WH_ORPHDIR AUFS_WH_PFX AUFS_ORPHDIR_NAME
+
+/* branch permission */
+#define AUFS_BRPERM_RW "rw"
+#define AUFS_BRPERM_RO "ro"
+#define AUFS_BRPERM_RR "rr"
+#define AUFS_BRPERM_WH "wh"
+#define AUFS_BRPERM_NLWH "nolwh"
+#define AUFS_BRPERM_ROWH AUFS_BRPERM_RO "+" AUFS_BRPERM_WH
+#define AUFS_BRPERM_RRWH AUFS_BRPERM_RR "+" AUFS_BRPERM_WH
+#define AUFS_BRPERM_RWNLWH AUFS_BRPERM_RW "+" AUFS_BRPERM_NLWH
+
+/* ---------------------------------------------------------------------- */
+
+/* ioctl */
+enum {
+ AuCtl_PLINK_MAINT,
+ AuCtl_PLINK_CLEAN
+};
+
+#define AuCtlType 'A'
+#define AUFS_CTL_PLINK_MAINT _IO(AuCtlType, AuCtl_PLINK_MAINT)
+#define AUFS_CTL_PLINK_CLEAN _IO(AuCtlType, AuCtl_PLINK_CLEAN)
+
+#endif /* __AUFS_TYPE_H__ */
--
1.6.1.284.g5dc13
next prev parent reply other threads:[~2009-03-16 7:29 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 7:20 [RFC Aufs2 #2 00/28] source files J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 01/28] aufs documents J. R. Okajima
2009-03-16 7:20 ` J. R. Okajima [this message]
2009-03-16 7:20 ` [RFC Aufs2 #2 03/28] aufs module global J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 04/28] aufs super_block J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 05/28] aufs branch directory/filesystem J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 06/28] aufs xino J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 07/28] aufs object lifetime management via sysfs J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 08/28] aufs mount options/flags J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 09/28] aufs workqueue J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 10/28] aufs sub-VFS J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 11/28] aufs sub-dcache J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 12/28] aufs copy-up J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 13/28] aufs whiteout J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 14/28] aufs pseudo-link J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 15/28] aufs policies to select one among multiple writable branches J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 16/28] aufs dentry and lookup J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 17/28] aufs file J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 18/28] aufs direcotry J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 19/28] aufs inode J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 20/28] aufs ioctl J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 21/28] aufs sysfs entries J. R. Okajima
2009-03-16 18:05 ` Greg KH
2009-03-17 3:26 ` hooanon05
2009-03-17 3:37 ` Greg KH
2009-03-17 4:05 ` hooanon05
2009-03-17 4:22 ` Greg KH
2009-03-17 4:50 ` hooanon05
2009-03-17 10:39 ` Evgeniy Polyakov
2009-03-17 12:56 ` hooanon05
2009-03-19 8:04 ` hooanon05
2009-03-16 7:20 ` [RFC Aufs2 #2 22/28] aufs branch for loopback block device J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 23/28] aufs internal inotify J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 24/28] aufs test for fstype J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 25/28] aufs debug J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 26/28] export splice functions J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 27/28] export lookup functions J. R. Okajima
2009-03-16 7:20 ` [RFC Aufs2 #2 28/28] kbuild aufs J. R. Okajima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237188040-11404-3-git-send-email-hooanon05@yahoo.co.jp \
--to=hooanon05@yahoo.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®