%patch Index: 2.4.x-xfs/Documentation/Configure.help =================================================================== --- 2.4.x-xfs.orig/Documentation/Configure.help 2005-12-20 14:55:06.602224176 +1100 +++ 2.4.x-xfs/Documentation/Configure.help 2005-12-20 14:55:26.426624421 +1100 @@ -17571,6 +17571,30 @@ Say Y here if you want to try writing to UFS partitions. This is experimental, so you should back up your UFS partitions beforehand. +DMAPI +CONFIG_DMAPI + The Data Management API is a system interface used to implement + the interface defined in the X/Open document: + "Systems Management: Data Storage Management (XDSM) API", + dated February 1997. This interface is used by hierarchical + storage management systems. + + If you want to compile the DMAPI subsystem as a module ( = + code which can be inserted in and removed from the running kernel + whenever you want), say M here and read + . The module will be called dmapi.o. + + If any DMAPI-capable filesystem is built into the kernel, then + DMAPI must also be built into the kernel. + + If unsure, say N. + +Debugging support (EXPERIMENTAL) +CONFIG_DMAPI_DEBUG + Say Y here to get a DMAPI build with debugging features. + + Say N unless you are a DMAPI developer. + XFS filesystem support CONFIG_XFS_FS XFS is a high performance journaling filesystem which originated @@ -17591,6 +17615,16 @@ system of your root partition is compiled as a module, you'll need to use an initial ramdisk (initrd) to boot. +DMAPI support +CONFIG_XFS_DMAPI + The Data Management API is a system interface used to implement + the interface defined in the X/Open document: + "Systems Management: Data Storage Management (XDSM) API", + dated February 1997. This interface is used by hierarchical + storage management systems. + + If unsure, say N. + Quota support CONFIG_XFS_QUOTA If you say Y here, you will be able to set limits for disk usage on Index: 2.4.x-xfs/Documentation/filesystems/xfs.txt =================================================================== --- 2.4.x-xfs.orig/Documentation/filesystems/xfs.txt 2004-11-22 13:47:19.000000000 +1100 +++ 2.4.x-xfs/Documentation/filesystems/xfs.txt 2005-12-20 14:55:26.427600848 +1100 @@ -29,6 +29,10 @@ The preferred buffered I/O size can also be altered on an individual file basis using the ioctl(2) system call. + dmapi + Enable the DMAPI (Data Management API) event callouts. + Use with the "mtpt" option. + ikeep/noikeep When inode clusters are emptied of inodes, keep them around on the disk (ikeep) - this is the traditional XFS behaviour @@ -62,6 +66,11 @@ optional, and the log section can be separate from the data section or contained within it. + mtpt=mountpoint + Use with the "dmapi" option. The value specified here will be + included in the DMAPI mount event, and should be the path of + the actual mountpoint that is used. + noalign Data allocations will not be aligned at stripe unit boundaries. Index: 2.4.x-xfs/MAINTAINERS =================================================================== --- 2.4.x-xfs.orig/MAINTAINERS 2005-12-20 14:53:08.831441513 +1100 +++ 2.4.x-xfs/MAINTAINERS 2005-12-20 14:55:26.428577275 +1100 @@ -2193,6 +2193,14 @@ W: http://oss.sgi.com/projects/xfs S: Supported +DMAPI +P: Silicon Graphics Inc +M: xfs-masters@oss.sgi.com +M: roehrich@sgi.com +L: linux-xfs@oss.sgi.com +W: http://oss.sgi.com/projects/xfs +S: Supported + X86 3-LEVEL PAGING (PAE) SUPPORT P: Ingo Molnar M: mingo@redhat.com Index: 2.4.x-xfs/fs/Config.in =================================================================== --- 2.4.x-xfs.orig/fs/Config.in 2005-12-20 14:55:25.370130254 +1100 +++ 2.4.x-xfs/fs/Config.in 2006-02-15 09:36:50.202378323 +1100 @@ -7,6 +7,9 @@ bool 'Quota support' CONFIG_QUOTA dep_tristate ' VFS v0 quota format support' CONFIG_QFMT_V2 $CONFIG_QUOTA +tristate 'DMAPI support' CONFIG_DMAPI +dep_mbool ' Debugging support (EXPERIMENTAL)' CONFIG_DMAPI_DEBUG $CONFIG_DMAPI $CONFIG_EXPERIMENTAL + tristate 'Kernel automounter support' CONFIG_AUTOFS_FS tristate 'Kernel automounter version 4 support (also supports v3)' CONFIG_AUTOFS4_FS @@ -104,9 +107,13 @@ tristate 'XFS filesystem support' CONFIG_XFS_FS dep_mbool ' POSIX ACL support' CONFIG_XFS_POSIX_ACL $CONFIG_XFS_FS dep_tristate ' Quota support' CONFIG_XFS_QUOTA $CONFIG_XFS_FS +dep_tristate ' DMAPI support' CONFIG_XFS_DMAPI $CONFIG_XFS_FS $CONFIG_DMAPI dep_mbool ' Realtime support (EXPERIMENTAL)' CONFIG_XFS_RT $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL dep_mbool ' Tracing support (EXPERIMENTAL)' CONFIG_XFS_TRACE $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL dep_mbool ' Debugging support (EXPERIMENTAL)' CONFIG_XFS_DEBUG $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL +if [ "$CONFIG_XFS_FS" = "y" -a "$CONFIG_XFS_DMAPI" = "y" ] ; then + define_tristate CONFIG_DMAPI y +fi if [ "$CONFIG_NET" = "y" ]; then Index: 2.4.x-xfs/fs/Makefile =================================================================== --- 2.4.x-xfs.orig/fs/Makefile 2005-12-20 14:55:25.370130254 +1100 +++ 2.4.x-xfs/fs/Makefile 2005-12-20 14:55:26.429553702 +1100 @@ -67,6 +67,7 @@ subdir-$(CONFIG_BEFS_FS) += befs subdir-$(CONFIG_JFS_FS) += jfs subdir-$(CONFIG_XFS_FS) += xfs +subdir-$(CONFIG_DMAPI) += dmapi obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o obj-$(CONFIG_BINFMT_EM86) += binfmt_em86.o Index: 2.4.x-xfs/fs/exec.c =================================================================== --- 2.4.x-xfs.orig/fs/exec.c 2005-04-13 11:27:47.000000000 +1000 +++ 2.4.x-xfs/fs/exec.c 2005-12-20 14:55:26.430530129 +1100 @@ -393,6 +393,13 @@ if (!err) { file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); if (!IS_ERR(file)) { + if (file->f_op && file->f_op->open_exec) { + err = file->f_op->open_exec(inode); + if (err) { + fput(file); + return ERR_PTR(err); + } + } err = deny_write_access(file); if (err) { fput(file); Index: 2.4.x-xfs/include/linux/mm.h =================================================================== --- 2.4.x-xfs.orig/include/linux/mm.h 2005-01-20 16:15:42.000000000 +1100 +++ 2.4.x-xfs/include/linux/mm.h 2005-12-20 14:55:26.431506556 +1100 @@ -134,6 +134,8 @@ void (*open)(struct vm_area_struct * area); void (*close)(struct vm_area_struct * area); struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int unused); +#define HAVE_VMOP_MPROTECT + int (*mprotect)(struct vm_area_struct * area, unsigned int newflags); }; /* Index: 2.4.x-xfs/include/linux/fs.h =================================================================== --- 2.4.x-xfs.orig/include/linux/fs.h 2005-12-20 14:55:06.606129885 +1100 +++ 2.4.x-xfs/include/linux/fs.h 2005-12-20 14:55:26.432482984 +1100 @@ -879,6 +879,8 @@ ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *); ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); +#define HAVE_FOP_OPEN_EXEC + int (*open_exec) (struct inode *); }; struct inode_operations { Index: 2.4.x-xfs/mm/mprotect.c =================================================================== --- 2.4.x-xfs.orig/mm/mprotect.c 2004-11-22 13:47:19.000000000 +1100 +++ 2.4.x-xfs/mm/mprotect.c 2005-12-20 14:55:26.433459411 +1100 @@ -300,6 +300,11 @@ goto out; } + if (vma->vm_ops && vma->vm_ops->mprotect) { + error = vma->vm_ops->mprotect(vma, newflags); + if (error < 0) + goto out; + } if (vma->vm_end > end) { error = mprotect_fixup(vma, &prev, nstart, end, newflags); goto out; %diffstat Documentation/Configure.help | 34 ++++++++++++++++++++++++++++++++++ Documentation/filesystems/xfs.txt | 9 +++++++++ MAINTAINERS | 8 ++++++++ fs/Config.in | 7 +++++++ fs/Makefile | 1 + fs/exec.c | 7 +++++++ include/linux/fs.h | 2 ++ include/linux/mm.h | 2 ++ mm/mprotect.c | 5 +++++ 9 files changed, 75 insertions(+)