From: sfjro@users.sourceforge.net
To: Ben Hutchings <ben@decadent.org.uk>
Cc: aufs-users@lists.sourceforge.net, Thorsten Glaser <tg@mirbsd.de>,
linux-m68k@vger.kernel.org,
Debian kernel team <debian-kernel@lists.debian.org>
Subject: Re: [PATCH] aufs: Do not refer to AUFS_NAME in pr_fmt
Date: Sat, 31 Dec 2011 13:46:57 +0900 [thread overview]
Message-ID: <9569.1325306817@jrobl> (raw)
In-Reply-To: <1325264773.13595.133.camel@deadeye>
Hello Ben,
Ben Hutchings:
> AUFS_NAME is only defined in aufs_type.h but pr_fmt may be used in
> headers included before aufs_type.h.
Thanx for bug reporting and a patch.
I don't think the "current" macro will be a problem, but I want you to
test this patch since I don't have m68k environment.
It introduces a new separated file include/linux/aufs_name.h.
If you (any of you) think this new file is not a good idea, please let
me know.
J. R. Okajima
diff --git a/Documentation/filesystems/aufs/README b/Documentation/filesystems/aufs/README
index 420faeb..058f95e 100644
--- a/Documentation/filesystems/aufs/README
+++ b/Documentation/filesystems/aufs/README
@@ -213,7 +213,7 @@ If you don't like aufs2-standalone.patch, then try aufs2-2.6 tree.
path on the branch fs.
- apply ./aufs2-standalone.patch too, if you have a plan to set
CONFIG_AUFS_FS=m. otherwise you don't need ./aufs2-standalone.patch.
-- copy ./{Documentation,fs,include/linux/aufs_type.h} files to your
+- copy ./{Documentation,fs,include/linux/*.h} files to your
kernel source tree. Never copy ./include/linux/Kbuild.
- enable CONFIG_EXPERIMENTAL and CONFIG_AUFS_FS, you can select either
=m or =y.
@@ -240,12 +240,12 @@ If you don't like aufs2-standalone.patch, then try aufs2-2.6 tree.
+ run "make install" to install the aufs module, or copy the built
./aufs.ko to /lib/modules/... and run depmod -a (or reboot simply).
+ run "make headers_install" to install the aufs header file (you can
- specify DESTDIR), or copty ./usr/include/linux/aufs_type.h to
+ specify DESTDIR), or copty ./usr/include/linux/*.h to
/usr/include/linux or wherever you like.
- no need to apply aufs2-kbuild.patch, nor copying source files to your
kernel source tree.
-Note: The haeder file aufs_type.h is necessary to build aufs2-util
+Note: The aufs haeder files under include/linux are necessary to build aufs2-util
as well as "make headers_install" in the kernel source tree.
headers_install is subject to be forgotten, but it is essentially
necessary, not only for building aufs2-util.
@@ -255,7 +255,7 @@ Note: The haeder file aufs_type.h is necessary to build aufs2-util
And then,
- read README in aufs2-util, build and install it.
- note that your distribution may contain an obsoleted version of
- aufs_type.h in /usr/include/linux or something. When you build aufs
+ aufs header files in /usr/include/linux or something. When you build aufs
utilities, make sure that your compiler refers the correct aufs header
file which is built by "make headers_install."
- if you want to use readdir(3) in userspace or pathconf(3) wrapper,
diff --git a/fs/aufs/Makefile b/fs/aufs/Makefile
index 0a757f4..b63f12a 100644
--- a/fs/aufs/Makefile
+++ b/fs/aufs/Makefile
@@ -9,6 +9,7 @@ endif
# enable pr_debug
ccflags-y += -DDEBUG
# sparse doesn't allow spaces
+ccflags-y += -imacros linux/aufs_name.h
ccflags-y += -D'pr_fmt(fmt)=AUFS_NAME"\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'
obj-$(CONFIG_AUFS_FS) += aufs.o
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 4268c75..60bd38d 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_name.h
header-y += aufs_type.h
header-y += auto_fs4.h
header-y += ax25.h
diff --git a/include/linux/aufs_name.h b/include/linux/aufs_name.h
new file mode 100644
index 0000000..838cc43
--- /dev/null
+++ b/include/linux/aufs_name.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * 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
+ */
+
+#ifndef __AUFS_NAME_H__
+#define __AUFS_NAME_H__
+
+/* fs/aufs/Makefile refers this macro */
+#define AUFS_NAME "aufs"
+
+#endif /* __AUFS_NAME_H__ */
diff --git a/include/linux/aufs_type.h b/include/linux/aufs_type.h
index ca4a6be..6f23223 100644
--- a/include/linux/aufs_type.h
+++ b/include/linux/aufs_type.h
@@ -28,6 +28,7 @@
#include <stdint.h>
#include <sys/types.h>
#endif
+#include <linux/aufs_name.h>
#define AUFS_VERSION "2.2-stdalone-35-lktr-YyyyMmDd"
@@ -58,7 +59,6 @@ typedef int16_t aufs_bindex_t;
/* ---------------------------------------------------------------------- */
-#define AUFS_NAME "aufs"
#define AUFS_FSTYPE AUFS_NAME
#define AUFS_ROOT_INO 2
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
next prev parent reply other threads:[~2011-12-31 4:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-30 17:06 [PATCH] aufs: Do not refer to AUFS_NAME in pr_fmt Ben Hutchings
2011-12-31 4:46 ` sfjro [this message]
2011-12-31 8:01 ` Geert Uytterhoeven
2011-12-31 16:31 ` Thorsten Glaser
2012-01-02 2:58 ` sfjro
2012-01-02 3:40 ` Ben Hutchings
2012-01-02 4:01 ` sfjro
2012-01-02 2:04 ` sfjro
2011-12-31 22:18 ` Thorsten Glaser
2011-12-31 22:31 ` Thorsten Glaser
2012-01-01 1:15 ` Thorsten Glaser
2012-01-02 6:45 ` sfjro
2012-01-02 10:31 ` Thorsten Glaser
2012-01-02 13:15 ` sfjro
2012-01-02 13:30 ` Thorsten Glaser
2012-01-02 13:53 ` sfjro
2012-01-02 16:14 ` Thorsten Glaser
2012-01-02 16:53 ` sfjro
2012-01-02 17:36 ` Thorsten Glaser
2012-01-03 5:21 ` [PATCH 0/2] aufs: headers (Re: [PATCH] aufs: Do not refer to AUFS_NAME in pr_fmt) sfjro
2012-01-03 5:21 ` [PATCH 1/2] aufs: headers 1/2, bugfix, where the pr_fmt macro definition sfjro
2012-01-03 5:21 ` [PATCH 2/2] aufs: headers 2/2, simply refined sfjro
2011-12-31 22:55 ` [PATCH] aufs: Do not refer to AUFS_NAME in pr_fmt Thorsten Glaser
2012-01-01 8:47 ` Geert Uytterhoeven
2012-01-01 14:48 ` Thorsten Glaser
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=9569.1325306817@jrobl \
--to=sfjro@users.sourceforge.net \
--cc=aufs-users@lists.sourceforge.net \
--cc=ben@decadent.org.uk \
--cc=debian-kernel@lists.debian.org \
--cc=linux-m68k@vger.kernel.org \
--cc=tg@mirbsd.de \
/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