PPC syscalls for XFS
Subsystems (2)
hi,
Quoted 5 lines · Kain
To whom it may concern, I'd like to get some PPC syscalls reserved for XFS xattr support, with syscalls #226-#237 to the xattr support; this is the same position and range that is used for these syscalls on i386.
Syscall numbers already exist for PPC, see the 2.5 tree (the numbers you've suggested are not the same, btw, so should not be used). Also, in case its unclear; use of 'x' in xattr stands for eXtended, not Xfs, as your "Subject:" line suggests.
Marcelo - attached is the 2.4 backport of this again, it didn't seem to make it into 2.4.19[-pre3/4], when last I forwarded it on.
cheers.
Signature · 1 line
Nathan
Documentation/filesystems/Locking +9 -1
@@ -45,6 +45,10 @@ int (*revalidate) (struct dentry *); int (*setattr) (struct dentry *, struct iattr *); int (*getattr) (struct dentry *, struct iattr *); + int (*setxattr) (struct dentry *, const char *, void *, size_t, int); + ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); + ssize_t (*listxattr) (struct dentry *, char *, size_t); + int (*removexattr) (struct dentry *, const char *); locking rules: all may block
@@ -61,9 +65,13 @@ follow_link: no no no truncate: yes yes no (see below) setattr: yes if ATTR_SIZE no -permssion: yes no no +permission: yes no no getattr: (see below) revalidate: no (see below) +setxattr: yes no no +getxattr: yes no no +listxattr: yes no no +removexattr: yes no no Additionally, ->rmdir() has i_zombie on victim and so does ->rename() in case when target exists and is a directory. ->rename() on directories has (per-superblock) ->s_vfs_rename_sem.
arch/i386/kernel/entry.S +12 -12
@@ -622,18 +622,18 @@ .long SYMBOL_NAME(sys_ni_syscall) /* Reserved for Security */ .long SYMBOL_NAME(sys_gettid) .long SYMBOL_NAME(sys_readahead) /* 225 */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for setxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for lsetxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for fsetxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for getxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* 230 reserved for lgetxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for fgetxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for listxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for llistxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for flistxattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* 235 reserved for removexattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for lremovexattr */ - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for fremovexattr */ + .long SYMBOL_NAME(sys_setxattr) + .long SYMBOL_NAME(sys_lsetxattr) + .long SYMBOL_NAME(sys_fsetxattr) + .long SYMBOL_NAME(sys_getxattr) + .long SYMBOL_NAME(sys_lgetxattr) /* 230 */ + .long SYMBOL_NAME(sys_fgetxattr) + .long SYMBOL_NAME(sys_listxattr) + .long SYMBOL_NAME(sys_llistxattr) + .long SYMBOL_NAME(sys_flistxattr) + .long SYMBOL_NAME(sys_removexattr) /* 235 */ + .long SYMBOL_NAME(sys_lremovexattr) + .long SYMBOL_NAME(sys_fremovexattr) .long SYMBOL_NAME(sys_tkill) .rept NR_syscalls-(.-sys_call_table)/4
fs/Makefile +1 -1
@@ -14,7 +14,7 @@ super.o block_dev.o char_dev.o stat.o exec.o pipe.o namei.o \ fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \ dcache.o inode.o attr.o bad_inode.o file.o iobuf.o dnotify.o \ - filesystems.o namespace.o seq_file.o + filesystems.o namespace.o seq_file.o xattr.o ifeq ($(CONFIG_QUOTA),y) obj-y += dquot.o
fs/xattr.c +347 -0
347 lines not on this page · raw message
include/linux/fs.h +4 -0
@@ -861,6 +861,10 @@int (*revalidate) (struct dentry *);int (*setattr) (struct dentry *,struct iattr *);int (*getattr) (struct dentry *,struct iattr *); +int (*setxattr) (struct dentry *,const char *,void *,size_t ,int ); +ssize_t (*getxattr) (struct dentry *,const char *,void *,size_t ); +ssize_t (*listxattr) (struct dentry *,char *,size_t ); +int (*removexattr) (struct dentry *,const char *); };struct seq_file ;
include/linux/limits.h +3 -0
@@ -13,6 +13,9 @@#define NAME_MAX 255/* # chars in a file name */ #define PATH_MAX 4096/* # chars in a path name including nul */ #define PIPE_BUF 4096/* # bytes in atomic write to a pipe */ +#define XATTR_NAME_MAX 255/* # chars in an extended attribute name */ +#define XATTR_SIZE_MAX 65536/* size of an extended attribute value (64k) */ +#define XATTR_LIST_MAX 65536/* size of extended attribute namelist (64k) */ #define RTSIG_MAX 32
include/linux/xattr.h +15 -0
@@ -0,0 +1,15 @@ +/* +File: linux/xattr.h + +Extended attributes handling. + +Copyright (C) 2001 by Andreas Gruenbacher <[email protected]> +Copyright (C) 2001 SGI - Silicon Graphics, Inc <[email protected]> +*/ +#ifndef _LINUX_XATTR_H +#define _LINUX_XATTR_H + +#define XATTR_CREATE 0x1/* set value, fail if attr already exists */ +#define XATTR_REPLACE 0x2/* set value, fail if attr does not exist */ + +#endif /* _LINUX_XATTR_H */