squashfs: add xattr support configure option
Subsystems (2)
PATCH 4/4 squashfs: add xattr support configure option
Signed-off-by Phillip Lougher <[email protected]>
--- fs/squashfs/Kconfig | 11 +++++++++++ fs/squashfs/Makefile | 2 +- fs/squashfs/inode.c | 1 + fs/squashfs/namei.c | 1 + fs/squashfs/squashfs.h | 6 ------ fs/squashfs/super.c | 4 +++- fs/squashfs/symlink.c | 1 + fs/squashfs/xattr.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 fs/squashfs/xattr.h
fs/squashfs/Kconfig +11 -0
@@ -26,6 +26,17 @@ config SQUASHFS If unsure, say N. +config SQUASHFS_XATTRS + bool "Squashfs XATTR support" + depends on SQUASHFS + default n + help + Saying Y here includes support for extended attributes (xattrs). + Xattrs are name:value pairs associated with inodes by + the kernel or by users (see the attr(5) manual page). + + If unsure, say N. + config SQUASHFS_EMBEDDED bool "Additional option for memory-constrained systems"
fs/squashfs/Makefile +1 -1
@@ -5,5 +5,5 @@ obj-$(CONFIG_SQUASHFS) += squashfs.o squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o -squashfs-y += xattr.o xattr_id.o +squashfs-$(CONFIG_SQUASHFS_XATTRS) += xattr.o xattr_id.o
fs/squashfs/inode.c +1 -0
@@ -46,6 +46,7 @@#include "squashfs_fs_sb.h" #include "squashfs_fs_i.h" #include "squashfs.h" +#include "xattr.h" /* * Initialise VFS inode with the base inode information common to all
fs/squashfs/namei.c +1 -0
@@ -63,6 +63,7 @@#include "squashfs_fs_sb.h" #include "squashfs_fs_i.h" #include "squashfs.h" +#include "xattr.h" /* * Lookup name in the directory index, returning the location of the metadata
fs/squashfs/squashfs.h +0 -6
@@ -76,12 +76,6 @@ extern int squashfs_read_inode(struct inode *, long long);/* xattr.c */ extern ssize_t squashfs_listxattr (struct dentry *,char *,size_t ); -/* xattr_id.c */ -extern int squashfs_xattr_lookup (struct super_block *,unsigned int ,int *, -int *,long long *); -extern __le64 *squashfs_read_xattr_id_table (struct super_block *,u64 , -u64 *,int *); -/* * Inodes, files, decompressor and xattr operations */
fs/squashfs/super.c +3 -1
@@ -43,6 +43,7 @@#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h" +#include "xattr.h" static struct file_system_type squashfs_fs_type;static const struct super_operations squashfs_super_ops;
@@ -272,7 +273,8 @@ allocate_xattr_table:if (IS_ERR (msblk->xattr_id_table)) { err =PTR_ERR (msblk->xattr_id_table); msblk->xattr_id_table =NULL ; - goto failed_mount; +if (err != -ENOTSUPP ) + goto failed_mount; } allocate_root: root =new_inode (sb);
fs/squashfs/symlink.c +1 -0
@@ -41,6 +41,7 @@#include "squashfs_fs_sb.h" #include "squashfs_fs_i.h" #include "squashfs.h" +#include "xattr.h" static int squashfs_symlink_readpage (struct file *file,struct page *page) {
fs/squashfs/xattr.h new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.6.3.3
Quoted 1 line · Phillip Lougher
+config
SQUASHFS_XATTRS
Sorry for not noticing before, but all other file systems use "<fs>_XATTR", not "<fs>_XATTRS". Just for consistency...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds