[PATCH 3/67] aufs global header file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-fsdevel@...>, <linux-kernel@...>
Cc: Junjiro Okajima <hooanon05@...>
Date: Friday, May 16, 2008 - 10:32 am

From: Junjiro Okajima <hooanon05@yahoo.co.jp>

	initial commit
	aufs global header file

Signed-off-by: Junjiro Okajima <hooanon05@yahoo.co.jp>
---
 include/linux/aufs_type.h |  111 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/include/linux/aufs_type.h b/include/linux/aufs_type.h
new file mode 100644
index 0000000..1f56ec9
--- /dev/null
+++ b/include/linux/aufs_type.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008 Junjiro 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.
+ *
+ * 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 for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+/* $Id: aufs_type.h,v 1.106 2008/05/12 00:29:11 sfjro Exp $ */
+
+#include <linux/ioctl.h>
+
+#ifndef __AUFS_TYPE_H__
+#define __AUFS_TYPE_H__
+
+#define AUFS_VERSION	"20080516-mm"
+
+/* 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
+#else
+#error unknown CONFIG_AUFS_BRANCH_MAX value
+#endif
+#endif
+
+#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 */
+
+#ifdef CONFIG_AUFS_COMPAT
+#define AUFS_DIROPQ_NAME	"__dir_opaque"
+#else
+#define AUFS_DIROPQ_NAME	AUFS_WH_PFX ".opq" /* whiteouted doubly */
+#endif
+#define AUFS_WH_DIROPQ		AUFS_WH_PFX AUFS_DIROPQ_NAME
+
+/* will be whiteouted doubly */
+#define AUFS_WH_BASENAME	AUFS_WH_PFX AUFS_NAME
+#define AUFS_WH_PLINKDIR	AUFS_WH_PFX "plink"
+
+/* ---------------------------------------------------------------------- */
+
+/* ioctl */
+enum {
+	AuCtlErr,
+	AuCtlErr_Last
+};
+enum {
+	AuCtl_REFRESH, //AuCtl_REFRESHV,
+	//AuCtl_FLUSH_PLINK,
+	//AuCtl_CPUP,
+	AuCtl_CPDOWN, AuCtl_MVDOWN,
+	//AuCtl_DIROPQ
+};
+
+struct aufs_ctl_cp {
+	int bsrc, bdst;
+	int err;
+};
+
+#define AuCtlType		'A'
+#define AUFS_CTL_REFRESH	_IO(AuCtlType, AuCtl_REFRESH)
+//#define AUFS_CTL_REFRESHV	_IO(AuCtlType, AuCtl_REFRESHV)
+//#define AUFS_CTL_FLUSH_PLINK	_IOR(AuCtlType, AuCtl_FLUSH_PLINK)
+//#define AUFS_CTL_CPUP		_IOWR(AuCtlType, AuCtl_CPUP, struct aufs_ctl_cp)
+#define AUFS_CTL_CPDOWN \
+	_IOWR(AuCtlType, AuCtl_CPDOWN, struct aufs_ctl_cp)
+#define AUFS_CTL_MVDOWN \
+	_IOWR(AuCtlType, AuCtl_MVDOWN, struct aufs_ctl_cp)
+//#define AUFS_CTL_DIROPQ		_IO(AuCtlType, AuCtl_DIROPQ)
+
+#endif /* __AUFS_TYPE_H__ */
-- 
1.4.4.4

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/67] aufs document, , (Fri May 16, 10:32 am)
Re: [PATCH 1/67] aufs document, Dave Quigley, (Fri May 16, 10:59 am)
Re: [PATCH 1/67] aufs document , , (Fri May 16, 11:45 am)
Re: [PATCH 1/67] aufs document, Dave Quigley, (Fri May 16, 12:09 pm)
Re: [PATCH 1/67] aufs document , , (Fri May 16, 10:06 pm)
Re: [PATCH 1/67] aufs document, Jan Engelhardt, (Fri May 16, 11:32 am)
Re: [PATCH 1/67] aufs document , , (Sun May 18, 10:25 pm)
Re: [PATCH 1/67] aufs document, Josef 'Jeff' Sipek, (Fri May 16, 5:07 pm)
[PATCH 2/67] aufs manual, , (Fri May 16, 10:32 am)
[PATCH 3/67] aufs global header file, , (Fri May 16, 10:32 am)
[PATCH 4/67] aufs configuration, , (Fri May 16, 10:32 am)
Re: [PATCH 4/67] aufs configuration, Jan Engelhardt, (Fri May 16, 11:28 am)
Re: [PATCH 4/67] aufs configuration , , (Sun May 18, 10:23 pm)
[PATCH 5/67] aufs Makefile, , (Fri May 16, 10:32 am)
Re: [PATCH 5/67] aufs Makefile, Sam Ravnborg, (Fri May 16, 1:25 pm)
Re: [PATCH 5/67] aufs Makefile , , (Sun May 18, 10:27 pm)
[PATCH 6/67] aufs main header file, , (Fri May 16, 10:32 am)
Re: [PATCH 6/67] aufs main header file, Jan Engelhardt, (Fri May 16, 11:33 am)
Re: [PATCH 8/67] aufs module global variables and operations, Jan Engelhardt, (Fri May 16, 11:36 am)
[PATCH 13/67] aufs branch management, , (Fri May 16, 10:32 am)
[PATCH 24/67] aufs sub-VFS, header, , (Fri May 16, 10:32 am)
[PATCH 25/67] aufs sub-VFS, source, , (Fri May 16, 10:32 am)
[PATCH 26/67] aufs sub-dcache, header, , (Fri May 16, 10:32 am)
[PATCH 27/67] aufs sub-dcache, source, , (Fri May 16, 10:32 am)
[PATCH 32/67] aufs pseudo-link, , (Fri May 16, 10:32 am)
[PATCH 36/67] aufs dentry private data, , (Fri May 16, 10:32 am)
[PATCH 37/67] aufs file operations, , (Fri May 16, 10:32 am)
[PATCH 39/67] aufs file private data, , (Fri May 16, 10:32 am)
[PATCH 44/67] aufs inode operations, , (Fri May 16, 10:32 am)
[PATCH 45/67] aufs inode functions, , (Fri May 16, 10:32 am)
[PATCH 46/67] aufs inode private data, , (Fri May 16, 10:33 am)
[PATCH 52/67] aufs inotify handler, , (Fri May 16, 10:33 am)
[PATCH 55/67] aufs export via nfs, , (Fri May 16, 10:33 am)
[PATCH 57/67] aufs sysfs interface, , (Fri May 16, 10:33 am)
[PATCH 62/67] aufs magic sysrq handler, , (Fri May 16, 10:33 am)
[PATCH 63/67] aufs mount helper, , (Fri May 16, 10:33 am)
[PATCH 64/67] aufs pseudo-link helper, , (Fri May 16, 10:33 am)
[PATCH 66/67] aufs umount helper, , (Fri May 16, 10:33 am)
[PATCH 67/67] merge aufs, , (Fri May 16, 10:33 am)