# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1066 -> 1.1067 # arch/ppc/configs/mbx_defconfig 1.12 -> 1.13 # arch/s390x/defconfig 1.9 -> 1.10 # include/linux/sysctl.h 1.27 -> 1.28 # kernel/ksyms.c 1.78 -> 1.79 # arch/m68k/defconfig 1.1 -> 1.2 # include/linux/mm.h 1.42 -> 1.43 # arch/parisc/defconfig 1.3 -> 1.4 # arch/ppc/configs/oak_defconfig 1.12 -> 1.13 # arch/ia64/defconfig 1.9 -> 1.10 # fs/xattr.c 1.1 -> 1.2 # include/linux/sched.h 1.38 -> 1.39 # kernel/sysctl.c 1.23 -> 1.24 # drivers/block/ll_rw_blk.c 1.48 -> 1.49 # arch/ppc/configs/IVMS8_defconfig 1.12 -> 1.13 # arch/i386/defconfig 1.51 -> 1.52 # include/asm-sh/ioctl.h 1.2 -> 1.3 # arch/mips/defconfig 1.7 -> 1.8 # drivers/md/raid5.c 1.15 -> 1.16 # arch/ppc/configs/TQM823L_defconfig 1.11 -> 1.12 # arch/ppc/configs/rpxlite_defconfig 1.13 -> 1.14 # arch/mips64/defconfig 1.9 -> 1.10 # arch/ppc/configs/bseip_defconfig 1.12 -> 1.13 # arch/ppc/configs/spruce_defconfig 1.5 -> 1.6 # arch/ppc/configs/power3_defconfig 1.12 -> 1.13 # include/linux/fs.h 1.85 -> 1.86 # arch/ppc/configs/pmac_defconfig 1.6 -> 1.7 # arch/arm/defconfig 1.2 -> 1.3 # arch/cris/defconfig 1.8 -> 1.9 # arch/ppc/configs/common_defconfig 1.14 -> 1.15 # arch/ppc/configs/TQM860L_defconfig 1.12 -> 1.13 # fs/intermezzo/vfs.c 1.8 -> 1.9 # arch/sparc64/defconfig 1.52 -> 1.53 # mm/filemap.c 1.86 -> 1.87 # fs/namei.c 1.27 -> 1.28 # arch/ppc/configs/SM850_defconfig 1.11 -> 1.12 # mm/mprotect.c 1.4 -> 1.5 # arch/ppc/configs/gemini_defconfig 1.12 -> 1.13 # arch/sparc64/kernel/systbls.S 1.6 -> 1.7 # arch/ppc/configs/ibmchrp_defconfig 1.12 -> 1.13 # arch/ppc/configs/pal4_defconfig 1.5 -> 1.6 # arch/alpha/defconfig 1.6 -> 1.7 # arch/ppc/configs/est8260_defconfig 1.13 -> 1.14 # arch/sh/defconfig 1.2 -> 1.3 # arch/ppc/configs/TQM850L_defconfig 1.11 -> 1.12 # fs/buffer.c 1.91 -> 1.92 # fs/Makefile 1.19 -> 1.20 # MAINTAINERS 1.103 -> 1.103.1.1 # arch/ppc/configs/briq_defconfig 1.3 -> 1.4 # fs/Config.in 1.26 -> 1.27 # arch/sparc/defconfig 1.11 -> 1.12 # arch/ppc/configs/apus_defconfig 1.14 -> 1.15 # arch/ppc/configs/rpxcllf_defconfig 1.13 -> 1.14 # arch/ppc/defconfig 1.14 -> 1.15 # arch/ppc/configs/walnut_defconfig 1.13 -> 1.14 # arch/s390/defconfig 1.9 -> 1.10 # Documentation/Changes 1.17 -> 1.18 # Documentation/Configure.help 1.176 -> 1.177 # arch/ppc/configs/SPD823TS_defconfig 1.11 -> 1.12 # fs/inode.c 1.38 -> 1.39 # Documentation/filesystems/00-INDEX 1.5 -> 1.6 # (new) -> 1.1 include/linux/posix_cap_xattr.h # (new) -> 1.1 Documentation/filesystems/xfs.txt # (new) -> 1.1 include/linux/posix_acl_xattr.h # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/08/07 cattelan@xxxxxxxxxxx 1.1067 # xfs.patch # -------------------------------------------- # diff -Nru a/Documentation/Changes b/Documentation/Changes --- a/Documentation/Changes Wed Aug 27 22:47:38 2003 +++ b/Documentation/Changes Wed Aug 27 22:47:38 2003 @@ -56,6 +56,7 @@ o e2fsprogs 1.25 # tune2fs o jfsutils 1.0.12 # fsck.jfs -V o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs +o xfsprogs 2.1.0 # xfs_db -V o pcmcia-cs 3.1.21 # cardmgr -V o PPP 2.4.0 # pppd --version o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version @@ -190,6 +191,17 @@ versions of mkreiserfs, resize_reiserfs, debugreiserfs and reiserfsck. These utils work on both i386 and alpha platforms. +Xfsprogs +-------- + +The latest version of xfsprogs contains mkfs.xfs, xfs_db, and the +xfs_repair utilities, among others, for the XFS filesystem. It is +architecture independent and any version from 2.0.0 onward should +work correctly with this version of the XFS kernel code. For the new +(v2) log format that has better support for stripe-size aligning on +LVM and MD devices at least xfsprogs 2.1.0 is needed. + + Pcmcia-cs --------- @@ -326,6 +338,10 @@ Reiserfsprogs ------------- o + +Xfsprogs +-------- +o LVM toolset ----------- diff -Nru a/Documentation/Configure.help b/Documentation/Configure.help --- a/Documentation/Configure.help Wed Aug 27 22:47:38 2003 +++ b/Documentation/Configure.help Wed Aug 27 22:47:38 2003 @@ -16387,6 +16387,102 @@ Say Y here if you want to try writing to UFS partitions. This is experimental, so you should back up your UFS partitions beforehand. +XFS filesystem support +CONFIG_XFS_FS + XFS is a high performance journaling filesystem which originated + on the SGI IRIX platform. It is completely multi-threaded, can + support large files and large filesystems, extended attributes, + variable block sizes, is extent based, and makes extensive use of + Btrees (directories, extents, free space) to aid both performance + and scalability. + + Refer to the documentation at + for complete details. This implementation is on-disk compatible + with the IRIX version of XFS. + + If you want to compile this file system 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 xfs.o. Be aware, however, that if the file + 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 XFS is built as module (= code which can be inserted in and + removed from the running kernel whenever you want), this code will + also be built as module. It is called xfs_dmapi.o. + + 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 + a per user and/or per group basis under XFS. XFS considers quota + information as filesystem metadata and uses journaling to provide a + higher level guarantee of consistency. The on-disk data format for + quota is also compatible with the IRIX version of XFS, allowing a + filesystem to be migrated between Linux and IRIX without any need + for conversion. + + If unsure, say N. More comprehensive documentation can be found in + README.quota in the xfsprogs package. XFS quota can be used either + with or without the generic quota support enabled (CONFIG_QUOTA) - + they are completely independent subsystems. + +Realtime support (EXPERIMENTAL) +CONFIG_XFS_RT + If you say Y here you will be able to mount and use XFS filesystems + which contain a realtime subvolume. The realtime subvolume is a + separate area of disk space where only file data is stored. The + realtime subvolume is designed to provide very deterministic + data rates suitable for media streaming applications. + + See the xfs man page in section 5 for a bit more information. + + This feature is unsupported at this time, is not yet fully + functional, and may cause serious problems. + + If unsure, say N. + +ACL support +CONFIG_XFS_POSIX_ACL + Posix Access Control Lists (ACLs) support permissions for users and + groups beyond the owner/group/world scheme. + + To learn more about Access Control Lists, visit the Posix ACLs for + Linux website . + + If you don't know what Access Control Lists are, say N + +Debugging support (EXPERIMENTAL) +CONFIG_XFS_DEBUG + Say Y here to get an XFS build with many debugging features, + including ASSERT checks, function wrappers around macros, + and extra sanity-checking functions in various code paths. + + Note that the resulting code will be HUGE and SLOW, and probably + not useful unless you are debugging a particular problem. + + Say N unless you are an XFS developer, or play one on TV. + +Pagebuf debugging support (EXPERIMENTAL) +CONFIG_PAGEBUF_DEBUG + Say Y here to get an XFS build which may help you debug pagebuf + problems. Enabling this option will attach tracing information + to pagebufs, which can be read with the kdb kernel debugger. + + Note that you will also have to enable the sysctl in + /proc/sys/vm/pagebuf/debug for this to work. + + Say N unless you're interested in debugging pagebuf. + Advanced partition selection CONFIG_PARTITION_ADVANCED Say Y here if you would like to use hard disks under Linux which diff -Nru a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX --- a/Documentation/filesystems/00-INDEX Wed Aug 27 22:47:38 2003 +++ b/Documentation/filesystems/00-INDEX Wed Aug 27 22:47:38 2003 @@ -48,3 +48,5 @@ - info on using the VFAT filesystem used in Windows NT and Windows 95 vfs.txt - Overview of the Virtual File System +xfs.txt + - info and mount options for the XFS filesystem. diff -Nru a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/filesystems/xfs.txt Wed Aug 27 22:47:38 2003 @@ -0,0 +1,191 @@ + +The SGI XFS Filesystem +====================== + +XFS is a high performance journaling filesystem which originated +on the SGI IRIX platform. It is completely multi-threaded, can +support large files and large filesystems, extended attributes, +variable block sizes, is extent based, and makes extensive use of +Btrees (directories, extents, free space) to aid both performance +and scalability. + +Refer to the documentation at http://oss.sgi.com/projects/xfs/ +for further details. This implementation is on-disk compatible +with the IRIX version of XFS. + + +Mount Options +============= + +When mounting an XFS filesystem, the following options are accepted. + + biosize=size + Sets the preferred buffered I/O size (default size is 64K). + "size" must be expressed as the logarithm (base2) of the + desired I/O size. + Valid values for this option are 14 through 16, inclusive + (i.e. 16K, 32K, and 64K bytes). On machines with a 4K + pagesize, 13 (8K bytes) is also a valid size. + 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. + + logbufs=value + Set the number of in-memory log buffers. Valid numbers range + from 2-8 inclusive. + The default value is 8 buffers for filesystems with a + blocksize of 64K, 4 buffers for filesystems with a blocksize + of 32K, 3 buffers for filesystems with a blocksize of 16K + and 2 buffers for all other configurations. Increasing the + number of buffers may increase performance on some workloads + at the cost of the memory used for the additional log buffers + and their associated control structures. + + logbsize=value + Set the size of each in-memory log buffer. + Size may be specified in bytes, or in kilobytes with a "k" suffix. + Valid sizes for version 1 and version 2 logs are 16384 (16k) and + 32768 (32k). Valid sizes for version 2 logs also include + 65536 (64k), 131072 (128k) and 262144 (256k). + The default value for machines with more than 32MB of memory + is 32768, machines with less memory use 16384 by default. + + logdev=device and rtdev=device + Use an external log (metadata journal) and/or real-time device. + An XFS filesystem has up to three parts: a data section, a log + section, and a real-time section. The real-time section is + 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. + + noatime + Access timestamps are not updated when a file is read. + + norecovery + The filesystem will be mounted without running log recovery. + If the filesystem was not cleanly unmounted, it is likely to + be inconsistent when mounted in "norecovery" mode. + Some files or directories may not be accessible because of this. + Filesystems mounted "norecovery" must be mounted read-only or + the mount will fail. + + osyncisosync + Make O_SYNC writes implement true O_SYNC. WITHOUT this option, + Linux XFS behaves as if an "osyncisdsync" option is used, + which will make writes to files opened with the O_SYNC flag set + behave as if the O_DSYNC flag had been used instead. + This can result in better performance without compromising + data safety. + However if this option is not in effect, timestamp updates from + O_SYNC writes can be lost if the system crashes. + If timestamp updates are critical, use the osyncisosync option. + + quota/usrquota/uqnoenforce + User disk quota accounting enabled, and limits (optionally) + enforced. + + grpquota/gqnoenforce + Group disk quota accounting enabled and limits (optionally) + enforced. + + sunit=value and swidth=value + Used to specify the stripe unit and width for a RAID device or + a stripe volume. "value" must be specified in 512-byte block + units. + If this option is not specified and the filesystem was made on + a stripe volume or the stripe width or unit were specified for + the RAID device at mkfs time, then the mount system call will + restore the value from the superblock. For filesystems that + are made directly on RAID devices, these options can be used + to override the information in the superblock if the underlying + disk layout changes after the filesystem has been created. + The "swidth" option is required if the "sunit" option has been + specified, and must be a multiple of the "sunit" value. + + nouuid + Don't check for double mounted file systems using the file system uuid. + This is useful to mount LVM snapshot volumes. + +sysctls +======= + +The following sysctls are available for the XFS filesystem: + + fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1) + Setting this to "1" clears accumulated XFS statistics + in /proc/fs/xfs/stat. It then immediately reset to "0". + + fs.xfs.sync_interval (Min: HZ Default: 30*HZ Max: 60*HZ) + The interval at which the xfssyncd thread for xfs filesystems + flushes metadata out to disk. This thread will flush log + activity out, and do some processing on unlinked inodes + + fs.xfs.error_level (Min: 0 Default: 3 Max: 11) + A volume knob for error reporting when internal errors occur. + This will generate detailed messages & backtraces for filesystem + shutdowns, for example. Current threshold values are: + + XFS_ERRLEVEL_OFF: 0 + XFS_ERRLEVEL_LOW: 1 + XFS_ERRLEVEL_HIGH: 5 + + fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127) + Causes certain error conditions to call BUG(). Value is a bitmask; + AND together the tags which represent errors which should cause panics: + + XFS_NO_PTAG 0LL + XFS_PTAG_IFLUSH 0x0000000000000001LL + XFS_PTAG_LOGRES 0x0000000000000002LL + XFS_PTAG_AILDELETE 0x0000000000000004LL + XFS_PTAG_ERROR_REPORT 0x0000000000000008LL + XFS_PTAG_SHUTDOWN_CORRUPT 0x0000000000000010LL + XFS_PTAG_SHUTDOWN_IOERROR 0x0000000000000020LL + XFS_PTAG_SHUTDOWN_LOGERROR 0x0000000000000040LL + + This option is intended for debugging only. + + fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1) + Controls whether symlinks are created with mode 0777 (default) + or whether their mode is affected by the umask (irix mode). + + fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1) + Controls files created in SGID directories. + If the group ID of the new file does not match the effective group + ID or one of the supplementary group IDs of the parent dir, the + ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl + is set. + + fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1) + Controls whether unprivileged users can use chown to "give away" + a file to another user. + + fs.xfs.refcache_size (Min: 0 Default: 128 Max: 512) + Controls the size of the NFS refcache, which holds references + on files opened via NFS to improve performance. The value + is the maximum number of files which can be in the cache at + any one time. + + fs.xfs.refcache_purge (Min: 0 Default: 32 Max: 512) + Controls the number of entries purged from the NFS refcache + every sync interval. + + vm.pagebuf.stats_clear (Min: 0 Default: 0 Max: 1) + Setting this to "1" clears accumulated pagebuf statistics + in /proc/fs/pagebuf/stat. It then immediately reset to "0". + + vm.pagebuf.flush_age (Min: 1*HZ Default: 15*HZ Max: 300*HZ) + The age at which dirty metadata buffers are flushed to disk + + vm.pagebuf.flush_int (Min: HZ/2 Default: HZ Max: 30*HZ) + The interval at which the list of dirty metadata buffers is + scanned. diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Wed Aug 27 22:47:37 2003 +++ b/MAINTAINERS Wed Aug 27 22:47:37 2003 @@ -2116,6 +2116,14 @@ L: linux-x25@xxxxxxxxxxxxxxx S: Maintained +XFS FILESYSTEM +P: Silicon Graphics Inc +M: owner-xfs@xxxxxxxxxxx +M: lord@xxxxxxx +L: linux-xfs@xxxxxxxxxxx +W: http://oss.sgi.com/projects/xfs +S: Supported + X86 3-LEVEL PAGING (PAE) SUPPORT P: Ingo Molnar M: mingo@xxxxxxxxxx diff -Nru a/arch/alpha/defconfig b/arch/alpha/defconfig --- a/arch/alpha/defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/alpha/defconfig Wed Aug 27 22:47:37 2003 @@ -796,3 +796,12 @@ CONFIG_MATHEMU=y # CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/arm/defconfig b/arch/arm/defconfig --- a/arch/arm/defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/arm/defconfig Wed Aug 27 22:47:36 2003 @@ -509,3 +509,12 @@ # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_LL=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/cris/defconfig b/arch/cris/defconfig --- a/arch/cris/defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/cris/defconfig Wed Aug 27 22:47:36 2003 @@ -518,3 +518,12 @@ # Kernel hacking # # CONFIG_PROFILE is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig --- a/arch/i386/defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/i386/defconfig Wed Aug 27 22:47:36 2003 @@ -879,3 +879,16 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +CONFIG_KDB=y +CONFIG_KDB_OFF=n +CONFIG_FRAME_POINTER=n + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/ia64/defconfig b/arch/ia64/defconfig --- a/arch/ia64/defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/ia64/defconfig Wed Aug 27 22:47:35 2003 @@ -978,3 +978,16 @@ # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_IA64_DEBUG_CMPXCHG is not set # CONFIG_IA64_DEBUG_IRQ is not set + +CONFIG_KDB=y +CONFIG_KDB_OFF=n +CONFIG_FRAME_POINTER=n + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/m68k/defconfig b/arch/m68k/defconfig --- a/arch/m68k/defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/m68k/defconfig Wed Aug 27 22:47:35 2003 @@ -327,3 +327,13 @@ # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/mips/defconfig b/arch/mips/defconfig --- a/arch/mips/defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/mips/defconfig Wed Aug 27 22:47:36 2003 @@ -642,3 +642,13 @@ # # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/mips64/defconfig b/arch/mips64/defconfig --- a/arch/mips64/defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/mips64/defconfig Wed Aug 27 22:47:36 2003 @@ -588,3 +588,13 @@ # # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/parisc/defconfig b/arch/parisc/defconfig --- a/arch/parisc/defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/parisc/defconfig Wed Aug 27 22:47:35 2003 @@ -787,3 +787,13 @@ # Kernel hacking # CONFIG_MAGIC_SYSRQ=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/IVMS8_defconfig b/arch/ppc/configs/IVMS8_defconfig --- a/arch/ppc/configs/IVMS8_defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/ppc/configs/IVMS8_defconfig Wed Aug 27 22:47:35 2003 @@ -542,3 +542,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/SM850_defconfig b/arch/ppc/configs/SM850_defconfig --- a/arch/ppc/configs/SM850_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/SM850_defconfig Wed Aug 27 22:47:37 2003 @@ -510,3 +510,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/SPD823TS_defconfig b/arch/ppc/configs/SPD823TS_defconfig --- a/arch/ppc/configs/SPD823TS_defconfig Wed Aug 27 22:47:38 2003 +++ b/arch/ppc/configs/SPD823TS_defconfig Wed Aug 27 22:47:38 2003 @@ -509,3 +509,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/TQM823L_defconfig b/arch/ppc/configs/TQM823L_defconfig --- a/arch/ppc/configs/TQM823L_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/TQM823L_defconfig Wed Aug 27 22:47:36 2003 @@ -510,3 +510,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/TQM850L_defconfig b/arch/ppc/configs/TQM850L_defconfig --- a/arch/ppc/configs/TQM850L_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/TQM850L_defconfig Wed Aug 27 22:47:37 2003 @@ -510,3 +510,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/TQM860L_defconfig b/arch/ppc/configs/TQM860L_defconfig --- a/arch/ppc/configs/TQM860L_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/TQM860L_defconfig Wed Aug 27 22:47:36 2003 @@ -551,3 +551,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/apus_defconfig b/arch/ppc/configs/apus_defconfig --- a/arch/ppc/configs/apus_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/apus_defconfig Wed Aug 27 22:47:37 2003 @@ -913,3 +913,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/briq_defconfig b/arch/ppc/configs/briq_defconfig --- a/arch/ppc/configs/briq_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/briq_defconfig Wed Aug 27 22:47:37 2003 @@ -806,3 +806,13 @@ # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set CONFIG_BOOTX_TEXT=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/bseip_defconfig b/arch/ppc/configs/bseip_defconfig --- a/arch/ppc/configs/bseip_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/bseip_defconfig Wed Aug 27 22:47:36 2003 @@ -509,3 +509,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/common_defconfig b/arch/ppc/configs/common_defconfig --- a/arch/ppc/configs/common_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/common_defconfig Wed Aug 27 22:47:36 2003 @@ -1065,3 +1065,13 @@ # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set CONFIG_BOOTX_TEXT=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/est8260_defconfig b/arch/ppc/configs/est8260_defconfig --- a/arch/ppc/configs/est8260_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/est8260_defconfig Wed Aug 27 22:47:37 2003 @@ -480,3 +480,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/gemini_defconfig b/arch/ppc/configs/gemini_defconfig --- a/arch/ppc/configs/gemini_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/gemini_defconfig Wed Aug 27 22:47:37 2003 @@ -585,3 +585,13 @@ CONFIG_XMON=y # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/ibmchrp_defconfig b/arch/ppc/configs/ibmchrp_defconfig --- a/arch/ppc/configs/ibmchrp_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/ibmchrp_defconfig Wed Aug 27 22:47:37 2003 @@ -795,3 +795,13 @@ # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set # CONFIG_BOOTX_TEXT is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/mbx_defconfig b/arch/ppc/configs/mbx_defconfig --- a/arch/ppc/configs/mbx_defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/ppc/configs/mbx_defconfig Wed Aug 27 22:47:35 2003 @@ -505,3 +505,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/oak_defconfig b/arch/ppc/configs/oak_defconfig --- a/arch/ppc/configs/oak_defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/ppc/configs/oak_defconfig Wed Aug 27 22:47:35 2003 @@ -462,3 +462,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/pal4_defconfig b/arch/ppc/configs/pal4_defconfig --- a/arch/ppc/configs/pal4_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/pal4_defconfig Wed Aug 27 22:47:37 2003 @@ -581,3 +581,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig --- a/arch/ppc/configs/pmac_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/pmac_defconfig Wed Aug 27 22:47:36 2003 @@ -1175,3 +1175,13 @@ # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set CONFIG_BOOTX_TEXT=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/power3_defconfig b/arch/ppc/configs/power3_defconfig --- a/arch/ppc/configs/power3_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/power3_defconfig Wed Aug 27 22:47:36 2003 @@ -807,3 +807,13 @@ # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set # CONFIG_BOOTX_TEXT is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/rpxcllf_defconfig b/arch/ppc/configs/rpxcllf_defconfig --- a/arch/ppc/configs/rpxcllf_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/rpxcllf_defconfig Wed Aug 27 22:47:37 2003 @@ -545,3 +545,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/rpxlite_defconfig b/arch/ppc/configs/rpxlite_defconfig --- a/arch/ppc/configs/rpxlite_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/rpxlite_defconfig Wed Aug 27 22:47:36 2003 @@ -542,3 +542,13 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/spruce_defconfig b/arch/ppc/configs/spruce_defconfig --- a/arch/ppc/configs/spruce_defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/ppc/configs/spruce_defconfig Wed Aug 27 22:47:36 2003 @@ -517,3 +517,13 @@ # # CONFIG_DEBUG_KERNEL is not set # CONFIG_SERIAL_TEXT_DEBUG is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/ppc/configs/walnut_defconfig b/arch/ppc/configs/walnut_defconfig --- a/arch/ppc/configs/walnut_defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/configs/walnut_defconfig Wed Aug 27 22:47:37 2003 @@ -486,3 +486,11 @@ # # CONFIG_DEBUG_KERNEL is not set # CONFIG_SERIAL_TEXT_DEBUG is not set +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/ppc/defconfig b/arch/ppc/defconfig --- a/arch/ppc/defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/ppc/defconfig Wed Aug 27 22:47:37 2003 @@ -1065,3 +1065,13 @@ # CONFIG_BDI_SWITCH is not set # CONFIG_MORE_COMPILE_OPTIONS is not set CONFIG_BOOTX_TEXT=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/s390/defconfig Wed Aug 27 22:47:38 2003 @@ -419,3 +419,11 @@ # # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/s390x/defconfig b/arch/s390x/defconfig --- a/arch/s390x/defconfig Wed Aug 27 22:47:35 2003 +++ b/arch/s390x/defconfig Wed Aug 27 22:47:35 2003 @@ -363,3 +363,11 @@ # # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/sh/defconfig b/arch/sh/defconfig --- a/arch/sh/defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/sh/defconfig Wed Aug 27 22:47:37 2003 @@ -202,3 +202,13 @@ # CONFIG_MAGIC_SYSRQ is not set CONFIG_SH_STANDARD_BIOS=y CONFIG_SH_EARLY_PRINTK=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/sparc/defconfig b/arch/sparc/defconfig --- a/arch/sparc/defconfig Wed Aug 27 22:47:37 2003 +++ b/arch/sparc/defconfig Wed Aug 27 22:47:37 2003 @@ -416,3 +416,13 @@ # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set + diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig Wed Aug 27 22:47:36 2003 +++ b/arch/sparc64/defconfig Wed Aug 27 22:47:37 2003 @@ -1055,3 +1055,12 @@ CONFIG_CRC32=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y + +# +# XFS addons +# +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DMAPI is not set diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S --- a/arch/sparc64/kernel/systbls.S Wed Aug 27 22:47:37 2003 +++ b/arch/sparc64/kernel/systbls.S Wed Aug 27 22:47:37 2003 @@ -194,7 +194,7 @@ .word sunos_getdirentries, sys32_statfs, sys32_fstatfs .word sys_oldumount, sunos_nosys, sunos_nosys .word sys_getdomainname, sys_setdomainname - .word sunos_nosys, sys32_quotactl, sunos_nosys + .word sunos_nosys, sys_quotactl, sunos_nosys .word sunos_mount, sys_ustat, sunos_semsys .word sunos_nosys, sunos_shmsys, sunos_audit .word sunos_nosys, sunos_getdents, sys_setsid diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c --- a/drivers/block/ll_rw_blk.c Wed Aug 27 22:47:35 2003 +++ b/drivers/block/ll_rw_blk.c Wed Aug 27 22:47:35 2003 @@ -1275,6 +1275,9 @@ if (!test_bit(BH_Lock, &bh->b_state)) BUG(); + if (buffer_delay(bh) || !buffer_mapped(bh)) + BUG(); + set_bit(BH_Req, &bh->b_state); set_bit(BH_Launder, &bh->b_state); diff -Nru a/drivers/md/raid5.c b/drivers/md/raid5.c --- a/drivers/md/raid5.c Wed Aug 27 22:47:36 2003 +++ b/drivers/md/raid5.c Wed Aug 27 22:47:36 2003 @@ -282,7 +282,7 @@ } if (conf->buffer_size != size) { - printk("raid5: switching cache buffer size, %d --> %d\n", oldsize, size); + PRINTK("raid5: switching cache buffer size, %d --> %d\n", oldsize, size); shrink_stripe_cache(conf); if (size==0) BUG(); conf->buffer_size = size; diff -Nru a/fs/Config.in b/fs/Config.in --- a/fs/Config.in Wed Aug 27 22:47:37 2003 +++ b/fs/Config.in Wed Aug 27 22:47:37 2003 @@ -97,6 +97,14 @@ tristate 'UFS file system support (read only)' CONFIG_UFS_FS dep_mbool ' UFS file system write support (DANGEROUS)' CONFIG_UFS_FS_WRITE $CONFIG_UFS_FS $CONFIG_EXPERIMENTAL +tristate 'XFS filesystem support' CONFIG_XFS_FS +dep_mbool ' ACL support' CONFIG_XFS_POSIX_ACL $CONFIG_XFS_FS +dep_mbool ' Realtime support (EXPERIMENTAL)' CONFIG_XFS_RT $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL +dep_mbool ' Quota support' CONFIG_XFS_QUOTA $CONFIG_XFS_FS +dep_mbool ' DMAPI support' CONFIG_XFS_DMAPI $CONFIG_XFS_FS +dep_mbool ' Debugging support (EXPERIMENTAL)' CONFIG_XFS_DEBUG $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL +dep_mbool ' Pagebuf debugging support (EXPERIMENTAL)' CONFIG_PAGEBUF_DEBUG $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL + if [ "$CONFIG_NET" = "y" ]; then mainmenu_option next_comment diff -Nru a/fs/Makefile b/fs/Makefile --- a/fs/Makefile Wed Aug 27 22:47:37 2003 +++ b/fs/Makefile Wed Aug 27 22:47:37 2003 @@ -8,7 +8,7 @@ O_TARGET := fs.o export-objs := filesystems.o open.o dcache.o buffer.o dquot.o -mod-subdirs := nls +mod-subdirs := nls xfs obj-y := open.o read_write.o devices.o file_table.o buffer.o \ super.o block_dev.o char_dev.o stat.o exec.o pipe.o namei.o \ @@ -66,7 +66,7 @@ subdir-$(CONFIG_SUN_OPENPROMFS) += openpromfs subdir-$(CONFIG_BEFS_FS) += befs subdir-$(CONFIG_JFS_FS) += jfs - +subdir-$(CONFIG_XFS_FS) += xfs obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o obj-$(CONFIG_BINFMT_EM86) += binfmt_em86.o diff -Nru a/fs/buffer.c b/fs/buffer.c --- a/fs/buffer.c Wed Aug 27 22:47:37 2003 +++ b/fs/buffer.c Wed Aug 27 22:47:37 2003 @@ -123,6 +123,36 @@ int bdflush_min[N_PARAM] = { 0, 1, 0, 0, 0, 1*HZ, 0, 0, 0}; int bdflush_max[N_PARAM] = {100,50000, 20000, 20000,10000*HZ, 10000*HZ, 100, 100, 0}; +static inline int write_buffer_delay(struct buffer_head *bh) +{ + struct page *page = bh->b_page; + + if (!TryLockPage(page)) { + spin_unlock(&lru_list_lock); + unlock_buffer(bh); + page->mapping->a_ops->writepage(page); + return 1; + } + + return 0; +} + +static inline void write_buffer(struct buffer_head *bh) +{ + if (buffer_delay(bh)) { + struct page *page = bh->b_page; + + lock_page(page); + if (buffer_delay(bh)) { + page->mapping->a_ops->writepage(page); + return; + } + unlock_page(page); + } + + ll_rw_block(WRITE, 1, &bh); +} + void unlock_buffer(struct buffer_head *bh) { clear_bit(BH_Wait_IO, &bh->b_state); @@ -226,7 +256,13 @@ continue; if (test_and_set_bit(BH_Lock, &bh->b_state)) continue; - if (atomic_set_buffer_clean(bh)) { + if (buffer_delay(bh)) { + if (write_buffer_delay(bh)) { + if (count) + write_locked_buffers(array, count); + return -EAGAIN; + } + } else if (atomic_set_buffer_clean(bh)) { __refile_buffer(bh); get_bh(bh); array[count++] = bh; @@ -612,7 +648,7 @@ if (buffer_attached(bh)) list_del(&bh->b_inode_buffers); set_buffer_attached(bh); - list_add(&bh->b_inode_buffers, list); + list_add_tail(&bh->b_inode_buffers, list); spin_unlock(&lru_list_lock); } @@ -758,7 +794,7 @@ bh->b_private = private; } -static void end_buffer_io_async(struct buffer_head * bh, int uptodate) +void end_buffer_io_async(struct buffer_head * bh, int uptodate) { static spinlock_t page_uptodate_lock = SPIN_LOCK_UNLOCKED; unsigned long flags; @@ -873,7 +909,7 @@ * a noop) */ wait_on_buffer(bh); - ll_rw_block(WRITE, 1, &bh); + write_buffer(bh); brelse(bh); spin_lock(&lru_list_lock); } @@ -1320,13 +1356,14 @@ */ static void discard_buffer(struct buffer_head * bh) { - if (buffer_mapped(bh)) { + if (buffer_mapped(bh) || buffer_delay(bh)) { mark_buffer_clean(bh); lock_buffer(bh); clear_bit(BH_Uptodate, &bh->b_state); clear_bit(BH_Mapped, &bh->b_state); clear_bit(BH_Req, &bh->b_state); clear_bit(BH_New, &bh->b_state); + clear_bit(BH_Delay, &bh->b_state); remove_from_queues(bh); unlock_buffer(bh); } @@ -1618,7 +1655,7 @@ set_bit(BH_Uptodate, &bh->b_state); continue; } - if (!buffer_uptodate(bh) && + if (!buffer_uptodate(bh) && !buffer_delay(bh) && (block_start < from || block_end > to)) { ll_rw_block(READ, 1, &bh); *wait_bh++=bh; @@ -2015,7 +2052,7 @@ if (Page_Uptodate(page)) set_bit(BH_Uptodate, &bh->b_state); - if (!buffer_uptodate(bh)) { + if (!buffer_uptodate(bh) && !buffer_delay(bh)) { err = -EIO; ll_rw_block(READ, 1, &bh); wait_on_buffer(bh); @@ -2744,7 +2781,7 @@ { #ifdef CONFIG_SMP struct buffer_head * bh; - int found = 0, locked = 0, dirty = 0, used = 0, lastused = 0; + int delalloc = 0, found = 0, locked = 0, dirty = 0, used = 0, lastused = 0; int nlist; static char *buf_types[NR_LIST] = { "CLEAN", "LOCKED", "DIRTY", }; #endif @@ -2759,7 +2796,7 @@ if (!spin_trylock(&lru_list_lock)) return; for(nlist = 0; nlist < NR_LIST; nlist++) { - found = locked = dirty = used = lastused = 0; + delalloc = found = locked = dirty = used = lastused = 0; bh = lru_list[nlist]; if(!bh) continue; @@ -2769,6 +2806,8 @@ locked++; if (buffer_dirty(bh)) dirty++; + if (buffer_delay(bh)) + delalloc++; if (atomic_read(&bh->b_count)) used++, lastused = found; bh = bh->b_next_free; @@ -2779,10 +2818,10 @@ printk("%9s: BUG -> found %d, reported %d\n", buf_types[nlist], found, tmp); } - printk("%9s: %d buffers, %lu kbyte, %d used (last=%d), " - "%d locked, %d dirty\n", + printk("%7s: %d buffers, %lu kbyte, %d used (last=%d), " + "%d locked, %d dirty %d delay\n", buf_types[nlist], found, size_buffers_type[nlist]>>10, - used, lastused, locked, dirty); + used, lastused, locked, dirty, delalloc); } spin_unlock(&lru_list_lock); #endif diff -Nru a/fs/inode.c b/fs/inode.c --- a/fs/inode.c Wed Aug 27 22:47:38 2003 +++ b/fs/inode.c Wed Aug 27 22:47:38 2003 @@ -140,6 +140,11 @@ void inode_init_once(struct inode *inode) { memset(inode, 0, sizeof(*inode)); + _inode_init_once(inode); +} + +void _inode_init_once(struct inode *inode) +{ init_waitqueue_head(&inode->i_wait); INIT_LIST_HEAD(&inode->i_hash); INIT_LIST_HEAD(&inode->i_data.clean_pages); @@ -834,6 +839,20 @@ return inode; } +void unlock_new_inode(struct inode *inode) +{ + /* + * This is special! We do not need the spinlock + * when clearing I_LOCK, because we're guaranteed + * that nobody else tries to do anything about the + * state of the inode when it is locked, as we + * just created it (so there can be no old holders + * that haven't tested I_LOCK). + */ + inode->i_state &= ~(I_LOCK|I_NEW); + wake_up(&inode->i_wait); +} + /* * This is called without the inode lock held.. Be careful. * @@ -856,20 +875,9 @@ list_add(&inode->i_list, &inode_in_use); list_add(&inode->i_hash, head); inode->i_ino = ino; - inode->i_state = I_LOCK; + inode->i_state = I_LOCK|I_NEW; spin_unlock(&inode_lock); - /* reiserfs specific hack right here. We don't - ** want this to last, and are looking for VFS changes - ** that will allow us to get rid of it. - ** -- mason@xxxxxxxx - */ - if (sb->s_op->read_inode2) { - sb->s_op->read_inode2(inode, opaque) ; - } else { - sb->s_op->read_inode(inode); - } - /* * This is special! We do not need the spinlock * when clearing I_LOCK, because we're guaranteed @@ -878,9 +886,6 @@ * just created it (so there can be no old holders * that haven't tested I_LOCK). */ - inode->i_state &= ~I_LOCK; - wake_up(&inode->i_wait); - return inode; } @@ -960,8 +965,7 @@ return inode; } - -struct inode *iget4(struct super_block *sb, unsigned long ino, find_inode_t find_actor, void *opaque) +struct inode *iget4_locked(struct super_block *sb, unsigned long ino, find_inode_t find_actor, void *opaque) { struct list_head * head = inode_hashtable + hash(sb,ino); struct inode * inode; @@ -1203,9 +1207,9 @@ /* Functions back in dquot.c */ void put_dquot_list(struct list_head *); -int remove_inode_dquot_ref(struct inode *, short, struct list_head *); +int remove_inode_dquot_ref(struct inode *, int, struct list_head *); -void remove_dquot_ref(struct super_block *sb, short type) +void remove_dquot_ref(struct super_block *sb, int type) { struct inode *inode; struct list_head *act_head; diff -Nru a/fs/intermezzo/vfs.c b/fs/intermezzo/vfs.c --- a/fs/intermezzo/vfs.c Wed Aug 27 22:47:36 2003 +++ b/fs/intermezzo/vfs.c Wed Aug 27 22:47:36 2003 @@ -74,7 +74,7 @@ #ifdef CONFIG_FS_EXT_ATTR # include -# ifdef CONFIG_FS_POSIX_ACL +# if 0 /* was a broken check for Posix ACLs */ # include # endif #endif @@ -466,7 +466,7 @@ struct dentry *dentry; struct presto_file_set *fset; int error; -#ifdef CONFIG_FS_POSIX_ACL +#if 0 /* was a broken check for Posix ACLs */ int (*set_posix_acl)(struct inode *, int type, posix_acl_t *)=NULL; #endif @@ -507,7 +507,7 @@ (dentry->d_inode->i_mode & ~S_IALLUGO); CDEBUG(D_PIOCTL, "chmod: orig %#o, set %#o, result %#o\n", dentry->d_inode->i_mode, set_mode, iattr->ia_mode); -#ifdef CONFIG_FS_POSIX_ACL +#if 0 /* was a broken check for Posix ACLs */ /* ACl code interacts badly with setattr * since it tries to modify the ACL using * set_ext_attr which recurses back into presto. @@ -535,7 +535,7 @@ } } -#ifdef CONFIG_FS_POSIX_ACL +#if 0 /* was a broken check for Posix ACLs */ /* restore the inode_operations if we changed them*/ if (iattr->ia_valid & ATTR_MODE) dentry->d_inode->i_op->set_posix_acl=set_posix_acl; @@ -2271,7 +2271,7 @@ #ifdef CONFIG_FS_EXT_ATTR -#ifdef CONFIG_FS_POSIX_ACL +#if 0 /* was a broken check for Posix ACLs */ /* Posix ACL code changes i_mode without using a notify_change (or * a mark_inode_dirty!). We need to duplicate this at the reintegrator * which is done by this function. This function also takes care of @@ -2414,7 +2414,7 @@ goto exit; } -#ifdef CONFIG_FS_POSIX_ACL +#if 0 /* was a broken check for Posix ACLs */ /* Reset mode if specified*/ /* XXX: when we do native acl support, move this code out! */ if (mode != NULL) { diff -Nru a/fs/namei.c b/fs/namei.c --- a/fs/namei.c Wed Aug 27 22:47:37 2003 +++ b/fs/namei.c Wed Aug 27 22:47:37 2003 @@ -1048,8 +1048,9 @@ /* Negative dentry, just create the file */ if (!dentry->d_inode) { - error = vfs_create(dir->d_inode, dentry, - mode & ~current->fs->umask); + if (!IS_POSIXACL(dir->d_inode)) + mode &= ~current->fs->umask; + error = vfs_create(dir->d_inode, dentry, mode); up(&dir->d_inode->i_sem); dput(nd->dentry); nd->dentry = dentry; @@ -1280,7 +1281,8 @@ dentry = lookup_create(&nd, 0); error = PTR_ERR(dentry); - mode &= ~current->fs->umask; + if (!IS_POSIXACL(nd.dentry->d_inode)) + mode &= ~current->fs->umask; if (!IS_ERR(dentry)) { switch (mode & S_IFMT) { case 0: case S_IFREG: @@ -1348,8 +1350,9 @@ dentry = lookup_create(&nd, 1); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { - error = vfs_mkdir(nd.dentry->d_inode, dentry, - mode & ~current->fs->umask); + if (!IS_POSIXACL(nd.dentry->d_inode)) + mode &= ~current->fs->umask; + error = vfs_mkdir(nd.dentry->d_inode, dentry, mode); dput(dentry); } up(&nd.dentry->d_inode->i_sem); diff -Nru a/fs/xattr.c b/fs/xattr.c --- a/fs/xattr.c Wed Aug 27 22:47:35 2003 +++ b/fs/xattr.c Wed Aug 27 22:47:35 2003 @@ -8,7 +8,6 @@ */ #include #include -#include #include #include #include @@ -17,7 +16,7 @@ /* * Extended attribute memory allocation wrappers, originally * based on the Intermezzo PRESTO_ALLOC/PRESTO_FREE macros. - * The vmalloc use here is very uncommon - extended attributes + * Values larger than a page are uncommon - extended attributes * are supposed to be small chunks of metadata, and it is quite * unusual to have very many extended attributes, so lists tend * to be quite short as well. The 64K upper limit is derived @@ -34,10 +33,8 @@ if (!size) /* size request, no buffer is needed */ return NULL; - else if (size <= PAGE_SIZE) - ptr = kmalloc((unsigned long) size, GFP_KERNEL); - else - ptr = vmalloc((unsigned long) size); + + ptr = kmalloc((unsigned long) size, GFP_KERNEL); if (!ptr) return ERR_PTR(-ENOMEM); return ptr; @@ -46,12 +43,8 @@ static void xattr_free(void *ptr, size_t size) { - if (!size) /* size request, no buffer was needed */ - return; - else if (size <= PAGE_SIZE) + if (size) /* for a size request, no buffer was needed */ kfree(ptr); - else - vfree(ptr); } /* diff -Nru a/include/asm-sh/ioctl.h b/include/asm-sh/ioctl.h --- a/include/asm-sh/ioctl.h Wed Aug 27 22:47:36 2003 +++ b/include/asm-sh/ioctl.h Wed Aug 27 22:47:36 2003 @@ -1,4 +1,4 @@ -/* $Id: ioctl.h,v 1.1 2000/04/14 16:48:21 mjd Exp $ +/* $Id: ioctl.h,v 1.1 1999/09/18 17:29:53 gniibe Exp $ * * linux/ioctl.h for Linux by H.H. Bergman. */ diff -Nru a/include/linux/fs.h b/include/linux/fs.h --- a/include/linux/fs.h Wed Aug 27 22:47:36 2003 +++ b/include/linux/fs.h Wed Aug 27 22:47:36 2003 @@ -111,6 +111,7 @@ #define MS_MOVE 8192 #define MS_REC 16384 #define MS_VERBOSE 32768 +#define MS_POSIXACL 65536 /* VFS does not apply the umask */ #define MS_ACTIVE (1<<30) #define MS_NOUSER (1<<31) @@ -161,6 +162,7 @@ #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) #define IS_NOATIME(inode) (__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME)) #define IS_NODIRATIME(inode) __IS_FLG(inode, MS_NODIRATIME) +#define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL) #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) @@ -222,6 +224,7 @@ BH_Attached, /* 1 if b_inode_buffers is linked into a list */ BH_JBD, /* 1 if it has an attached journal_head */ BH_Sync, /* 1 if the buffer is a sync read */ + BH_Delay, /* 1 if the buffer is delayed allocate */ BH_PrivateStart,/* not a state bit, but the first bit available * for private allocation by other entities @@ -284,6 +287,7 @@ #define buffer_new(bh) __buffer_state(bh,New) #define buffer_async(bh) __buffer_state(bh,Async) #define buffer_launder(bh) __buffer_state(bh,Launder) +#define buffer_delay(bh) __buffer_state(bh,Delay) #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) @@ -966,6 +970,7 @@ #define I_LOCK 8 #define I_FREEING 16 #define I_CLEAR 32 +#define I_NEW 64 #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) @@ -1144,6 +1149,7 @@ extern void refile_buffer(struct buffer_head * buf); extern void create_empty_buffers(struct page *, kdev_t, unsigned long); extern void end_buffer_io_sync(struct buffer_head *bh, int uptodate); +extern void end_buffer_io_async(struct buffer_head *bh, int uptodate); /* reiserfs_writepage needs this */ extern void set_buffer_async_io(struct buffer_head *bh) ; @@ -1390,16 +1396,52 @@ #define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd) extern void inode_init_once(struct inode *); +extern void _inode_init_once(struct inode *); extern void iput(struct inode *); extern void force_delete(struct inode *); extern struct inode * igrab(struct inode *); extern ino_t iunique(struct super_block *, ino_t); +extern void unlock_new_inode(struct inode *); typedef int (*find_inode_t)(struct inode *, unsigned long, void *); -extern struct inode * iget4(struct super_block *, unsigned long, find_inode_t, void *); + +extern struct inode * iget4_locked(struct super_block *, unsigned long, + find_inode_t, void *); + +static inline struct inode *iget4(struct super_block *sb, unsigned long ino, + find_inode_t find_actor, void *opaque) +{ + struct inode *inode = iget4_locked(sb, ino, find_actor, opaque); + + if (inode && (inode->i_state & I_NEW)) { + /* + * reiserfs-specific kludge that is expected to go away ASAP. + */ + if (sb->s_op->read_inode2) + sb->s_op->read_inode2(inode, opaque); + else + sb->s_op->read_inode(inode); + unlock_new_inode(inode); + } + + return inode; +} + static inline struct inode *iget(struct super_block *sb, unsigned long ino) { - return iget4(sb, ino, NULL, NULL); + struct inode *inode = iget4_locked(sb, ino, NULL, NULL); + + if (inode && (inode->i_state & I_NEW)) { + sb->s_op->read_inode(inode); + unlock_new_inode(inode); + } + + return inode; +} + +static inline struct inode *iget_locked(struct super_block *sb, unsigned long ino) +{ + return iget4_locked(sb, ino, NULL, NULL); } extern void clear_inode(struct inode *); diff -Nru a/include/linux/mm.h b/include/linux/mm.h --- a/include/linux/mm.h Wed Aug 27 22:47:35 2003 +++ b/include/linux/mm.h Wed Aug 27 22:47:35 2003 @@ -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); }; /* diff -Nru a/include/linux/posix_acl_xattr.h b/include/linux/posix_acl_xattr.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/linux/posix_acl_xattr.h Wed Aug 27 22:47:38 2003 @@ -0,0 +1,67 @@ +/* + File: linux/posix_acl_xattr.h + + Extended attribute system call representation of Access Control Lists. + + Copyright (C) 2000 by Andreas Gruenbacher + Copyright (C) 2002 SGI - Silicon Graphics, Inc + */ +#ifndef _POSIX_ACL_XATTR_H +#define _POSIX_ACL_XATTR_H + +/* Extended attribute names */ +#define POSIX_ACL_XATTR_ACCESS "system.posix_acl_access" +#define POSIX_ACL_XATTR_DEFAULT "system.posix_acl_default" + +/* Supported ACL a_version fields */ +#define POSIX_ACL_XATTR_VERSION 0x0002 + + +/* An undefined entry e_id value */ +#define ACL_UNDEFINED_ID (-1) + +/* ACL entry e_tag field values */ +#define ACL_USER_OBJ (0x01) +#define ACL_USER (0x02) +#define ACL_GROUP_OBJ (0x04) +#define ACL_GROUP (0x08) +#define ACL_MASK (0x10) +#define ACL_OTHER (0x20) + +/* ACL entry e_perm bitfield values */ +#define ACL_READ (0x04) +#define ACL_WRITE (0x02) +#define ACL_EXECUTE (0x01) + + +typedef struct { + __u16 e_tag; + __u16 e_perm; + __u32 e_id; +} posix_acl_xattr_entry; + +typedef struct { + __u32 a_version; + posix_acl_xattr_entry a_entries[0]; +} posix_acl_xattr_header; + + +static inline size_t +posix_acl_xattr_size(int count) +{ + return (sizeof(posix_acl_xattr_header) + + (count * sizeof(posix_acl_xattr_entry))); +} + +static inline int +posix_acl_xattr_count(size_t size) +{ + if (size < sizeof(posix_acl_xattr_header)) + return -1; + size -= sizeof(posix_acl_xattr_header); + if (size % sizeof(posix_acl_xattr_entry)) + return -1; + return size / sizeof(posix_acl_xattr_entry); +} + +#endif /* _POSIX_ACL_XATTR_H */ diff -Nru a/include/linux/posix_cap_xattr.h b/include/linux/posix_cap_xattr.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/include/linux/posix_cap_xattr.h Wed Aug 27 22:47:38 2003 @@ -0,0 +1,27 @@ +/* + File: linux/posix_cap_xattr.h + + Extended attribute representation of capabilities +*/ +#ifndef _POSIX_CAP_XATTR_H +#define _POSIX_CAP_XATTR_H + +#define POSIX_CAP_XATTR "system.posix_capabilities" +#define POSIX_CAP_XATTR_VERSION 0x0001 + +typedef __u64 posix_cap_xattr_value; + +typedef struct { + __u32 c_version; + __u32 c_abiversion; + posix_cap_xattr_value c_effective; + posix_cap_xattr_value c_permitted; + posix_cap_xattr_value c_inheritable; +} posix_cap_xattr; + +static inline size_t posix_cap_xattr_size(void) +{ + return (sizeof(posix_cap_xattr)); +} + +#endif /* _POSIX_CAP_XATTR_H */ diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h Wed Aug 27 22:47:35 2003 +++ b/include/linux/sched.h Wed Aug 27 22:47:35 2003 @@ -432,6 +432,7 @@ #define PF_MEMDIE 0x00001000 /* Killed for out-of-memory */ #define PF_FREE_PAGES 0x00002000 /* per process page freeing */ #define PF_NOIO 0x00004000 /* avoid generating further I/O */ +#define PF_FSTRANS 0x00008000 /* inside a filesystem transaction */ #define PF_USEDFPU 0x00100000 /* task used FPU this quantum (SMP) */ diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h Wed Aug 27 22:47:35 2003 +++ b/include/linux/sysctl.h Wed Aug 27 22:47:35 2003 @@ -124,6 +124,7 @@ KERN_CORE_USES_PID=52, /* int: use core or core.%pid */ KERN_TAINTED=53, /* int: various kernel tainted flags */ KERN_CADPID=54, /* int: PID of the process to notify on CAD */ + KERN_KDB=55, /* int: kdb on/off */ KERN_CORE_PATTERN=56, /* string: pattern for core-files */ KERN_PPC_L3CR=57, /* l3cr register on PPC */ KERN_EXCEPTION_TRACE=58, /* boolean: exception trace */ @@ -146,6 +147,7 @@ VM_MAX_MAP_COUNT=11, /* int: Maximum number of active map areas */ VM_MIN_READAHEAD=12, /* Min file readahead */ VM_MAX_READAHEAD=13, /* Max file readahead */ + VM_PAGEBUF=17, /* struct: Control pagebuf parameters */ }; diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c --- a/kernel/ksyms.c Wed Aug 27 22:47:35 2003 +++ b/kernel/ksyms.c Wed Aug 27 22:47:35 2003 @@ -143,15 +143,18 @@ EXPORT_SYMBOL(fget); EXPORT_SYMBOL(igrab); EXPORT_SYMBOL(iunique); -EXPORT_SYMBOL(iget4); +EXPORT_SYMBOL(iget4_locked); +EXPORT_SYMBOL(unlock_new_inode); EXPORT_SYMBOL(iput); EXPORT_SYMBOL(inode_init_once); +EXPORT_SYMBOL(_inode_init_once); EXPORT_SYMBOL(force_delete); EXPORT_SYMBOL(follow_up); EXPORT_SYMBOL(follow_down); EXPORT_SYMBOL(lookup_mnt); EXPORT_SYMBOL(path_init); EXPORT_SYMBOL(path_walk); +EXPORT_SYMBOL(path_lookup); EXPORT_SYMBOL(path_release); EXPORT_SYMBOL(__user_walk); EXPORT_SYMBOL(lookup_one_len); @@ -171,6 +174,7 @@ EXPORT_SYMBOL(__d_path); EXPORT_SYMBOL(mark_buffer_dirty); EXPORT_SYMBOL(set_buffer_async_io); /* for reiserfs_writepage */ +EXPORT_SYMBOL(end_buffer_io_async); EXPORT_SYMBOL(__mark_buffer_dirty); EXPORT_SYMBOL(__mark_inode_dirty); EXPORT_SYMBOL(fd_install); @@ -249,6 +253,7 @@ EXPORT_SYMBOL(find_inode_number); EXPORT_SYMBOL(is_subdir); EXPORT_SYMBOL(get_unused_fd); +EXPORT_SYMBOL(put_unused_fd); EXPORT_SYMBOL(vfs_create); EXPORT_SYMBOL(vfs_mkdir); EXPORT_SYMBOL(vfs_mknod); @@ -266,6 +271,7 @@ EXPORT_SYMBOL(ROOT_DEV); EXPORT_SYMBOL(__find_get_page); EXPORT_SYMBOL(__find_lock_page); +EXPORT_SYMBOL(find_trylock_page); EXPORT_SYMBOL(find_or_create_page); EXPORT_SYMBOL(grab_cache_page_nowait); EXPORT_SYMBOL(read_cache_page); diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c --- a/kernel/sysctl.c Wed Aug 27 22:47:35 2003 +++ b/kernel/sysctl.c Wed Aug 27 22:47:35 2003 @@ -28,6 +28,9 @@ #include #include #include +#ifdef CONFIG_KDB +#include +#endif /* CONFIG_KDB */ #include #include diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c Wed Aug 27 22:47:37 2003 +++ b/mm/filemap.c Wed Aug 27 22:47:37 2003 @@ -3315,6 +3315,9 @@ return err; } +EXPORT_SYMBOL(do_generic_file_write); +EXPORT_SYMBOL(do_generic_direct_write); + void __init page_cache_init(unsigned long mempages) { unsigned long htable_size, order; diff -Nru a/mm/mprotect.c b/mm/mprotect.c --- a/mm/mprotect.c Wed Aug 27 22:47:37 2003 +++ b/mm/mprotect.c Wed Aug 27 22:47:37 2003 @@ -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;