summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAndy Grover <agrover@groveronline.com>2003-03-19 00:09:51 -0800
committerAndy Grover <agrover@groveronline.com>2003-03-19 00:09:51 -0800
commitb39e199b453be169dfd1adec9686978057c1dc0f (patch)
treedd7162a8e62d003159d6250069194b48a72b76d0 /fs
parent99d5dfb972d15c955e274d3f67e3862ce8004311 (diff)
parentd99c48c60bc52561b3125dd1f85db7a77b7031ca (diff)
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
Diffstat (limited to 'fs')
-rw-r--r--fs/Kconfig1673
-rw-r--r--fs/affs/Changes5
-rw-r--r--fs/affs/bitmap.c13
-rw-r--r--fs/affs/dir.c3
-rw-r--r--fs/affs/inode.c15
-rw-r--r--fs/affs/namei.c60
-rw-r--r--fs/affs/super.c9
-rw-r--r--fs/affs/symlink.c4
-rw-r--r--fs/binfmt_elf.c13
-rw-r--r--fs/dcache.c6
-rw-r--r--fs/devfs/base.c5
-rw-r--r--fs/exec.c2
-rw-r--r--fs/exportfs/expfs.c5
-rw-r--r--fs/ext2/balloc.c2
-rw-r--r--fs/ext2/ext2.h1
-rw-r--r--fs/ext2/ialloc.c5
-rw-r--r--fs/ext2/inode.c26
-rw-r--r--fs/ext2/ioctl.c17
-rw-r--r--fs/ext3/ialloc.c5
-rw-r--r--fs/ext3/inode.c27
-rw-r--r--fs/ext3/ioctl.c17
-rw-r--r--fs/file_table.c188
-rw-r--r--fs/inode.c3
-rw-r--r--fs/lockd/svclock.c8
-rw-r--r--fs/locks.c4
-rw-r--r--fs/namei.c9
-rw-r--r--fs/nfs/inode.c1
-rw-r--r--fs/nfsd/export.c15
-rw-r--r--fs/nfsd/vfs.c35
-rw-r--r--fs/proc/proc_misc.c28
-rw-r--r--fs/reiserfs/journal.c76
-rw-r--r--fs/select.c4
-rw-r--r--fs/seq_file.c4
-rw-r--r--fs/super.c8
-rw-r--r--fs/ufs/util.c1
35 files changed, 1174 insertions, 1123 deletions
diff --git a/fs/Kconfig b/fs/Kconfig
index 1697ef34c9a5..3326d8daedcc 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -4,89 +4,180 @@
menu "File systems"
-config QUOTA
- bool "Quota support"
+config EXT2_FS
+ tristate "Second extended fs support"
help
- If you say Y here, you will be able to set per user limits for disk
- usage (also called disk quotas). Currently, it works for the
- ext2, ext3, and reiserfs file system. You need additional software
- in order to use quota support (you can download sources from
- <http://www.sf.net/projects/linuxquota/>). For further details, read
- the Quota mini-HOWTO, available from
- <http://www.linuxdoc.org/docs.html#howto>. Probably the quota
- support is only useful for multi user systems. If unsure, say N.
+ This is the de facto standard Linux file system (method to organize
+ files on a storage device) for hard disks.
-config QFMT_V1
- tristate "Old quota format support"
- depends on QUOTA
+ You want to say Y here, unless you intend to use Linux exclusively
+ from inside a DOS partition using the UMSDOS file system. The
+ advantage of the latter is that you can get away without
+ repartitioning your hard drive (which often implies backing
+ everything up and restoring afterwards); the disadvantage is that
+ Linux becomes susceptible to DOS viruses and that UMSDOS is somewhat
+ slower than ext2fs. Even if you want to run Linux in this fashion,
+ it might be a good idea to have ext2fs around: it enables you to
+ read more floppy disks and facilitates the transition to a *real*
+ Linux partition later. Another (rare) case which doesn't require
+ ext2fs is a diskless Linux box which mounts all files over the
+ network using NFS (in this case it's sufficient to say Y to "NFS
+ file system support" below). Saying Y here will enlarge your kernel
+ by about 44 KB.
+
+ The Ext2fs-Undeletion mini-HOWTO, available from
+ <http://www.linuxdoc.org/docs.html#howto>, gives information about
+ how to retrieve deleted files on ext2fs file systems.
+
+ To change the behavior of ext2 file systems, you can use the tune2fs
+ utility ("man tune2fs"). To modify attributes of files and
+ directories on ext2 file systems, use chattr ("man chattr").
+
+ Ext2fs partitions can be read from within DOS using the ext2tool
+ command line tool package (available from
+ <ftp://ibiblio.org/pub/Linux/system/filesystems/ext2/>) and from
+ within Windows NT using the ext2nt command line tool package from
+ <ftp://ibiblio.org/pub/Linux/utils/dos/>. Explore2fs is a
+ graphical explorer for ext2fs partitions which runs on Windows 95
+ and Windows NT and includes experimental write support; it is
+ available from
+ <http://jnewbigin-pc.it.swin.edu.au/Linux/Explore2fs.htm>.
+
+ 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 <file:Documentation/modules.txt>. The
+ module will be called ext2. Be aware however that the file system
+ of your root partition (the one containing the directory /) cannot
+ be compiled as a module, and so this could be dangerous. Most
+ everyone wants to say Y here.
+
+config EXT2_FS_XATTR
+ bool "Ext2 extended attributes"
+ depends on EXT2_FS
help
- This quota format was (is) used by kernels earlier than 2.4.??. If
- you have quota working and you don't want to convert to new quota
- format say Y here.
+ Extended attributes are name:value pairs associated with inodes by
+ the kernel or by users (see the attr(5) manual page, or visit
+ <http://acl.bestbits.at/> for details).
-config QFMT_V2
- tristate "Quota format v2 support"
- depends on QUOTA
+ If unsure, say N.
+
+config EXT2_FS_POSIX_ACL
+ bool "Ext2 POSIX Access Control Lists"
+ depends on EXT2_FS_XATTR
help
- This quota format allows using quotas with 32-bit UIDs/GIDs. If you
- need this functionality say Y here. Note that you will need latest
- quota utilities for new quota format with this kernel.
+ Posix Access Control Lists (ACLs) support permissions for users and
+ groups beyond the owner/group/world scheme.
-config QUOTACTL
- bool
- depends on XFS_QUOTA || QUOTA
+ To learn more about Access Control Lists, visit the Posix ACLs for
+ Linux website <http://acl.bestbits.at/>.
+
+ If you don't know what Access Control Lists are, say N
+
+config EXT3_FS
+ tristate "Ext3 journalling file system support"
+ help
+ This is the journaling version of the Second extended file system
+ (often called ext3), the de facto standard Linux file system
+ (method to organize files on a storage device) for hard disks.
+
+ The journaling code included in this driver means you do not have
+ to run e2fsck (file system checker) on your file systems after a
+ crash. The journal keeps track of any changes that were being made
+ at the time the system crashed, and can ensure that your file system
+ is consistent without the need for a lengthy check.
+
+ Other than adding the journal to the file system, the on-disk format
+ of ext3 is identical to ext2. It is possible to freely switch
+ between using the ext3 driver and the ext2 driver, as long as the
+ file system has been cleanly unmounted, or e2fsck is run on the file
+ system.
+
+ To add a journal on an existing ext2 file system or change the
+ behavior of ext3 file systems, you can use the tune2fs utility ("man
+ tune2fs"). To modify attributes of files and directories on ext3
+ file systems, use chattr ("man chattr"). You need to be using
+ e2fsprogs version 1.20 or later in order to create ext3 journals
+ (available at <http://sourceforge.net/projects/e2fsprogs/>).
+
+ 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 <file:Documentation/modules.txt>. The
+ module will be called ext3. Be aware however that the file system
+ of your root partition (the one containing the directory /) cannot
+ be compiled as a module, and so this may be dangerous.
+
+config EXT3_FS_XATTR
+ bool "Ext3 extended attributes"
+ depends on EXT3_FS
default y
+ help
+ Extended attributes are name:value pairs associated with inodes by
+ the kernel or by users (see the attr(5) manual page, or visit
+ <http://acl.bestbits.at/> for details).
-config AUTOFS_FS
- tristate "Kernel automounter support"
- ---help---
- The automounter is a tool to automatically mount remote file systems
- on demand. This implementation is partially kernel-based to reduce
- overhead in the already-mounted case; this is unlike the BSD
- automounter (amd), which is a pure user space daemon.
+ If unsure, say N.
- To use the automounter you need the user-space tools from the autofs
- package; you can find the location in <file:Documentation/Changes>.
- You also want to answer Y to "NFS file system support", below.
+ You need this for POSIX ACL support on ext3.
- If you want to use the newer version of the automounter with more
- features, say N here and say Y to "Kernel automounter v4 support",
- below.
+config EXT3_FS_POSIX_ACL
+ bool "Ext3 POSIX Access Control Lists"
+ depends on EXT3_FS_XATTR
+ help
+ Posix Access Control Lists (ACLs) support permissions for users and
+ groups beyond the owner/group/world scheme.
- If you want to compile this as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read <file:Documentation/modules.txt>. The module
- will be called autofs.
+ To learn more about Access Control Lists, visit the Posix ACLs for
+ Linux website <http://acl.bestbits.at/>.
- If you are not a part of a fairly large, distributed network, you
- probably do not need an automounter, and can say N here.
+ If you don't know what Access Control Lists are, say N
-config AUTOFS4_FS
- tristate "Kernel automounter version 4 support (also supports v3)"
- ---help---
- The automounter is a tool to automatically mount remote file systems
- on demand. This implementation is partially kernel-based to reduce
- overhead in the already-mounted case; this is unlike the BSD
- automounter (amd), which is a pure user space daemon.
+config JBD
+# CONFIG_JBD could be its own option (even modular), but until there are
+# other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
+# dep_tristate ' Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
+ bool
+ default EXT3_FS
+ help
+ This is a generic journaling layer for block devices. It is
+ currently used by the ext3 file system, but it could also be used to
+ add journal support to other file systems or block devices such as
+ RAID or LVM.
- To use the automounter you need the user-space tools from
- <ftp://ftp.kernel.org/pub/linux/daemons/autofs/testing-v4/>; you also
- want to answer Y to "NFS file system support", below.
+ If you are using the ext3 file system, you need to say Y here. If
+ you are not using ext3 then you will probably want to say N.
- If you want to compile this as a module ( = code which can be
+ If you want to compile this device as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. The module
- will be called autofs4. You will need to add "alias autofs
- autofs4" to your modules configuration file.
+ will be called jbd. If you are compiling ext3 into the kernel,
+ you cannot compile this code as a module.
- If you are not a part of a fairly large, distributed network or
- don't have a laptop which needs to dynamically reconfigure to the
- local network, you probably do not need an automounter, and can say
- N here.
+config JBD_DEBUG
+ bool "JBD (ext3) debugging support"
+ depends on JBD
+ help
+ If you are using the ext3 journaled file system (or potentially any
+ other file system/device using JBD), this option allows you to
+ enable debugging output while the system is running, in order to
+ help track down any problems you are having. By default the
+ debugging output will be turned off.
+
+ If you select Y here, then you will be able to turn on debugging
+ with "echo N > /proc/sys/fs/jbd-debug", where N is a number between
+ 1 and 5, the higher the number, the more debugging output is
+ generated. To turn debugging off again, do
+ "echo 0 > /proc/sys/fs/jbd-debug".
+
+config FS_MBCACHE
+# Meta block cache for Extended Attributes (ext2/ext3)
+ tristate
+ depends on EXT2_FS_XATTR || EXT3_FS_XATTR
+ default y if EXT2_FS=y || EXT3_FS=y
+ default m if EXT2_FS=m || EXT3_FS=m
config REISERFS_FS
tristate "Reiserfs support"
- ---help---
+ help
Stores not just filenames but the files themselves in a balanced
tree. Uses journaling.
@@ -135,226 +226,308 @@ config REISERFS_PROC_INFO
Almost everyone but ReiserFS developers and people fine-tuning
reiserfs or tracing problems should say N.
-config ADFS_FS
- tristate "ADFS file system support (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- ---help---
- The Acorn Disc Filing System is the standard file system of the
- RiscOS operating system which runs on Acorn's ARM-based Risc PC
- systems and the Acorn Archimedes range of machines. If you say Y
- here, Linux will be able to read from ADFS partitions on hard drives
- and from ADFS-formatted floppy discs. If you also want to be able to
- write to those devices, say Y to "ADFS write support" below.
+config JFS_FS
+ tristate "JFS filesystem support"
+ help
+ This is a port of IBM's Journaled Filesystem . More information is
+ available in the file Documentation/filesystems/jfs.txt.
- The ADFS partition should be the first partition (i.e.,
- /dev/[hs]d?1) on each of your drives. Please read the file
- <file:Documentation/filesystems/adfs.txt> for further details.
+ If you do not intend to use the JFS filesystem, say N.
- This code is also available as a module called adfs ( = code which
+config JFS_POSIX_ACL
+ bool "JFS POSIX Access Control Lists"
+ depends on JFS_FS
+ help
+ 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 <http://acl.bestbits.at/>.
+
+ If you don't know what Access Control Lists are, say N
+
+config JFS_DEBUG
+ bool "JFS debugging"
+ depends on JFS_FS
+ help
+ If you are experiencing any problems with the JFS filesystem, say
+ Y here. This will result in additional debugging messages to be
+ written to the system log. Under normal circumstances, this
+ results in very little overhead.
+
+config JFS_STATISTICS
+ bool "JFS statistics"
+ depends on JFS_FS
+ help
+ Enabling this option will cause statistics from the JFS file system
+ to be made available to the user in the /proc/fs/jfs/ directory.
+
+config FS_POSIX_ACL
+# Posix ACL utility routines (for now, only ext2/ext3/jfs)
+#
+# NOTE: you can implement Posix ACLs without these helpers (XFS does).
+# Never use this symbol for ifdefs.
+#
+ bool
+ depends on EXT2_FS_POSIX_ACL || EXT3_FS_POSIX_ACL || JFS_POSIX_ACL
+ default y
+
+config XFS_FS
+ tristate "XFS filesystem support"
+ help
+ 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 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). If you want to compile it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ want), say M here and read <file:Documentation/modules.txt>. The
+ module will be called xfs. 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.
+
+config XFS_RT
+ bool "Realtime support (EXPERIMENTAL)"
+ depends on XFS_FS && EXPERIMENTAL
+ help
+ 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.
-config ADFS_FS_RW
- bool "ADFS write support (DANGEROUS)"
- depends on ADFS_FS
+config XFS_QUOTA
+ bool "Quota support"
+ depends on XFS_FS
help
- If you say Y here, you will be able to write to ADFS partitions on
- hard drives and ADFS-formatted floppy disks. This is experimental
- codes, so if you're unsure, say N.
+ If you say Y here, you will be able to set limits for disk usage on
+ a per user and/or a 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.
-config AFFS_FS
- tristate "Amiga FFS file system support (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- ---help---
- The Fast File System (FFS) is the common file system used on hard
- disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20). Say Y
- if you want to be able to read and write files from and to an Amiga
- FFS partition on your hard drive. Amiga floppies however cannot be
- read with this driver due to an incompatibility of the floppy
- controller used in an Amiga and the standard floppy controller in
- PCs and workstations. Read <file:Documentation/filesystems/affs.txt>
- and <file:fs/affs/Changes>.
+ 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.
- With this driver you can also mount disk files used by Bernd
- Schmidt's Un*X Amiga Emulator
- (<http://www.freiburg.linux.de/~uae/>).
- If you want to do this, you will also need to say Y or M to "Loop
- device support", above.
+config XFS_POSIX_ACL
+ bool "ACL support"
+ depends on XFS_FS
+ help
+ Posix Access Control Lists (ACLs) support permissions for users and
+ groups beyond the owner/group/world scheme.
- This file system is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module is called affs. If you want to compile it as a module,
- say M here and read <file:Documentation/modules.txt>. If unsure,
- say N.
+ To learn more about Access Control Lists, visit the Posix ACLs for
+ Linux website <http://acl.bestbits.at/>.
-config HFS_FS
- tristate "Apple Macintosh file system support (EXPERIMENTAL)"
- depends on EXPERIMENTAL
+ If you don't know what Access Control Lists are, say N
+
+config MINIX_FS
+ tristate "Minix fs support"
+ help
+ Minix is a simple operating system used in many classes about OS's.
+ The minix file system (method to organize files on a hard disk
+ partition or a floppy disk) was the original file system for Linux,
+ but has been superseded by the second extended file system ext2fs.
+ You don't want to use the minix file system on your hard disk
+ because of certain built-in restrictions, but it is sometimes found
+ on older Linux floppy disks. This option will enlarge your kernel
+ by about 28 KB. If unsure, say N.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module
+ will be called minix. Note that the file system of your root
+ partition (the one containing the directory /) cannot be compiled as
+ a module.
+
+config ROMFS_FS
+ tristate "ROM file system support"
---help---
- If you say Y here, you will be able to mount Macintosh-formatted
- floppy disks and hard drive partitions with full read-write access.
- Please read <file:fs/hfs/HFS.txt> to learn about the available mount
- options.
+ This is a very small read-only file system mainly intended for
+ initial ram disks of installation disks, but it could be used for
+ other read-only media as well. Read
+ <file:Documentation/filesystems/romfs.txt> for details.
This file system support is also available as a module ( = code
which can be inserted in and removed from the running kernel
- whenever you want). The module is called hfs. If you want to
+ whenever you want). The module is called romfs. If you want to
compile it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ <file:Documentation/modules.txt>. Note that the file system of your
+ root partition (the one containing the directory /) cannot be a
+ module.
-config BEFS_FS
- tristate "BeOS file systemv(BeFS) support (read only) (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- ---help---
- The BeOS File System (BeFS) is the native file system of Be, Inc's
- BeOS. Notable features include support for arbitrary attributes
- on files and directories, and database-like indices on selected
- attributes. (Also note that this driver doesn't make those features
- available at this time). It is a 64 bit filesystem, so it supports
- extreemly large volumes and files.
+ If you don't know whether you need it, then you don't need it:
+ answer N.
- If you use this filesystem, you should also say Y to at least one
- of the NLS (native language support) options below.
+config QUOTA
+ bool "Quota support"
+ help
+ If you say Y here, you will be able to set per user limits for disk
+ usage (also called disk quotas). Currently, it works for the
+ ext2, ext3, and reiserfs file system. You need additional software
+ in order to use quota support (you can download sources from
+ <http://www.sf.net/projects/linuxquota/>). For further details, read
+ the Quota mini-HOWTO, available from
+ <http://www.linuxdoc.org/docs.html#howto>. Probably the quota
+ support is only useful for multi user systems. If unsure, say N.
- If you don't know what this is about, say N.
+config QFMT_V1
+ tristate "Old quota format support"
+ depends on QUOTA
+ help
+ This quota format was (is) used by kernels earlier than 2.4.??. If
+ you have quota working and you don't want to convert to new quota
+ format say Y here.
- If you want to compile this as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read Documentation/modules.txt. The module will be
- called befs.
+config QFMT_V2
+ tristate "Quota format v2 support"
+ depends on QUOTA
+ help
+ This quota format allows using quotas with 32-bit UIDs/GIDs. If you
+ need this functionality say Y here. Note that you will need latest
+ quota utilities for new quota format with this kernel.
-config BEFS_DEBUG
- bool "Debug BeFS"
- depends on BEFS_FS
+config QUOTACTL
+ bool
+ depends on XFS_QUOTA || QUOTA
+ default y
+
+config AUTOFS_FS
+ tristate "Kernel automounter support"
help
- If you say Y here, you can use the 'debug' mount option to enable
- debugging output from the driver.
+ The automounter is a tool to automatically mount remote file systems
+ on demand. This implementation is partially kernel-based to reduce
+ overhead in the already-mounted case; this is unlike the BSD
+ automounter (amd), which is a pure user space daemon.
-config BFS_FS
- tristate "BFS file system support (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- ---help---
- Boot File System (BFS) is a file system used under SCO UnixWare to
- allow the bootloader access to the kernel image and other important
- files during the boot process. It is usually mounted under /stand
- and corresponds to the slice marked as "STAND" in the UnixWare
- partition. You should say Y if you want to read or write the files
- on your /stand slice from within Linux. You then also need to say Y
- to "UnixWare slices support", below. More information about the BFS
- file system is contained in the file
- <file:Documentation/filesystems/bfs.txt>.
+ To use the automounter you need the user-space tools from the autofs
+ package; you can find the location in <file:Documentation/Changes>.
+ You also want to answer Y to "NFS file system support", below.
- If you don't know what this is about, say N.
+ If you want to use the newer version of the automounter with more
+ features, say N here and say Y to "Kernel automounter v4 support",
+ below.
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. The module
- will be called bfs. Note that the file system of your root
- partition (the one containing the directory /) cannot be compiled as
- a module.
+ will be called autofs.
-config EXT3_FS
- tristate "Ext3 journalling file system support"
- ---help---
- This is the journaling version of the Second extended file system
- (often called ext3), the de facto standard Linux file system
- (method to organize files on a storage device) for hard disks.
+ If you are not a part of a fairly large, distributed network, you
+ probably do not need an automounter, and can say N here.
- The journaling code included in this driver means you do not have
- to run e2fsck (file system checker) on your file systems after a
- crash. The journal keeps track of any changes that were being made
- at the time the system crashed, and can ensure that your file system
- is consistent without the need for a lengthy check.
+config AUTOFS4_FS
+ tristate "Kernel automounter version 4 support (also supports v3)"
+ help
+ The automounter is a tool to automatically mount remote file systems
+ on demand. This implementation is partially kernel-based to reduce
+ overhead in the already-mounted case; this is unlike the BSD
+ automounter (amd), which is a pure user space daemon.
- Other than adding the journal to the file system, the on-disk format
- of ext3 is identical to ext2. It is possible to freely switch
- between using the ext3 driver and the ext2 driver, as long as the
- file system has been cleanly unmounted, or e2fsck is run on the file
- system.
+ To use the automounter you need the user-space tools from
+ <ftp://ftp.kernel.org/pub/linux/daemons/autofs/testing-v4/>; you also
+ want to answer Y to "NFS file system support", below.
- To add a journal on an existing ext2 file system or change the
- behavior of ext3 file systems, you can use the tune2fs utility ("man
- tune2fs"). To modify attributes of files and directories on ext3
- file systems, use chattr ("man chattr"). You need to be using
- e2fsprogs version 1.20 or later in order to create ext3 journals
- (available at <http://sourceforge.net/projects/e2fsprogs/>).
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module
+ will be called autofs4. You will need to add "alias autofs
+ autofs4" to your modules configuration file.
- 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 <file:Documentation/modules.txt>. The
- module will be called ext3. Be aware however that the file system
- of your root partition (the one containing the directory /) cannot
- be compiled as a module, and so this may be dangerous.
+ If you are not a part of a fairly large, distributed network or
+ don't have a laptop which needs to dynamically reconfigure to the
+ local network, you probably do not need an automounter, and can say
+ N here.
-config EXT3_FS_XATTR
- bool "Ext3 extended attributes"
- depends on EXT3_FS
- default y
- ---help---
- Extended attributes are name:value pairs associated with inodes by
- the kernel or by users (see the attr(5) manual page, or visit
- <http://acl.bestbits.at/> for details).
+menu "CD-ROM/DVD Filesystems"
- If unsure, say N.
+config ISO9660_FS
+ tristate "ISO 9660 CDROM file system support"
+ help
+ This is the standard file system used on CD-ROMs. It was previously
+ known as "High Sierra File System" and is called "hsfs" on other
+ Unix systems. The so-called Rock-Ridge extensions which allow for
+ long Unix filenames and symbolic links are also supported by this
+ driver. If you have a CD-ROM drive and want to do more with it than
+ just listen to audio CDs and watch its LEDs, say Y (and read
+ <file:Documentation/filesystems/isofs.txt> and the CD-ROM-HOWTO,
+ available from <http://www.linuxdoc.org/docs.html#howto>), thereby
+ enlarging your kernel by about 27 KB; otherwise say N.
- You need this for POSIX ACL support on ext3.
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module
+ will be called isofs.
-config EXT3_FS_POSIX_ACL
- bool "Ext3 POSIX Access Control Lists"
- depends on EXT3_FS_XATTR
- ---help---
- Posix Access Control Lists (ACLs) support permissions for users and
- groups beyond the owner/group/world scheme.
+config JOLIET
+ bool "Microsoft Joliet CDROM extensions"
+ depends on ISO9660_FS
+ help
+ Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
+ which allows for long filenames in unicode format (unicode is the
+ new 16 bit character code, successor to ASCII, which encodes the
+ characters of almost all languages of the world; see
+ <http://www.unicode.org/> for more information). Say Y here if you
+ want to be able to read Joliet CD-ROMs under Linux.
- To learn more about Access Control Lists, visit the Posix ACLs for
- Linux website <http://acl.bestbits.at/>.
+config ZISOFS
+ bool "Transparent decompression extension"
+ depends on ISO9660_FS
+ help
+ This is a Linux-specific extension to RockRidge which lets you store
+ data in compressed form on a CD-ROM and have it transparently
+ decompressed when the CD-ROM is accessed. See
+ <http://www.kernel.org/pub/linux/utils/fs/zisofs/> for the tools
+ necessary to create such a filesystem. Say Y here if you want to be
+ able to read such compressed CD-ROMs.
- If you don't know what Access Control Lists are, say N
+config ZISOFS_FS
+# for fs/nls/Config.in
+ tristate
+ depends on ZISOFS
+ default ISO9660_FS
-# CONFIG_JBD could be its own option (even modular), but until there are
-# other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
-# dep_tristate ' Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
-config JBD
- bool
- default EXT3_FS
- ---help---
- This is a generic journaling layer for block devices. It is
- currently used by the ext3 file system, but it could also be used to
- add journal support to other file systems or block devices such as
- RAID or LVM.
+config UDF_FS
+ tristate "UDF file system support"
+ help
+ This is the new file system used on some CD-ROMs and DVDs. Say Y if
+ you intend to mount DVD discs or CDRW's written in packet mode, or
+ if written to by other UDF utilities, such as DirectCD.
+ Please read <file:Documentation/filesystems/udf.txt>.
- If you are using the ext3 file system, you need to say Y here. If
- you are not using ext3 then you will probably want to say N.
+ This file system support is also available as a module ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). The module is called udf. If you want to
+ compile it as a module, say M here and read
+ <file:Documentation/modules.txt>.
- If you want to compile this device as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read <file:Documentation/modules.txt>. The module
- will be called jbd. If you are compiling ext3 into the kernel,
- you cannot compile this code as a module.
+ If unsure, say N.
-config JBD_DEBUG
- bool "JBD (ext3) debugging support"
- depends on JBD
- ---help---
- If you are using the ext3 journaled file system (or potentially any
- other file system/device using JBD), this option allows you to
- enable debugging output while the system is running, in order to
- help track down any problems you are having. By default the
- debugging output will be turned off.
+endmenu
- If you select Y here, then you will be able to turn on debugging
- with "echo N > /proc/sys/fs/jbd-debug", where N is a number between
- 1 and 5, the higher the number, the more debugging output is
- generated. To turn debugging off again, do
- "echo 0 > /proc/sys/fs/jbd-debug".
+menu "DOS/FAT/NT Filesystems"
-# msdos file systems
config FAT_FS
tristate "DOS FAT fs support"
- ---help---
+ help
If you want to use one of the FAT-based file systems (the MS-DOS,
VFAT (Windows 95) and UMSDOS (used to run Linux on top of an
ordinary DOS partition) file systems), then you must say Y or M here
@@ -398,7 +571,7 @@ config FAT_FS
config MSDOS_FS
tristate "MSDOS fs support"
depends on FAT_FS
- ---help---
+ help
This allows you to mount MSDOS partitions of your hard drive (unless
they are compressed; to access compressed MSDOS partitions under
Linux, you can either use the DOS emulator DOSEMU, described in the
@@ -427,11 +600,35 @@ config MSDOS_FS
<file:Documentation/modules.txt>.
The module will be called msdos.
+config VFAT_FS
+ tristate "VFAT (Windows-95) fs support"
+ depends on FAT_FS
+ help
+ This option provides support for normal Windows file systems with
+ long filenames. That includes non-compressed FAT-based file systems
+ used by Windows 95, Windows 98, Windows NT 4.0, and the Unix
+ programs from the mtools package.
+
+ You cannot use the VFAT file system for your Linux root partition
+ (the one containing the directory /); use UMSDOS instead if you
+ want to run Linux from within a DOS partition (i.e. say Y to
+ "Unix like fs on top of std MSDOS fs", below).
+
+ The VFAT support enlarges your kernel by about 10 KB and it only
+ works if you said Y to the "DOS FAT fs support" above. Please read
+ the file <file:Documentation/filesystems/vfat.txt> for details. If
+ unsure, say Y.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module
+ will be called vfat.
+
+config UMSDOS_FS
#dep_tristate ' UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS
# UMSDOS is temprory broken
-config UMSDOS_FS
bool
- ---help---
+ help
Say Y here if you want to run Linux from within an existing DOS
partition of your hard drive. The advantage of this is that you can
get away without repartitioning your hard drive (which often implies
@@ -458,34 +655,317 @@ config UMSDOS_FS
root partition (the one containing the directory /) cannot be a
module, so saying M could be dangerous. If unsure, say N.
-config VFAT_FS
- tristate "VFAT (Windows-95) fs support"
- depends on FAT_FS
+config NTFS_FS
+ tristate "NTFS file system support (read only)"
+ help
+ NTFS is the file system of Microsoft Windows NT/2000/XP. For more
+ information see <file:Documentation/filesystems/ntfs.txt>. Saying Y
+ here would allow you to read from NTFS partitions.
+
+ This file system is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module will be called ntfs. If you want to compile it as a
+ module, say M here and read <file:Documentation/modules.txt>.
+
+ If you are not using Windows NT/2000/XP in addition to Linux on your
+ computer it is safe to say N.
+
+config NTFS_DEBUG
+ bool "NTFS debugging support"
+ depends on NTFS_FS
+ help
+ If you are experiencing any problems with the NTFS file system, say
+ Y here. This will result in additional consistency checks to be
+ performed by the driver as well as additional debugging messages to
+ be written to the system log. Note that debugging messages are
+ disabled by default. To enable them, supply the option debug_msgs=1
+ at the kernel command line when booting the kernel or as an option
+ to insmod when loading the ntfs module. Once the driver is active,
+ you can enable debugging messages by doing (as root):
+ echo 1 > /proc/sys/fs/ntfs-debug
+ Replacing the "1" with "0" would disable debug messages.
+
+ If you leave debugging messages disabled, this results in little
+ overhead, but enabling debug messages results in very significant
+ slowdown of the system.
+
+ When reporting bugs, please try to have available a full dump of
+ debugging messages while the misbehaviour was occurring.
+
+config NTFS_RW
+ bool "NTFS write support (DANGEROUS)"
+ depends on NTFS_FS && EXPERIMENTAL
+ help
+ This enables the experimental write support in the NTFS driver.
+
+ WARNING: Do not use this option unless you are actively developing
+ NTFS as it is currently guaranteed to be broken and you
+ may lose all your data!
+
+ It is strongly recommended and perfectly safe to say N here.
+
+endmenu
+
+menu "Pseudo filesystems"
+
+config PROC_FS
+ bool "/proc file system support"
+ help
+ This is a virtual file system providing information about the status
+ of the system. "Virtual" means that it doesn't take up any space on
+ your hard disk: the files are created on the fly by the kernel when
+ you try to access them. Also, you cannot read the files with older
+ version of the program less: you need to use more or cat.
+
+ It's totally cool; for example, "cat /proc/interrupts" gives
+ information about what the different IRQs are used for at the moment
+ (there is a small number of Interrupt ReQuest lines in your computer
+ that are used by the attached devices to gain the CPU's attention --
+ often a source of trouble if two devices are mistakenly configured
+ to use the same IRQ). The program procinfo to display some
+ information about your system gathered from the /proc file system.
+
+ Before you can use the /proc file system, it has to be mounted,
+ meaning it has to be given a location in the directory hierarchy.
+ That location should be /proc. A command such as "mount -t proc proc
+ /proc" or the equivalent line in /etc/fstab does the job.
+
+ The /proc file system is explained in the file
+ <file:Documentation/filesystems/proc.txt> and on the proc(5) manpage
+ ("man 5 proc").
+
+ This option will enlarge your kernel by about 67 KB. Several
+ programs depend on this, so everyone should say Y here.
+
+config DEVFS_FS
+ bool "/dev file system support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ This is support for devfs, a virtual file system (like /proc) which
+ provides the file system interface to device drivers, normally found
+ in /dev. Devfs does not depend on major and minor number
+ allocations. Device drivers register entries in /dev which then
+ appear automatically, which means that the system administrator does
+ not have to create character and block special device files in the
+ /dev directory using the mknod command (or MAKEDEV script) anymore.
+
+ This is work in progress. If you want to use this, you *must* read
+ the material in <file:Documentation/filesystems/devfs/>, especially
+ the file README there.
+
+ If unsure, say N.
+
+config DEVFS_MOUNT
+ bool "Automatically mount at boot"
+ depends on DEVFS_FS
+ help
+ This option appears if you have CONFIG_DEVFS_FS enabled. Setting
+ this to 'Y' will make the kernel automatically mount devfs onto /dev
+ when the system is booted, before the init thread is started.
+ You can override this with the "devfs=nomount" boot option.
+
+ If unsure, say N.
+
+config DEVFS_DEBUG
+ bool "Debug devfs"
+ depends on DEVFS_FS
+ help
+ If you say Y here, then the /dev file system code will generate
+ debugging messages. See the file
+ <file:Documentation/filesystems/devfs/boot-options> for more
+ details.
+
+ If unsure, say N.
+
+config DEVPTS_FS
+# It compiles as a module for testing only. It should not be used
+# as a module in general. If we make this "tristate", a bunch of people
+# who don't know what they are doing turn it on and complain when it
+# breaks.
+ bool "/dev/pts file system for Unix98 PTYs"
+ depends on UNIX98_PTYS
---help---
- This option provides support for normal Windows file systems with
- long filenames. That includes non-compressed FAT-based file systems
- used by Windows 95, Windows 98, Windows NT 4.0, and the Unix
- programs from the mtools package.
+ You should say Y here if you said Y to "Unix98 PTY support" above.
+ You'll then get a virtual file system which can be mounted on
+ /dev/pts with "mount -t devpts". This, together with the pseudo
+ terminal master multiplexer /dev/ptmx, is used for pseudo terminal
+ support as described in The Open Group's Unix98 standard: in order
+ to acquire a pseudo terminal, a process opens /dev/ptmx; the number
+ of the pseudo terminal is then made available to the process and the
+ pseudo terminal slave can be accessed as /dev/pts/<number>. What was
+ traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
- You cannot use the VFAT file system for your Linux root partition
- (the one containing the directory /); use UMSDOS instead if you
- want to run Linux from within a DOS partition (i.e. say Y to
- "Unix like fs on top of std MSDOS fs", below).
+ The GNU C library glibc 2.1 contains the requisite support for this
+ mode of operation; you also need client programs that use the Unix98
+ API. Please read <file:Documentation/Changes> for more information
+ about the Unix98 pty devices.
- The VFAT support enlarges your kernel by about 10 KB and it only
- works if you said Y to the "DOS FAT fs support" above. Please read
- the file <file:Documentation/filesystems/vfat.txt> for details. If
- unsure, say Y.
+ Note that the experimental "/dev file system support"
+ (CONFIG_DEVFS_FS) is a more general facility.
+
+config TMPFS
+ bool "Virtual memory file system support (former shm fs)"
+ help
+ Tmpfs is a file system which keeps all files in virtual memory.
+
+ Everything in tmpfs is temporary in the sense that no files will be
+ created on your hard drive. The files live in memory and swap
+ space. If you unmount a tmpfs instance, everything stored therein is
+ lost.
+
+ See <file:Documentation/filesystems/tmpfs.txt> for details.
+
+config HUGETLBFS
+ bool "HugeTLB file system support"
+ depends on HUGETLB_PAGE
+
+config RAMFS
+ bool
+ default y
+ ---help---
+ Ramfs is a file system which keeps all files in RAM. It allows
+ read and write access.
+
+ It is more of an programming example than a useable file system. If
+ you need a file system which lives in RAM with limit checking use
+ tmpfs.
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. The module
- will be called vfat.
+ will be called ramfs.
+
+endmenu
+
+menu "Miscellaneous filesystems"
+
+config ADFS_FS
+ tristate "ADFS file system support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ The Acorn Disc Filing System is the standard file system of the
+ RiscOS operating system which runs on Acorn's ARM-based Risc PC
+ systems and the Acorn Archimedes range of machines. If you say Y
+ here, Linux will be able to read from ADFS partitions on hard drives
+ and from ADFS-formatted floppy discs. If you also want to be able to
+ write to those devices, say Y to "ADFS write support" below.
+
+ The ADFS partition should be the first partition (i.e.,
+ /dev/[hs]d?1) on each of your drives. Please read the file
+ <file:Documentation/filesystems/adfs.txt> for further details.
+
+ This code is also available as a module called adfs ( = code which
+ can be inserted in and removed from the running kernel whenever you
+ want). If you want to compile it as a module, say M here and read
+ <file:Documentation/modules.txt>.
+
+ If unsure, say N.
+
+config ADFS_FS_RW
+ bool "ADFS write support (DANGEROUS)"
+ depends on ADFS_FS
+ help
+ If you say Y here, you will be able to write to ADFS partitions on
+ hard drives and ADFS-formatted floppy disks. This is experimental
+ codes, so if you're unsure, say N.
+
+config AFFS_FS
+ tristate "Amiga FFS file system support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ The Fast File System (FFS) is the common file system used on hard
+ disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20). Say Y
+ if you want to be able to read and write files from and to an Amiga
+ FFS partition on your hard drive. Amiga floppies however cannot be
+ read with this driver due to an incompatibility of the floppy
+ controller used in an Amiga and the standard floppy controller in
+ PCs and workstations. Read <file:Documentation/filesystems/affs.txt>
+ and <file:fs/affs/Changes>.
+
+ With this driver you can also mount disk files used by Bernd
+ Schmidt's Un*X Amiga Emulator
+ (<http://www.freiburg.linux.de/~uae/>).
+ If you want to do this, you will also need to say Y or M to "Loop
+ device support", above.
+
+ This file system is also available as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want).
+ The module is called affs. If you want to compile it as a module,
+ say M here and read <file:Documentation/modules.txt>. If unsure,
+ say N.
+
+config HFS_FS
+ tristate "Apple Macintosh file system support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ If you say Y here, you will be able to mount Macintosh-formatted
+ floppy disks and hard drive partitions with full read-write access.
+ Please read <file:fs/hfs/HFS.txt> to learn about the available mount
+ options.
+
+ This file system support is also available as a module ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want). The module is called hfs. If you want to
+ compile it as a module, say M here and read
+ <file:Documentation/modules.txt>.
+
+config BEFS_FS
+ tristate "BeOS file systemv(BeFS) support (read only) (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ The BeOS File System (BeFS) is the native file system of Be, Inc's
+ BeOS. Notable features include support for arbitrary attributes
+ on files and directories, and database-like indices on selected
+ attributes. (Also note that this driver doesn't make those features
+ available at this time). It is a 64 bit filesystem, so it supports
+ extreemly large volumes and files.
+
+ If you use this filesystem, you should also say Y to at least one
+ of the NLS (native language support) options below.
+
+ If you don't know what this is about, say N.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read Documentation/modules.txt. The module will be
+ called befs.
+
+config BEFS_DEBUG
+ bool "Debug BeFS"
+ depends on BEFS_FS
+ help
+ If you say Y here, you can use the 'debug' mount option to enable
+ debugging output from the driver.
+
+config BFS_FS
+ tristate "BFS file system support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ help
+ Boot File System (BFS) is a file system used under SCO UnixWare to
+ allow the bootloader access to the kernel image and other important
+ files during the boot process. It is usually mounted under /stand
+ and corresponds to the slice marked as "STAND" in the UnixWare
+ partition. You should say Y if you want to read or write the files
+ on your /stand slice from within Linux. You then also need to say Y
+ to "UnixWare slices support", below. More information about the BFS
+ file system is contained in the file
+ <file:Documentation/filesystems/bfs.txt>.
+
+ If you don't know what this is about, say N.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read <file:Documentation/modules.txt>. The module
+ will be called bfs. Note that the file system of your root
+ partition (the one containing the directory /) cannot be compiled as
+ a module.
+
+
config EFS_FS
tristate "EFS file system support (read only) (EXPERIMENTAL)"
depends on EXPERIMENTAL
- ---help---
+ help
EFS is an older file system used for non-ISO9660 CD-ROMs and hard
disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer
uses the XFS file system for hard disk partitions however).
@@ -538,7 +1018,7 @@ config JFFS2_FS_DEBUG
int "JFFS2 debugging verbosity (0 = quiet, 2 = noisy)"
depends on JFFS2_FS
default "0"
- ---help---
+ help
This controls the amount of debugging messages produced by the JFFS2
code. Set it to zero for use in production systems. For evaluation,
testing and debugging, it's advisable to set it to one. This will
@@ -555,7 +1035,7 @@ config JFFS2_FS_NAND
bool "JFFS2 support for NAND flash (EXPERIMENTAL)"
depends on JFFS2_FS && EXPERIMENTAL
default n
- ---help---
+ help
This enables the experimental support for NAND flash in JFFS2. NAND
is a newer type of flash chip design than the traditional NOR flash,
with higher density but a handful of characteristics which make it
@@ -570,7 +1050,7 @@ config JFFS2_FS_NAND
config CRAMFS
tristate "Compressed ROM file system support"
- ---help---
+ help
Saying Y here includes support for CramFs (Compressed ROM File
System). CramFs is designed to be a simple, small, and compressed
file system for ROM based embedded systems. CramFs is read-only,
@@ -588,136 +1068,9 @@ config CRAMFS
If unsure, say N.
-config TMPFS
- bool "Virtual memory file system support (former shm fs)"
- help
- Tmpfs is a file system which keeps all files in virtual memory.
-
- Everything in tmpfs is temporary in the sense that no files will be
- created on your hard drive. The files live in memory and swap
- space. If you unmount a tmpfs instance, everything stored therein is
- lost.
-
- See <file:Documentation/filesystems/tmpfs.txt> for details.
-
-config RAMFS
- bool
- default y
- ---help---
- Ramfs is a file system which keeps all files in RAM. It allows
- read and write access.
-
- It is more of an programming example than a useable file system. If
- you need a file system which lives in RAM with limit checking use
- tmpfs.
-
- If you want to compile this as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read <file:Documentation/modules.txt>. The module
- will be called ramfs.
-
-config HUGETLBFS
- bool "HugeTLB file system support"
- depends on HUGETLB_PAGE
-
-config ISO9660_FS
- tristate "ISO 9660 CDROM file system support"
- ---help---
- This is the standard file system used on CD-ROMs. It was previously
- known as "High Sierra File System" and is called "hsfs" on other
- Unix systems. The so-called Rock-Ridge extensions which allow for
- long Unix filenames and symbolic links are also supported by this
- driver. If you have a CD-ROM drive and want to do more with it than
- just listen to audio CDs and watch its LEDs, say Y (and read
- <file:Documentation/filesystems/isofs.txt> and the CD-ROM-HOWTO,
- available from <http://www.linuxdoc.org/docs.html#howto>), thereby
- enlarging your kernel by about 27 KB; otherwise say N.
-
- If you want to compile this as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read <file:Documentation/modules.txt>. The module
- will be called isofs.
-
-config JOLIET
- bool "Microsoft Joliet CDROM extensions"
- depends on ISO9660_FS
- help
- Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
- which allows for long filenames in unicode format (unicode is the
- new 16 bit character code, successor to ASCII, which encodes the
- characters of almost all languages of the world; see
- <http://www.unicode.org/> for more information). Say Y here if you
- want to be able to read Joliet CD-ROMs under Linux.
-
-config ZISOFS
- bool "Transparent decompression extension"
- depends on ISO9660_FS
- help
- This is a Linux-specific extension to RockRidge which lets you store
- data in compressed form on a CD-ROM and have it transparently
- decompressed when the CD-ROM is accessed. See
- <http://www.kernel.org/pub/linux/utils/fs/zisofs/> for the tools
- necessary to create such a filesystem. Say Y here if you want to be
- able to read such compressed CD-ROMs.
-
-config JFS_FS
- tristate "JFS filesystem support"
- help
- This is a port of IBM's Journaled Filesystem . More information is
- available in the file Documentation/filesystems/jfs.txt.
-
- If you do not intend to use the JFS filesystem, say N.
-
-config JFS_POSIX_ACL
- bool "JFS POSIX Access Control Lists"
- depends on JFS_FS
- ---help---
- 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 <http://acl.bestbits.at/>.
-
- If you don't know what Access Control Lists are, say N
-
-config JFS_DEBUG
- bool "JFS debugging"
- depends on JFS_FS
- help
- If you are experiencing any problems with the JFS filesystem, say
- Y here. This will result in additional debugging messages to be
- written to the system log. Under normal circumstances, this
- results in very little overhead.
-
-config JFS_STATISTICS
- bool "JFS statistics"
- depends on JFS_FS
- help
- Enabling this option will cause statistics from the JFS file system
- to be made available to the user in the /proc/fs/jfs/ directory.
-
-config MINIX_FS
- tristate "Minix fs support"
- ---help---
- Minix is a simple operating system used in many classes about OS's.
- The minix file system (method to organize files on a hard disk
- partition or a floppy disk) was the original file system for Linux,
- but has been superseded by the second extended file system ext2fs.
- You don't want to use the minix file system on your hard disk
- because of certain built-in restrictions, but it is sometimes found
- on older Linux floppy disks. This option will enlarge your kernel
- by about 28 KB. If unsure, say N.
-
- If you want to compile this as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want),
- say M here and read <file:Documentation/modules.txt>. The module
- will be called minix. Note that the file system of your root
- partition (the one containing the directory /) cannot be compiled as
- a module.
-
config VXFS_FS
tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
- ---help---
+ help
FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
file system format. VERITAS VxFS(TM) is the standard file system
of SCO UnixWare (and possibly others) and optionally available
@@ -734,58 +1087,10 @@ config VXFS_FS
module, say M here and read <file:Documentation/modules.txt>. If
unsure, say N.
-config NTFS_FS
- tristate "NTFS file system support (read only)"
- ---help---
- NTFS is the file system of Microsoft Windows NT/2000/XP. For more
- information see <file:Documentation/filesystems/ntfs.txt>. Saying Y
- here would allow you to read from NTFS partitions.
-
- This file system is also available as a module ( = code which can be
- inserted in and removed from the running kernel whenever you want).
- The module will be called ntfs. If you want to compile it as a
- module, say M here and read <file:Documentation/modules.txt>.
-
- If you are not using Windows NT/2000/XP in addition to Linux on your
- computer it is safe to say N.
-
-config NTFS_DEBUG
- bool "NTFS debugging support"
- depends on NTFS_FS
- ---help---
- If you are experiencing any problems with the NTFS file system, say
- Y here. This will result in additional consistency checks to be
- performed by the driver as well as additional debugging messages to
- be written to the system log. Note that debugging messages are
- disabled by default. To enable them, supply the option debug_msgs=1
- at the kernel command line when booting the kernel or as an option
- to insmod when loading the ntfs module. Once the driver is active,
- you can enable debugging messages by doing (as root):
- echo 1 > /proc/sys/fs/ntfs-debug
- Replacing the "1" with "0" would disable debug messages.
-
- If you leave debugging messages disabled, this results in little
- overhead, but enabling debug messages results in very significant
- slowdown of the system.
-
- When reporting bugs, please try to have available a full dump of
- debugging messages while the misbehaviour was occurring.
-
-config NTFS_RW
- bool "NTFS write support (DANGEROUS)"
- depends on NTFS_FS && EXPERIMENTAL
- help
- This enables the experimental write support in the NTFS driver.
-
- WARNING: Do not use this option unless you are actively developing
- NTFS as it is currently guaranteed to be broken and you
- may lose all your data!
-
- It is strongly recommended and perfectly safe to say N here.
config HPFS_FS
tristate "OS/2 HPFS file system support"
- ---help---
+ help
OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS
is the file system used for organizing files on OS/2 hard disk
partitions. Say Y if you want to be able to read files from and
@@ -800,104 +1105,11 @@ config HPFS_FS
say M here and read <file:Documentation/modules.txt>. If unsure,
say N.
-config PROC_FS
- bool "/proc file system support"
- ---help---
- This is a virtual file system providing information about the status
- of the system. "Virtual" means that it doesn't take up any space on
- your hard disk: the files are created on the fly by the kernel when
- you try to access them. Also, you cannot read the files with older
- version of the program less: you need to use more or cat.
-
- It's totally cool; for example, "cat /proc/interrupts" gives
- information about what the different IRQs are used for at the moment
- (there is a small number of Interrupt ReQuest lines in your computer
- that are used by the attached devices to gain the CPU's attention --
- often a source of trouble if two devices are mistakenly configured
- to use the same IRQ). The program procinfo to display some
- information about your system gathered from the /proc file system.
-
- Before you can use the /proc file system, it has to be mounted,
- meaning it has to be given a location in the directory hierarchy.
- That location should be /proc. A command such as "mount -t proc proc
- /proc" or the equivalent line in /etc/fstab does the job.
-
- The /proc file system is explained in the file
- <file:Documentation/filesystems/proc.txt> and on the proc(5) manpage
- ("man 5 proc").
-
- This option will enlarge your kernel by about 67 KB. Several
- programs depend on this, so everyone should say Y here.
-
-config DEVFS_FS
- bool "/dev file system support (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- ---help---
- This is support for devfs, a virtual file system (like /proc) which
- provides the file system interface to device drivers, normally found
- in /dev. Devfs does not depend on major and minor number
- allocations. Device drivers register entries in /dev which then
- appear automatically, which means that the system administrator does
- not have to create character and block special device files in the
- /dev directory using the mknod command (or MAKEDEV script) anymore.
-
- This is work in progress. If you want to use this, you *must* read
- the material in <file:Documentation/filesystems/devfs/>, especially
- the file README there.
-
- If unsure, say N.
-
-config DEVFS_MOUNT
- bool "Automatically mount at boot"
- depends on DEVFS_FS
- help
- This option appears if you have CONFIG_DEVFS_FS enabled. Setting
- this to 'Y' will make the kernel automatically mount devfs onto /dev
- when the system is booted, before the init thread is started.
- You can override this with the "devfs=nomount" boot option.
-
- If unsure, say N.
-
-config DEVFS_DEBUG
- bool "Debug devfs"
- depends on DEVFS_FS
- help
- If you say Y here, then the /dev file system code will generate
- debugging messages. See the file
- <file:Documentation/filesystems/devfs/boot-options> for more
- details.
-
- If unsure, say N.
-
-# It compiles as a module for testing only. It should not be used
-# as a module in general. If we make this "tristate", a bunch of people
-# who don't know what they are doing turn it on and complain when it
-# breaks.
-config DEVPTS_FS
- bool "/dev/pts file system for Unix98 PTYs"
- depends on UNIX98_PTYS
- ---help---
- You should say Y here if you said Y to "Unix98 PTY support" above.
- You'll then get a virtual file system which can be mounted on
- /dev/pts with "mount -t devpts". This, together with the pseudo
- terminal master multiplexer /dev/ptmx, is used for pseudo terminal
- support as described in The Open Group's Unix98 standard: in order
- to acquire a pseudo terminal, a process opens /dev/ptmx; the number
- of the pseudo terminal is then made available to the process and the
- pseudo terminal slave can be accessed as /dev/pts/<number>. What was
- traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
- The GNU C library glibc 2.1 contains the requisite support for this
- mode of operation; you also need client programs that use the Unix98
- API. Please read <file:Documentation/Changes> for more information
- about the Unix98 pty devices.
- Note that the experimental "/dev file system support"
- (CONFIG_DEVFS_FS) is a more general facility.
config QNX4FS_FS
tristate "QNX4 file system support (read only)"
- ---help---
+ help
This is the file system used by the real-time operating systems
QNX 4 and QNX 6 (the latter is also called QNX RTP).
Further information is available at <http://www.qnx.com/>.
@@ -923,97 +1135,11 @@ config QNX4FS_RW
It's currently broken, so for now:
answer N.
-config ROMFS_FS
- tristate "ROM file system support"
- ---help---
- This is a very small read-only file system mainly intended for
- initial ram disks of installation disks, but it could be used for
- other read-only media as well. Read
- <file:Documentation/filesystems/romfs.txt> for details.
- This file system support is also available as a module ( = code
- which can be inserted in and removed from the running kernel
- whenever you want). The module is called romfs. If you want to
- compile it as a module, say M here and read
- <file:Documentation/modules.txt>. Note that the file system of your
- root partition (the one containing the directory /) cannot be a
- module.
-
- If you don't know whether you need it, then you don't need it:
- answer N.
-
-config EXT2_FS
- tristate "Second extended fs support"
- ---help---
- This is the de facto standard Linux file system (method to organize
- files on a storage device) for hard disks.
-
- You want to say Y here, unless you intend to use Linux exclusively
- from inside a DOS partition using the UMSDOS file system. The
- advantage of the latter is that you can get away without
- repartitioning your hard drive (which often implies backing
- everything up and restoring afterwards); the disadvantage is that
- Linux becomes susceptible to DOS viruses and that UMSDOS is somewhat
- slower than ext2fs. Even if you want to run Linux in this fashion,
- it might be a good idea to have ext2fs around: it enables you to
- read more floppy disks and facilitates the transition to a *real*
- Linux partition later. Another (rare) case which doesn't require
- ext2fs is a diskless Linux box which mounts all files over the
- network using NFS (in this case it's sufficient to say Y to "NFS
- file system support" below). Saying Y here will enlarge your kernel
- by about 44 KB.
-
- The Ext2fs-Undeletion mini-HOWTO, available from
- <http://www.linuxdoc.org/docs.html#howto>, gives information about
- how to retrieve deleted files on ext2fs file systems.
-
- To change the behavior of ext2 file systems, you can use the tune2fs
- utility ("man tune2fs"). To modify attributes of files and
- directories on ext2 file systems, use chattr ("man chattr").
-
- Ext2fs partitions can be read from within DOS using the ext2tool
- command line tool package (available from
- <ftp://ibiblio.org/pub/Linux/system/filesystems/ext2/>) and from
- within Windows NT using the ext2nt command line tool package from
- <ftp://ibiblio.org/pub/Linux/utils/dos/>. Explore2fs is a
- graphical explorer for ext2fs partitions which runs on Windows 95
- and Windows NT and includes experimental write support; it is
- available from
- <http://jnewbigin-pc.it.swin.edu.au/Linux/Explore2fs.htm>.
-
- 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 <file:Documentation/modules.txt>. The
- module will be called ext2. Be aware however that the file system
- of your root partition (the one containing the directory /) cannot
- be compiled as a module, and so this could be dangerous. Most
- everyone wants to say Y here.
-
-config EXT2_FS_XATTR
- bool "Ext2 extended attributes"
- depends on EXT2_FS
- ---help---
- Extended attributes are name:value pairs associated with inodes by
- the kernel or by users (see the attr(5) manual page, or visit
- <http://acl.bestbits.at/> for details).
-
- If unsure, say N.
-
-config EXT2_FS_POSIX_ACL
- bool "Ext2 POSIX Access Control Lists"
- depends on EXT2_FS_XATTR
- ---help---
- 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 <http://acl.bestbits.at/>.
-
- If you don't know what Access Control Lists are, say N
config SYSV_FS
tristate "System V/Xenix/V7/Coherent file system support"
- ---help---
+ help
SCO, Xenix and Coherent are commercial Unix systems for Intel
machines, and Version 7 was used on the DEC PDP-11. Saying Y
here would allow you to read from their floppies and hard disk
@@ -1049,25 +1175,11 @@ config SYSV_FS
If you haven't heard about all of this before, it's safe to say N.
-config UDF_FS
- tristate "UDF file system support"
- ---help---
- This is the new file system used on some CD-ROMs and DVDs. Say Y if
- you intend to mount DVD discs or CDRW's written in packet mode, or
- if written to by other UDF utilities, such as DirectCD.
- Please read <file:Documentation/filesystems/udf.txt>.
- This file system support is also available as a module ( = code
- which can be inserted in and removed from the running kernel
- whenever you want). The module is called udf. If you want to
- compile it as a module, say M here and read
- <file:Documentation/modules.txt>.
-
- If unsure, say N.
config UFS_FS
tristate "UFS file system support (read only)"
- ---help---
+ help
BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
OpenBSD and NeXTstep) use a file system called UFS. Some System V
Unixes can create and mount hard disk partitions and diskettes using
@@ -1103,118 +1215,15 @@ config UFS_FS_WRITE
Say Y here if you want to try writing to UFS partitions. This is
experimental, so you should back up your UFS partitions beforehand.
-config XFS_FS
- tristate "XFS filesystem support"
- ---help---
- 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 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 <file:Documentation/modules.txt>. The
- module will be called xfs. 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.
-
-config XFS_RT
- bool "Realtime support (EXPERIMENTAL)"
- depends on XFS_FS && EXPERIMENTAL
- ---help---
- 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.
-
-config XFS_QUOTA
- bool "Quota support"
- depends on XFS_FS
- ---help---
- If you say Y here, you will be able to set limits for disk usage on
- a per user and/or a 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.
-
-config XFS_POSIX_ACL
- bool "ACL support"
- depends on XFS_FS
- ---help---
- 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 <http://acl.bestbits.at/>.
-
- If you don't know what Access Control Lists are, say N
-
+endmenu
menu "Network File Systems"
depends on NET
-config CODA_FS
- tristate "Coda file system support (advanced network fs)"
- depends on INET
- ---help---
- Coda is an advanced network file system, similar to NFS in that it
- enables you to mount file systems of a remote server and access them
- with regular Unix commands as if they were sitting on your hard
- disk. Coda has several advantages over NFS: support for
- disconnected operation (e.g. for laptops), read/write server
- replication, security model for authentication and encryption,
- persistent client caches and write back caching.
-
- If you say Y here, your Linux box will be able to act as a Coda
- *client*. You will need user level code as well, both for the
- client and server. Servers are currently user level, i.e. they need
- no kernel support. Please read
- <file:Documentation/filesystems/coda.txt> and check out the Coda
- home page <http://www.coda.cs.cmu.edu/>.
-
- If you want to compile the coda client support as a module ( = code
- which can be inserted in and removed from the running kernel
- whenever you want), say M here and read
- <file:Documentation/modules.txt>. The module will be called coda.
-
-config INTERMEZZO_FS
- tristate "InterMezzo file system support (replicating fs) (EXPERIMENTAL)"
- depends on INET && EXPERIMENTAL
- help
- InterMezzo is a networked file system with disconnected operation
- and kernel level write back caching. It is most often used for
- replicating potentially large trees or keeping laptop/desktop copies
- in sync.
-
- If you say Y or M your kernel or module will provide InterMezzo
- support. You will also need a file server daemon, which you can get
- from <http://www.inter-mezzo.org/>.
-
config NFS_FS
tristate "NFS file system support"
depends on INET
- ---help---
+ help
If you are connected to some other (usually local) Unix computer
(using SLIP, PLIP, PPP or Ethernet) and want to mount files residing
on that computer (the NFS server) using the Network File Sharing
@@ -1268,24 +1277,10 @@ config NFS_V4
If unsure, say N.
-config ROOT_NFS
- bool "Root file system on NFS"
- depends on NFS_FS=y && IP_PNP
- help
- If you want your Linux box to mount its whole root file system (the
- one containing the directory /) from some other computer over the
- net via NFS (presumably because your box doesn't have a hard disk),
- say Y. Read <file:Documentation/nfsroot.txt> for details. It is
- likely that in this case, you also want to say Y to "Kernel level IP
- autoconfiguration" so that your box can discover its network address
- at boot time.
-
- Most people say N here.
-
config NFSD
tristate "NFS server support"
depends on INET
- ---help---
+ help
If you want your Linux box to act as an NFS *server*, so that other
computers on your local network which support NFS can access certain
directories on your box transparently, you have two options: you can
@@ -1334,34 +1329,19 @@ config NFSD_TCP
Enable NFS service over TCP connections. This the officially
still experimental, but seems to work well.
-config SUNRPC
- tristate
- default m if NFS_FS!=y && NFSD!=y && (NFS_FS=m || NFSD=m)
- default y if NFS_FS=y || NFSD=y
-
-config SUNRPC_GSS
- tristate "Provide RPCSEC_GSS authentication (EXPERIMENTAL)"
- depends on SUNRPC && EXPERIMENTAL
- default SUNRPC if NFS_V4=y
- help
- Provides cryptographic authentication for NFS rpc requests. To
- make this useful, you must also select at least one rpcsec_gss
- mechanism.
- Note: You should always select this option if you wish to use
- NFSv4.
-
-config RPCSEC_GSS_KRB5
- tristate "Kerberos V mechanism for RPCSEC_GSS (EXPERIMENTAL)"
- depends on SUNRPC_GSS && CRYPTO_DES && CRYPTO_MD5
- default SUNRPC_GSS if NFS_V4=y
+config ROOT_NFS
+ bool "Root file system on NFS"
+ depends on NFS_FS=y && IP_PNP
help
- Provides a gss-api mechanism based on Kerberos V5 (this is
- mandatory for RFC3010-compliant NFSv4 implementations).
- Requires a userspace daemon;
- see http://www.citi.umich.edu/projects/nfsv4/.
+ If you want your Linux box to mount its whole root file system (the
+ one containing the directory /) from some other computer over the
+ net via NFS (presumably because your box doesn't have a hard disk),
+ say Y. Read <file:Documentation/nfsroot.txt> for details. It is
+ likely that in this case, you also want to say Y to "Kernel level IP
+ autoconfiguration" so that your box can discover its network address
+ at boot time.
- Note: If you select this option, please ensure that you also
- enable the MD5 and DES crypto ciphers.
+ Most people say N here.
config LOCKD
tristate
@@ -1377,32 +1357,10 @@ config EXPORTFS
tristate
default NFSD
-config CIFS
- tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)"
- depends on INET
- ---help---
- This is the client VFS module for the Common Internet File System
- (CIFS) protocol which is the successor to the Server Message Block
- (SMB) protocol, the native file sharing mechanism for most early
- PC operating systems. CIFS is fully supported by current network
- file servers such as Windows 2000 (including Windows NT version 4
- and Windows XP) as well by Samba (which provides excellent CIFS
- server support for Linux and many other operating systems). For
- production systems the smbfs module may be used instead of this
- cifs module since smbfs is currently more stable and provides
- support for older servers. The intent of this module is to provide the
- most advanced network file system function for CIFS compliant servers,
- including support for dfs (heirarchical name space), secure per-user
- session establishment, safe distributed caching (oplock), optional
- packet signing, Unicode and other internationalization improvements, and
- optional Winbind (nsswitch) integration. This module is in an early
- development stage, so unless you are specifically interested in this
- filesystem, just say N.
-
config SMB_FS
tristate "SMB file system support (to mount Windows shares etc.)"
depends on INET
- ---help---
+ help
SMB (Server Message Block) is the protocol Windows for Workgroups
(WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share
files and printers over local networks. Saying Y here allows you to
@@ -1456,10 +1414,32 @@ config SMB_NLS_REMOTE
smbmount from samba 2.2.0 or later supports this.
+config CIFS
+ tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)"
+ depends on INET
+ help
+ This is the client VFS module for the Common Internet File System
+ (CIFS) protocol which is the successor to the Server Message Block
+ (SMB) protocol, the native file sharing mechanism for most early
+ PC operating systems. CIFS is fully supported by current network
+ file servers such as Windows 2000 (including Windows NT version 4
+ and Windows XP) as well by Samba (which provides excellent CIFS
+ server support for Linux and many other operating systems). For
+ production systems the smbfs module may be used instead of this
+ cifs module since smbfs is currently more stable and provides
+ support for older servers. The intent of this module is to provide the
+ most advanced network file system function for CIFS compliant servers,
+ including support for dfs (heirarchical name space), secure per-user
+ session establishment, safe distributed caching (oplock), optional
+ packet signing, Unicode and other internationalization improvements, and
+ optional Winbind (nsswitch) integration. This module is in an early
+ development stage, so unless you are specifically interested in this
+ filesystem, just say N.
+
config NCP_FS
tristate "NCP file system support (to mount NetWare volumes)"
depends on IPX!=n || INET
- ---help---
+ help
NCP (NetWare Core Protocol) is a protocol that runs over IPX and is
used by Novell NetWare clients to talk to file servers. It is to
IPX what NFS is to TCP/IP, if that helps. Saying Y here allows you
@@ -1480,10 +1460,76 @@ config NCP_FS
will be called ncpfs. Say N unless you are connected to a Novell
network.
+config CODA_FS
+ tristate "Coda file system support (advanced network fs)"
+ depends on INET
+ help
+ Coda is an advanced network file system, similar to NFS in that it
+ enables you to mount file systems of a remote server and access them
+ with regular Unix commands as if they were sitting on your hard
+ disk. Coda has several advantages over NFS: support for
+ disconnected operation (e.g. for laptops), read/write server
+ replication, security model for authentication and encryption,
+ persistent client caches and write back caching.
+
+ If you say Y here, your Linux box will be able to act as a Coda
+ *client*. You will need user level code as well, both for the
+ client and server. Servers are currently user level, i.e. they need
+ no kernel support. Please read
+ <file:Documentation/filesystems/coda.txt> and check out the Coda
+ home page <http://www.coda.cs.cmu.edu/>.
+
+ If you want to compile the coda client support as a module ( = code
+ which can be inserted in and removed from the running kernel
+ whenever you want), say M here and read
+ <file:Documentation/modules.txt>. The module will be called coda.
+
+config INTERMEZZO_FS
+ tristate "InterMezzo file system support (replicating fs) (EXPERIMENTAL)"
+ depends on INET && EXPERIMENTAL
+ help
+ InterMezzo is a networked file system with disconnected operation
+ and kernel level write back caching. It is most often used for
+ replicating potentially large trees or keeping laptop/desktop copies
+ in sync.
+
+ If you say Y or M your kernel or module will provide InterMezzo
+ support. You will also need a file server daemon, which you can get
+ from <http://www.inter-mezzo.org/>.
+
+config SUNRPC
+ tristate
+ default m if NFS_FS!=y && NFSD!=y && (NFS_FS=m || NFSD=m)
+ default y if NFS_FS=y || NFSD=y
+
+config SUNRPC_GSS
+ tristate "Provide RPCSEC_GSS authentication (EXPERIMENTAL)"
+ depends on SUNRPC && EXPERIMENTAL
+ default SUNRPC if NFS_V4=y
+ help
+ Provides cryptographic authentication for NFS rpc requests. To
+ make this useful, you must also select at least one rpcsec_gss
+ mechanism.
+ Note: You should always select this option if you wish to use
+ NFSv4.
+
+config RPCSEC_GSS_KRB5
+ tristate "Kerberos V mechanism for RPCSEC_GSS (EXPERIMENTAL)"
+ depends on SUNRPC_GSS && CRYPTO_DES && CRYPTO_MD5
+ default SUNRPC_GSS if NFS_V4=y
+ help
+ Provides a gss-api mechanism based on Kerberos V5 (this is
+ mandatory for RFC3010-compliant NFSv4 implementations).
+ Requires a userspace daemon;
+ see http://www.citi.umich.edu/projects/nfsv4/.
+
+ Note: If you select this option, please ensure that you also
+ enable the MD5 and DES crypto ciphers.
+
source "fs/ncpfs/Kconfig"
-# for fs/nls/Config.in
config AFS_FS
+# for fs/nls/Config.in
tristate "Andrew File System support (AFS) (Experimental)"
depends on INET && EXPERIMENTAL
help
@@ -1501,29 +1547,6 @@ config RXRPC
endmenu
-# for fs/nls/Config.in
-config ZISOFS_FS
- tristate
- depends on ZISOFS
- default ISO9660_FS
-
-# Meta block cache for Extended Attributes (ext2/ext3)
-config FS_MBCACHE
- tristate
- depends on EXT2_FS_XATTR || EXT3_FS_XATTR
- default y if EXT2_FS=y || EXT3_FS=y
- default m if EXT2_FS=m || EXT3_FS=m
-
-# Posix ACL utility routines (for now, only ext2/ext3/jfs)
-#
-# NOTE: you can implement Posix ACLs without these helpers (XFS does).
-# Never use this symbol for ifdefs.
-#
-config FS_POSIX_ACL
- bool
- depends on EXT2_FS_POSIX_ACL || EXT3_FS_POSIX_ACL || JFS_POSIX_ACL
- default y
-
menu "Partition Types"
source "fs/partitions/Kconfig"
diff --git a/fs/affs/Changes b/fs/affs/Changes
index ee6308003167..a29409c1ffe0 100644
--- a/fs/affs/Changes
+++ b/fs/affs/Changes
@@ -28,6 +28,11 @@ Known bugs:
Please direct bug reports to: zippel@linux-m68k.org
+Version 3.20
+------------
+- kill kernel lock
+- fix for a possible bitmap corruption
+
Version 3.19
------------
diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c
index d1792538c26a..095ef77a407e 100644
--- a/fs/affs/bitmap.c
+++ b/fs/affs/bitmap.c
@@ -185,6 +185,8 @@ find_bmap:
/* search for the next bmap buffer with free bits */
i = sbi->s_bmap_count;
do {
+ if (--i < 0)
+ goto err_full;
bmap++;
bm++;
if (bmap < sbi->s_bmap_count)
@@ -192,8 +194,6 @@ find_bmap:
/* restart search at zero */
bmap = 0;
bm = sbi->s_bitmap;
- if (--i <= 0)
- goto err_full;
} while (!bm->bm_free);
blk = bmap * sbi->s_bmap_bits;
@@ -216,8 +216,8 @@ find_bmap_bit:
mask = ~0UL << (bit & 31);
blk &= ~31UL;
- tmp = be32_to_cpu(*data) & mask;
- if (tmp)
+ tmp = be32_to_cpu(*data);
+ if (tmp & mask)
goto find_bit;
/* scan the rest of the buffer */
@@ -230,10 +230,11 @@ find_bmap_bit:
goto find_bmap;
} while (!(tmp = *data));
tmp = be32_to_cpu(tmp);
+ mask = ~0;
find_bit:
/* finally look for a free bit in the word */
- bit = ffs(tmp) - 1;
+ bit = ffs(tmp & mask) - 1;
blk += bit + sbi->s_reserved;
mask2 = mask = 1 << (bit & 31);
AFFS_I(inode)->i_lastalloc = blk;
@@ -266,8 +267,8 @@ err_bh_read:
sbi->s_bmap_bh = NULL;
sbi->s_last_bmap = ~0;
err_full:
- pr_debug("failed\n");
up(&sbi->s_bmlock);
+ pr_debug("failed\n");
return 0;
}
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index f7fa4f8ddb71..3fc41d17359d 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -65,8 +65,6 @@ affs_readdir(struct file *filp, void *dirent, filldir_t filldir)
int stored;
int res;
- lock_kernel();
-
pr_debug("AFFS: readdir(ino=%lu,f_pos=%lx)\n",inode->i_ino,(unsigned long)filp->f_pos);
stored = 0;
@@ -162,7 +160,6 @@ readdir_out:
affs_brelse(dir_bh);
affs_brelse(fh_bh);
affs_unlock_dir(inode);
- unlock_kernel();
pr_debug("AFFS: readdir()=%d\n", stored);
return res;
}
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index f109be30c624..37aca8f801fd 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -195,11 +195,9 @@ affs_write_inode(struct inode *inode, int unused)
if (!inode->i_nlink)
// possibly free block
return;
- lock_kernel();
bh = affs_bread(sb, inode->i_ino);
if (!bh) {
affs_error(sb,"write_inode","Cannot read block %lu",inode->i_ino);
- unlock_kernel();
return;
}
tail = AFFS_TAIL(sb, bh);
@@ -227,7 +225,7 @@ affs_write_inode(struct inode *inode, int unused)
affs_fix_checksum(sb, bh);
mark_buffer_dirty_inode(bh, inode);
affs_brelse(bh);
- unlock_kernel();
+ affs_free_prealloc(inode);
}
int
@@ -236,8 +234,6 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr)
struct inode *inode = dentry->d_inode;
int error;
- lock_kernel();
-
pr_debug("AFFS: notify_change(%lu,0x%x)\n",inode->i_ino,attr->ia_valid);
error = inode_change_ok(inode,attr);
@@ -257,7 +253,6 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr)
if (!error && (attr->ia_valid & ATTR_MODE))
mode_to_prot(inode);
out:
- unlock_kernel();
return error;
}
@@ -265,15 +260,13 @@ void
affs_put_inode(struct inode *inode)
{
pr_debug("AFFS: put_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink);
- lock_kernel();
affs_free_prealloc(inode);
if (atomic_read(&inode->i_count) == 1) {
+ down(&inode->i_sem);
if (inode->i_size != AFFS_I(inode)->mmu_private)
affs_truncate(inode);
- //if (inode->i_nlink)
- // affs_clear_inode(inode);
+ up(&inode->i_sem);
}
- unlock_kernel();
}
void
@@ -284,9 +277,7 @@ affs_delete_inode(struct inode *inode)
if (S_ISREG(inode->i_mode))
affs_truncate(inode);
clear_inode(inode);
- lock_kernel();
affs_free_block(inode->i_sb, inode->i_ino);
- unlock_kernel();
}
void
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index d9bf37b00e05..01defe3d0ff8 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -218,12 +218,10 @@ affs_lookup(struct inode *dir, struct dentry *dentry)
pr_debug("AFFS: lookup(\"%.*s\")\n",(int)dentry->d_name.len,dentry->d_name.name);
- lock_kernel();
affs_lock_dir(dir);
bh = affs_find_entry(dir, dentry);
affs_unlock_dir(dir);
if (IS_ERR(bh)) {
- unlock_kernel();
return ERR_PTR(PTR_ERR(bh));
}
if (bh) {
@@ -240,12 +238,10 @@ affs_lookup(struct inode *dir, struct dentry *dentry)
affs_brelse(bh);
inode = iget(sb, ino);
if (!inode) {
- unlock_kernel();
return ERR_PTR(-EACCES);
}
}
dentry->d_op = AFFS_SB(sb)->s_flags & SF_INTL ? &affs_intl_dentry_operations : &affs_dentry_operations;
- unlock_kernel();
d_add(dentry, inode);
return NULL;
}
@@ -253,17 +249,10 @@ affs_lookup(struct inode *dir, struct dentry *dentry)
int
affs_unlink(struct inode *dir, struct dentry *dentry)
{
- int res;
pr_debug("AFFS: unlink(dir=%d, \"%.*s\")\n", (u32)dir->i_ino,
(int)dentry->d_name.len, dentry->d_name.name);
- if (!dentry->d_inode)
- return -ENOENT;
-
- lock_kernel();
- res = affs_remove_header(dentry);
- unlock_kernel();
- return res;
+ return affs_remove_header(dentry);
}
int
@@ -276,12 +265,9 @@ affs_create(struct inode *dir, struct dentry *dentry, int mode)
pr_debug("AFFS: create(%lu,\"%.*s\",0%o)\n",dir->i_ino,(int)dentry->d_name.len,
dentry->d_name.name,mode);
- lock_kernel();
inode = affs_new_inode(dir);
- if (!inode) {
- unlock_kernel();
+ if (!inode)
return -ENOSPC;
- }
inode->i_mode = mode;
mode_to_prot(inode);
@@ -294,10 +280,8 @@ affs_create(struct inode *dir, struct dentry *dentry, int mode)
if (error) {
inode->i_nlink = 0;
iput(inode);
- unlock_kernel();
return error;
}
- unlock_kernel();
return 0;
}
@@ -310,12 +294,9 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
pr_debug("AFFS: mkdir(%lu,\"%.*s\",0%o)\n",dir->i_ino,
(int)dentry->d_name.len,dentry->d_name.name,mode);
- lock_kernel();
inode = affs_new_inode(dir);
- if (!inode) {
- unlock_kernel();
+ if (!inode)
return -ENOSPC;
- }
inode->i_mode = S_IFDIR | mode;
mode_to_prot(inode);
@@ -328,10 +309,8 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
inode->i_nlink = 0;
mark_inode_dirty(inode);
iput(inode);
- unlock_kernel();
return error;
}
- unlock_kernel();
return 0;
}
@@ -357,14 +336,10 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
pr_debug("AFFS: symlink(%lu,\"%.*s\" -> \"%s\")\n",dir->i_ino,
(int)dentry->d_name.len,dentry->d_name.name,symname);
- lock_kernel();
maxlen = AFFS_SB(sb)->s_hashsize * sizeof(u32) - 1;
- error = -ENOSPC;
inode = affs_new_inode(dir);
- if (!inode) {
- unlock_kernel();
+ if (!inode)
return -ENOSPC;
- }
inode->i_op = &affs_symlink_inode_operations;
inode->i_data.a_ops = &affs_symlink_aops;
@@ -410,7 +385,6 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
error = affs_add_entry(dir, inode, dentry, ST_SOFTLINK);
if (error)
goto err;
- unlock_kernel();
return 0;
@@ -418,7 +392,6 @@ err:
inode->i_nlink = 0;
mark_inode_dirty(inode);
iput(inode);
- unlock_kernel();
return error;
}
@@ -426,23 +399,11 @@ int
affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
{
struct inode *inode = old_dentry->d_inode;
- int error;
pr_debug("AFFS: link(%u, %u, \"%.*s\")\n", (u32)inode->i_ino, (u32)dir->i_ino,
(int)dentry->d_name.len,dentry->d_name.name);
- lock_kernel();
- error = affs_add_entry(dir, inode, dentry, ST_LINKFILE);
- if (error) {
- /* WTF??? */
- inode->i_nlink = 0;
- mark_inode_dirty(inode);
- iput(inode);
- unlock_kernel();
- return error;
- }
- unlock_kernel();
- return 0;
+ return affs_add_entry(dir, inode, dentry, ST_LINKFILE);
}
int
@@ -453,21 +414,19 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct buffer_head *bh = NULL;
int retval;
- lock_kernel();
pr_debug("AFFS: rename(old=%u,\"%*s\" to new=%u,\"%*s\")\n",
(u32)old_dir->i_ino, (int)old_dentry->d_name.len, old_dentry->d_name.name,
(u32)new_dir->i_ino, (int)new_dentry->d_name.len, new_dentry->d_name.name);
- if ((retval = affs_check_name(new_dentry->d_name.name,new_dentry->d_name.len)))
- goto done;
+ retval = affs_check_name(new_dentry->d_name.name,new_dentry->d_name.len);
+ if (retval)
+ return retval;
/* Unlink destination if it already exists */
if (new_dentry->d_inode) {
retval = affs_remove_header(new_dentry);
- if (retval) {
- unlock_kernel();
+ if (retval)
return retval;
- }
}
retval = -EIO;
@@ -493,6 +452,5 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
done:
mark_buffer_dirty_inode(bh, retval ? old_dir : new_dir);
affs_brelse(bh);
- unlock_kernel();
return retval;
}
diff --git a/fs/affs/super.c b/fs/affs/super.c
index ebc0fb917744..3774983a00fd 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -40,7 +40,6 @@ static void
affs_put_super(struct super_block *sb)
{
struct affs_sb_info *sbi = AFFS_SB(sb);
- lock_kernel();
pr_debug("AFFS: put_super()\n");
if (!(sb->s_flags & MS_RDONLY)) {
@@ -58,7 +57,6 @@ affs_put_super(struct super_block *sb)
affs_brelse(sbi->s_root_bh);
kfree(sbi);
sb->s_fs_info = NULL;
- unlock_kernel();
return;
}
@@ -67,7 +65,7 @@ affs_write_super(struct super_block *sb)
{
int clean = 2;
struct affs_sb_info *sbi = AFFS_SB(sb);
- lock_kernel();
+
if (!(sb->s_flags & MS_RDONLY)) {
// if (sbi->s_bitmap[i].bm_bh) {
// if (buffer_dirty(sbi->s_bitmap[i].bm_bh)) {
@@ -81,7 +79,7 @@ affs_write_super(struct super_block *sb)
} else
sb->s_dirt = 0;
- unlock_kernel();
+ pr_debug("AFFS: write_super() at %lu, clean=%d\n", get_seconds(), clean);
}
static kmem_cache_t * affs_inode_cachep;
@@ -300,7 +298,8 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
if (!sbi)
return -ENOMEM;
sb->s_fs_info = sbi;
- memset(sbi, 0, sizeof(*AFFS_SB));
+ memset(sbi, 0, sizeof(struct affs_sb_info));
+
init_MUTEX(&sbi->s_bmlock);
if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
diff --git a/fs/affs/symlink.c b/fs/affs/symlink.c
index c7e53656b540..c01cd4c64a61 100644
--- a/fs/affs/symlink.c
+++ b/fs/affs/symlink.c
@@ -32,9 +32,7 @@ static int affs_symlink_readpage(struct file *file, struct page *page)
pr_debug("AFFS: follow_link(ino=%lu)\n",inode->i_ino);
err = -EIO;
- lock_kernel();
bh = affs_bread(inode->i_sb, inode->i_ino);
- unlock_kernel();
if (!bh)
goto fail;
i = 0;
@@ -63,9 +61,7 @@ static int affs_symlink_readpage(struct file *file, struct page *page)
j++;
}
link[i] = '\0';
- lock_kernel();
affs_brelse(bh);
- unlock_kernel();
SetPageUptodate(page);
kunmap(page);
unlock_page(page);
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 5a643a493345..409ab7469996 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -452,6 +452,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
unsigned int size;
unsigned long elf_entry, interp_load_addr = 0;
unsigned long start_code, end_code, start_data, end_data;
+ unsigned long reloc_func_desc = 0;
struct elfhdr elf_ex;
struct elfhdr interp_elf_ex;
struct exec interp_ex;
@@ -695,6 +696,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
load_bias += error -
ELF_PAGESTART(load_bias + vaddr);
load_addr += load_bias;
+ reloc_func_desc = load_addr;
}
}
k = elf_ppnt->p_vaddr;
@@ -742,6 +744,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
retval = -ENOEXEC; /* Nobody gets to see this, but.. */
goto out;
}
+ reloc_func_desc = interp_load_addr;
} else {
elf_entry = elf_ex.e_entry;
}
@@ -789,10 +792,14 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
/*
* The ABI may specify that certain registers be set up in special
* ways (on i386 %edx is the address of a DT_FINI function, for
- * example. This macro performs whatever initialization to
- * the regs structure is required.
+ * example. In addition, it may also specify (eg, PowerPC64 ELF)
+ * that the e_entry field is the address of the function descriptor
+ * for the startup routine, rather than the address of the startup
+ * routine itself. This macro performs whatever initialization to
+ * the regs structure is required as well as any relocations to the
+ * function descriptor entries when executing dynamically links apps.
*/
- ELF_PLAT_INIT(regs);
+ ELF_PLAT_INIT(regs, reloc_func_desc);
#endif
start_thread(regs, elf_entry, bprm->p);
diff --git a/fs/dcache.c b/fs/dcache.c
index 4317d965af1a..719571fa0e47 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -24,7 +24,9 @@
#include <linux/cache.h>
#include <linux/module.h>
#include <linux/mount.h>
+#include <linux/file.h>
#include <asm/uaccess.h>
+#include <linux/security.h>
#define DCACHE_PARANOIA 1
/* #define DCACHE_DEBUG 1 */
@@ -760,6 +762,7 @@ struct dentry * d_alloc(struct dentry * parent, const struct qstr *name)
void d_instantiate(struct dentry *entry, struct inode * inode)
{
if (!list_empty(&entry->d_alias)) BUG();
+ security_d_instantiate(entry, inode);
spin_lock(&dcache_lock);
if (inode)
list_add(&entry->d_alias, &inode->i_dentry);
@@ -890,6 +893,7 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry)
struct dentry *new = NULL;
if (inode && S_ISDIR(inode->i_mode)) {
+ security_d_instantiate(dentry, inode);
spin_lock(&dcache_lock);
if (!list_empty(&inode->i_dentry)) {
new = list_entry(inode->i_dentry.next, struct dentry, d_alias);
@@ -1571,7 +1575,7 @@ void __init vfs_caches_init(unsigned long mempages)
filp_cachep = kmem_cache_create("filp",
sizeof(struct file), 0,
- SLAB_HWCACHE_ALIGN, NULL, NULL);
+ SLAB_HWCACHE_ALIGN, filp_ctor, filp_dtor);
if(!filp_cachep)
panic("Cannot create filp SLAB cache");
diff --git a/fs/devfs/base.c b/fs/devfs/base.c
index c87c23f3fa01..9cefcfa5b8a7 100644
--- a/fs/devfs/base.c
+++ b/fs/devfs/base.c
@@ -1802,8 +1802,11 @@ int devfs_generate_path (devfs_handle_t de, char *path, int buflen)
static struct file_operations *devfs_get_ops (devfs_handle_t de)
{
struct file_operations *ops = de->u.cdev.ops;
- struct module *owner = ops->owner;
+ struct module *owner;
+ if (!ops)
+ return NULL;
+ owner = ops->owner;
read_lock (&de->parent->u.dir.lock); /* Prevent module from unloading */
if ( (de->next == de) || !try_module_get (owner) )
{ /* Entry is already unhooked or module is unloading */
diff --git a/fs/exec.c b/fs/exec.c
index 061f96130173..f0b70ae3698d 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -633,7 +633,7 @@ static inline int de_thread(struct task_struct *tsk)
count = 1;
while (atomic_read(&oldsig->count) > count) {
oldsig->group_exit_task = current;
- current->state = TASK_UNINTERRUPTIBLE;
+ __set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock_irq(lock);
schedule();
spin_lock_irq(lock);
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 9a66fe94dc3f..c74c4a628633 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -353,7 +353,7 @@ static int get_name(struct dentry *dentry, char *name,
/*
* Open the directory ...
*/
- error = init_private_file(&file, dentry, FMODE_READ);
+ error = open_private_file(&file, dentry, O_RDONLY);
if (error)
goto out;
error = -EINVAL;
@@ -381,8 +381,7 @@ static int get_name(struct dentry *dentry, char *name,
}
out_close:
- if (file.f_op->release)
- file.f_op->release(dir, &file);
+ close_private_file(&file);
out:
return error;
}
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index e5bee153791a..40868d403f0b 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -395,7 +395,7 @@ int ext2_new_block (struct inode * inode, unsigned long goal,
goto io_error;
group_alloc = group_reserve_blocks(desc, gdp_bh, es_alloc);
}
- if (bit >= sbi->s_groups_count) {
+ if (!group_alloc) {
*err = -ENOSPC;
goto out_release;
}
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index 7850dcbe7bf1..610695289845 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -112,6 +112,7 @@ extern int ext2_sync_inode (struct inode *);
extern void ext2_discard_prealloc (struct inode *);
extern void ext2_truncate (struct inode *);
extern int ext2_setattr (struct dentry *, struct iattr *);
+extern void ext2_set_inode_flags(struct inode *inode);
/* ioctl.c */
extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 345e7495176d..87b2d99f4a7c 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -545,10 +545,7 @@ repeat:
ei->i_prealloc_count = 0;
ei->i_dir_start_lookup = 0;
ei->i_state = EXT2_STATE_NEW;
- if (ei->i_flags & EXT2_SYNC_FL)
- inode->i_flags |= S_SYNC;
- if (ei->i_flags & EXT2_DIRSYNC_FL)
- inode->i_flags |= S_DIRSYNC;
+ ext2_set_inode_flags(inode);
inode->i_generation = EXT2_SB(sb)->s_next_generation++;
insert_inode_hash(inode);
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index e47f84e305cd..c2fbefdd3613 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1011,6 +1011,23 @@ Egdp:
return ERR_PTR(-EIO);
}
+void ext2_set_inode_flags(struct inode *inode)
+{
+ unsigned int flags = EXT2_I(inode)->i_flags;
+
+ inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
+ if (flags & EXT2_SYNC_FL)
+ inode->i_flags |= S_SYNC;
+ if (flags & EXT2_APPEND_FL)
+ inode->i_flags |= S_APPEND;
+ if (flags & EXT2_IMMUTABLE_FL)
+ inode->i_flags |= S_IMMUTABLE;
+ if (flags & EXT2_NOATIME_FL)
+ inode->i_flags |= S_NOATIME;
+ if (flags & EXT2_DIRSYNC_FL)
+ inode->i_flags |= S_DIRSYNC;
+}
+
void ext2_read_inode (struct inode * inode)
{
struct ext2_inode_info *ei = EXT2_I(inode);
@@ -1108,14 +1125,7 @@ void ext2_read_inode (struct inode * inode)
le32_to_cpu(raw_inode->i_block[0]));
}
brelse (bh);
- if (ei->i_flags & EXT2_SYNC_FL)
- inode->i_flags |= S_SYNC;
- if (ei->i_flags & EXT2_APPEND_FL)
- inode->i_flags |= S_APPEND;
- if (ei->i_flags & EXT2_IMMUTABLE_FL)
- inode->i_flags |= S_IMMUTABLE;
- if (ei->i_flags & EXT2_NOATIME_FL)
- inode->i_flags |= S_NOATIME;
+ ext2_set_inode_flags(inode);
return;
bad_inode:
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c
index afff8566f3b6..101055bbf519 100644
--- a/fs/ext2/ioctl.c
+++ b/fs/ext2/ioctl.c
@@ -58,22 +58,7 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
flags |= oldflags & ~EXT2_FL_USER_MODIFIABLE;
ei->i_flags = flags;
- if (flags & EXT2_SYNC_FL)
- inode->i_flags |= S_SYNC;
- else
- inode->i_flags &= ~S_SYNC;
- if (flags & EXT2_APPEND_FL)
- inode->i_flags |= S_APPEND;
- else
- inode->i_flags &= ~S_APPEND;
- if (flags & EXT2_IMMUTABLE_FL)
- inode->i_flags |= S_IMMUTABLE;
- else
- inode->i_flags &= ~S_IMMUTABLE;
- if (flags & EXT2_NOATIME_FL)
- inode->i_flags |= S_NOATIME;
- else
- inode->i_flags &= ~S_NOATIME;
+ ext2_set_inode_flags(inode);
inode->i_ctime = CURRENT_TIME;
mark_inode_dirty(inode);
return 0;
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 228fa402af19..155c19c4ac92 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -568,10 +568,7 @@ repeat:
#endif
ei->i_block_group = group;
- if (ei->i_flags & EXT3_SYNC_FL)
- inode->i_flags |= S_SYNC;
- if (ei->i_flags & EXT3_DIRSYNC_FL)
- inode->i_flags |= S_DIRSYNC;
+ ext3_set_inode_flags(inode);
if (IS_DIRSYNC(inode))
handle->h_sync = 1;
insert_inode_hash(inode);
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index b37c23fb3d5a..5012c1719ee4 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -2209,6 +2209,24 @@ int ext3_get_inode_loc (struct inode *inode, struct ext3_iloc *iloc)
return -EIO;
}
+void ext3_set_inode_flags(struct inode *inode)
+{
+ unsigned int flags = EXT3_I(inode)->i_flags;
+
+ inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
+ if (flags & EXT3_SYNC_FL)
+ inode->i_flags |= S_SYNC;
+ if (flags & EXT3_APPEND_FL)
+ inode->i_flags |= S_APPEND;
+ if (flags & EXT3_IMMUTABLE_FL)
+ inode->i_flags |= S_IMMUTABLE;
+ if (flags & EXT3_NOATIME_FL)
+ inode->i_flags |= S_NOATIME;
+ if (flags & EXT3_DIRSYNC_FL)
+ inode->i_flags |= S_DIRSYNC;
+}
+
+
void ext3_read_inode(struct inode * inode)
{
struct ext3_iloc iloc;
@@ -2320,14 +2338,7 @@ void ext3_read_inode(struct inode * inode)
init_special_inode(inode, inode->i_mode,
le32_to_cpu(iloc.raw_inode->i_block[0]));
}
- if (ei->i_flags & EXT3_SYNC_FL)
- inode->i_flags |= S_SYNC;
- if (ei->i_flags & EXT3_APPEND_FL)
- inode->i_flags |= S_APPEND;
- if (ei->i_flags & EXT3_IMMUTABLE_FL)
- inode->i_flags |= S_IMMUTABLE;
- if (ei->i_flags & EXT3_NOATIME_FL)
- inode->i_flags |= S_NOATIME;
+ ext3_set_inode_flags(inode);
return;
bad_inode:
diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
index 5d74409cef07..cedf91bde8a2 100644
--- a/fs/ext3/ioctl.c
+++ b/fs/ext3/ioctl.c
@@ -85,22 +85,7 @@ int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
flags |= oldflags & ~EXT3_FL_USER_MODIFIABLE;
ei->i_flags = flags;
- if (flags & EXT3_SYNC_FL)
- inode->i_flags |= S_SYNC;
- else
- inode->i_flags &= ~S_SYNC;
- if (flags & EXT3_APPEND_FL)
- inode->i_flags |= S_APPEND;
- else
- inode->i_flags &= ~S_APPEND;
- if (flags & EXT3_IMMUTABLE_FL)
- inode->i_flags |= S_IMMUTABLE;
- else
- inode->i_flags &= ~S_IMMUTABLE;
- if (flags & EXT3_NOATIME_FL)
- inode->i_flags |= S_NOATIME;
- else
- inode->i_flags &= ~S_NOATIME;
+ ext3_set_inode_flags(inode);
inode->i_ctime = CURRENT_TIME;
err = ext3_mark_iloc_dirty(handle, inode, &iloc);
diff --git a/fs/file_table.c b/fs/file_table.c
index 4e66a3598de8..8ae8d29c2365 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -22,94 +22,123 @@ struct files_stat_struct files_stat = {
.max_files = NR_FILE
};
-/* Here the new files go */
-static LIST_HEAD(anon_list);
-/* And here the free ones sit */
-static LIST_HEAD(free_list);
/* public *and* exported. Not pretty! */
-spinlock_t files_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+spinlock_t __cacheline_aligned_in_smp files_lock = SPIN_LOCK_UNLOCKED;
+
+static spinlock_t filp_count_lock = SPIN_LOCK_UNLOCKED;
+
+/* slab constructors and destructors are called from arbitrary
+ * context and must be fully threaded - use a local spinlock
+ * to protect files_stat.nr_files
+ */
+void filp_ctor(void * objp, struct kmem_cache_s *cachep, unsigned long cflags)
+{
+ if ((cflags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
+ SLAB_CTOR_CONSTRUCTOR) {
+ unsigned long flags;
+ spin_lock_irqsave(&filp_count_lock, flags);
+ files_stat.nr_files++;
+ spin_unlock_irqrestore(&filp_count_lock, flags);
+ }
+}
+
+void filp_dtor(void * objp, struct kmem_cache_s *cachep, unsigned long dflags)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&filp_count_lock, flags);
+ files_stat.nr_files--;
+ spin_unlock_irqrestore(&filp_count_lock, flags);
+}
+
+static inline void file_free(struct file *f)
+{
+ kmem_cache_free(filp_cachep, f);
+}
/* Find an unused file structure and return a pointer to it.
* Returns NULL, if there are no more free file structures or
* we run out of memory.
- *
- * SMP-safe.
*/
-struct file * get_empty_filp(void)
+struct file *get_empty_filp(void)
{
- static int old_max = 0;
+static int old_max = 0;
struct file * f;
- file_list_lock();
- if (files_stat.nr_free_files > NR_RESERVED_FILES) {
- used_one:
- f = list_entry(free_list.next, struct file, f_list);
- list_del(&f->f_list);
- files_stat.nr_free_files--;
- new_one:
- memset(f, 0, sizeof(*f));
- if (security_file_alloc(f)) {
- list_add(&f->f_list, &free_list);
- files_stat.nr_free_files++;
- file_list_unlock();
- return NULL;
- }
- eventpoll_init_file(f);
- atomic_set(&f->f_count,1);
- f->f_version = 0;
- f->f_uid = current->fsuid;
- f->f_gid = current->fsgid;
- f->f_owner.lock = RW_LOCK_UNLOCKED;
- list_add(&f->f_list, &anon_list);
- file_list_unlock();
- return f;
- }
- /*
- * Use a reserved one if we're the superuser
- */
- if (files_stat.nr_free_files && !current->euid)
- goto used_one;
/*
- * Allocate a new one if we're below the limit.
+ * Privileged users can go above max_files
*/
- if (files_stat.nr_files < files_stat.max_files) {
- file_list_unlock();
- f = kmem_cache_alloc(filp_cachep, SLAB_KERNEL);
- file_list_lock();
+ if (files_stat.nr_files < files_stat.max_files ||
+ capable(CAP_SYS_ADMIN)) {
+ f = kmem_cache_alloc(filp_cachep, GFP_KERNEL);
if (f) {
- files_stat.nr_files++;
- goto new_one;
+ memset(f, 0, sizeof(*f));
+ if (security_file_alloc(f)) {
+ file_free(f);
+ goto fail;
+ }
+ eventpoll_init_file(f);
+ atomic_set(&f->f_count, 1);
+ f->f_uid = current->fsuid;
+ f->f_gid = current->fsgid;
+ f->f_owner.lock = RW_LOCK_UNLOCKED;
+ /* f->f_version: 0 */
+ INIT_LIST_HEAD(&f->f_list);
+ return f;
}
- /* Big problems... */
- printk(KERN_WARNING "VFS: filp allocation failed\n");
+ }
- } else if (files_stat.max_files > old_max) {
- printk(KERN_INFO "VFS: file-max limit %d reached\n", files_stat.max_files);
+ /* Ran out of filps - report that */
+ if (files_stat.max_files >= old_max) {
+ printk(KERN_INFO "VFS: file-max limit %d reached\n",
+ files_stat.max_files);
old_max = files_stat.max_files;
+ } else {
+ /* Big problems... */
+ printk(KERN_WARNING "VFS: filp allocation failed\n");
}
- file_list_unlock();
+fail:
return NULL;
}
/*
* Clear and initialize a (private) struct file for the given dentry,
- * and call the open function (if any). The caller must verify that
- * inode->i_fop is not NULL.
+ * allocate the security structure, and call the open function (if any).
+ * The file should be released using close_private_file.
*/
-int init_private_file(struct file *filp, struct dentry *dentry, int mode)
+int open_private_file(struct file *filp, struct dentry *dentry, int flags)
{
+ int error;
memset(filp, 0, sizeof(*filp));
eventpoll_init_file(filp);
- filp->f_mode = mode;
+ filp->f_flags = flags;
+ filp->f_mode = (flags+1) & O_ACCMODE;
atomic_set(&filp->f_count, 1);
filp->f_dentry = dentry;
filp->f_uid = current->fsuid;
filp->f_gid = current->fsgid;
filp->f_op = dentry->d_inode->i_fop;
- if (filp->f_op->open)
- return filp->f_op->open(dentry->d_inode, filp);
- else
- return 0;
+ INIT_LIST_HEAD(&filp->f_list);
+ error = security_file_alloc(filp);
+ if (!error)
+ if (filp->f_op && filp->f_op->open) {
+ error = filp->f_op->open(dentry->d_inode, filp);
+ if (error)
+ security_file_free(filp);
+ }
+ return error;
+}
+
+/*
+ * Release a private file by calling the release function (if any) and
+ * freeing the security structure.
+ */
+void close_private_file(struct file *file)
+{
+ struct inode * inode = file->f_dentry->d_inode;
+
+ if (file->f_op && file->f_op->release)
+ file->f_op->release(inode, file);
+ security_file_free(file);
}
void fput(struct file * file)
@@ -121,11 +150,11 @@ void fput(struct file * file)
/* __fput is called from task context when aio completion releases the last
* last use of a struct file *. Do not use otherwise.
*/
-void __fput(struct file * file)
+void __fput(struct file *file)
{
- struct dentry * dentry = file->f_dentry;
- struct vfsmount * mnt = file->f_vfsmnt;
- struct inode * inode = dentry->d_inode;
+ struct dentry *dentry = file->f_dentry;
+ struct vfsmount *mnt = file->f_vfsmnt;
+ struct inode *inode = dentry->d_inode;
/*
* The function eventpoll_release() should be the first called
@@ -140,20 +169,17 @@ void __fput(struct file * file)
fops_put(file->f_op);
if (file->f_mode & FMODE_WRITE)
put_write_access(inode);
- file_list_lock();
file->f_dentry = NULL;
file->f_vfsmnt = NULL;
- list_del(&file->f_list);
- list_add(&file->f_list, &free_list);
- files_stat.nr_free_files++;
- file_list_unlock();
+ file_kill(file);
+ file_free(file);
dput(dentry);
mntput(mnt);
}
-struct file * fget(unsigned int fd)
+struct file *fget(unsigned int fd)
{
- struct file * file;
+ struct file *file;
struct files_struct *files = current->files;
read_lock(&files->file_lock);
@@ -164,17 +190,12 @@ struct file * fget(unsigned int fd)
return file;
}
-/* Here. put_filp() is SMP-safe now. */
-
void put_filp(struct file *file)
{
- if(atomic_dec_and_test(&file->f_count)) {
+ if (atomic_dec_and_test(&file->f_count)) {
security_file_free(file);
- file_list_lock();
- list_del(&file->f_list);
- list_add(&file->f_list, &free_list);
- files_stat.nr_free_files++;
- file_list_unlock();
+ file_kill(file);
+ file_free(file);
}
}
@@ -183,16 +204,17 @@ void file_move(struct file *file, struct list_head *list)
if (!list)
return;
file_list_lock();
- list_del(&file->f_list);
- list_add(&file->f_list, list);
+ list_move(&file->f_list, list);
file_list_unlock();
}
void file_kill(struct file *file)
{
- file_list_lock();
- list_del_init(&file->f_list);
- file_list_unlock();
+ if (!list_empty(&file->f_list)) {
+ file_list_lock();
+ list_del_init(&file->f_list);
+ file_list_unlock();
+ }
}
int fs_may_remount_ro(struct super_block *sb)
@@ -209,7 +231,7 @@ int fs_may_remount_ro(struct super_block *sb)
if (inode->i_nlink == 0)
goto too_bad;
- /* Writable file? */
+ /* Writeable file? */
if (S_ISREG(inode->i_mode) && (file->f_mode & FMODE_WRITE))
goto too_bad;
}
diff --git a/fs/inode.c b/fs/inode.c
index 514863d8df82..e54c9ae0169b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -129,6 +129,7 @@ static struct inode *alloc_inode(struct super_block *sb)
inode->i_pipe = NULL;
inode->i_bdev = NULL;
inode->i_cdev = NULL;
+ inode->i_rdev = to_kdev_t(0);
inode->i_security = NULL;
if (security_inode_alloc(inode)) {
if (inode->i_sb->s_op->destroy_inode)
@@ -1213,7 +1214,7 @@ repeat:
goto repeat;
}
remove_wait_queue(wq, &wait);
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
}
void wake_up_inode(struct inode *inode)
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 8a827b109c93..dfb16a579c99 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -305,8 +305,6 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
(long long)lock->fl.fl_end,
wait);
- /* Lock file against concurrent access */
- down(&file->f_sema);
/* Get existing block (in case client is busy-waiting) */
block = nlmsvc_lookup_block(file, lock, 0);
@@ -314,6 +312,9 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
lock->fl.fl_flags |= FL_LOCKD;
again:
+ /* Lock file against concurrent access */
+ down(&file->f_sema);
+
if (!(conflock = posix_test_lock(&file->f_file, &lock->fl))) {
error = posix_lock_file(&file->f_file, &lock->fl);
@@ -346,7 +347,10 @@ again:
/* If we don't have a block, create and initialize it. Then
* retry because we may have slept in kmalloc. */
+ /* We have to release f_sema as nlmsvc_create_block may try to
+ * to claim it while doing host garbage collection */
if (block == NULL) {
+ up(&file->f_sema);
dprintk("lockd: blocking on this lock (allocating).\n");
if (!(block = nlmsvc_create_block(rqstp, file, lock, cookie)))
return nlm_lck_denied_nolocks;
diff --git a/fs/locks.c b/fs/locks.c
index 90f4211bb1d9..1e78fd26a18b 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -565,7 +565,7 @@ static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout
int result = 0;
DECLARE_WAITQUEUE(wait, current);
- current->state = TASK_INTERRUPTIBLE;
+ __set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(fl_wait, &wait);
if (timeout == 0)
schedule();
@@ -574,7 +574,7 @@ static int interruptible_sleep_on_locked(wait_queue_head_t *fl_wait, int timeout
if (signal_pending(current))
result = -ERESTARTSYS;
remove_wait_queue(fl_wait, &wait);
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
return result;
}
diff --git a/fs/namei.c b/fs/namei.c
index d9c1748ff7aa..953d519cb9aa 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -361,10 +361,8 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, i
result = dir->i_op->lookup(dir, dentry);
if (result)
dput(dentry);
- else {
+ else
result = dentry;
- security_inode_post_lookup(dir, result);
- }
}
up(&dir->i_sem);
return result;
@@ -894,10 +892,9 @@ struct dentry * lookup_hash(struct qstr *name, struct dentry * base)
if (!new)
goto out;
dentry = inode->i_op->lookup(inode, new);
- if (!dentry) {
+ if (!dentry)
dentry = new;
- security_inode_post_lookup(inode, dentry);
- } else
+ else
dput(new);
}
out:
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index ea39aa340908..67ed9d1bc1b8 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1231,6 +1231,7 @@ static struct super_block *nfs_get_sb(struct file_system_type *fs_type,
if (root->size > sizeof(root->data)) {
printk("nfs_get_sb: invalid root filehandle\n");
+ kfree(server);
return ERR_PTR(-EINVAL);
}
/* We now require that the mount process passes the remote address */
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 03c01534a522..4ea38a35403e 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -294,7 +294,9 @@ int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
/* client */
len = qword_get(&mesg, buf, PAGE_SIZE);
- if (len <= 0) return -EINVAL;
+ err = -EINVAL;
+ if (len <= 0) goto out;
+
err = -ENOENT;
dom = auth_domain_find(buf);
if (!dom)
@@ -473,8 +475,14 @@ exp_get_by_name(svc_client *clp, struct vfsmount *mnt, struct dentry *dentry,
exp = svc_export_lookup(&key, 0);
if (exp != NULL)
- if (cache_check(&svc_export_cache, &exp->h, reqp))
+ switch (cache_check(&svc_export_cache, &exp->h, reqp)) {
+ case 0: break;
+ case -EAGAIN:
+ exp = ERR_PTR(-EAGAIN);
+ break;
+ default:
exp = NULL;
+ }
return exp;
}
@@ -915,7 +923,8 @@ struct flags {
{ NFSEXP_UIDMAP, {"uidmap", ""}},
{ NFSEXP_KERBEROS, { "kerberos", ""}},
{ NFSEXP_SUNSECURE, { "sunsecure", ""}},
- { NFSEXP_CROSSMNT, {"nohide", ""}},
+ { NFSEXP_NOHIDE, {"nohide", ""}},
+ { NFSEXP_CROSSMNT, {"crossmnt", ""}},
{ NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}},
{ NFSEXP_NOAUTHNLM, {"insecure_locks", ""}},
#ifdef MSNFS
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 088ee1438f54..03e8f194fff2 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -79,7 +79,7 @@ static struct raparms * raparm_cache;
* N.B. After this call _both_ fhp and resfh need an fh_put
*
* If the lookup would cross a mountpoint, and the mounted filesystem
- * is exported to the client with NFSEXP_CROSSMNT, then the lookup is
+ * is exported to the client with NFSEXP_NOHIDE, then the lookup is
* accepted as it stands and the mounted directory is
* returned. Otherwise the covered directory is returned.
* NOTE: this mountpoint crossing is not supported properly by all
@@ -115,7 +115,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
read_lock(&dparent_lock);
dentry = dget(dparent->d_parent);
read_unlock(&dparent_lock);
- } else if (!EX_CROSSMNT(exp))
+ } else if (!EX_NOHIDE(exp))
dentry = dget(dparent); /* .. == . just like at / */
else {
/* checking mountpoint crossing is very different when stepping up */
@@ -133,6 +133,12 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
exp2 = exp_parent(exp->ex_client, mnt, dentry,
&rqstp->rq_chandle);
+ if (IS_ERR(exp2)) {
+ err = PTR_ERR(exp2);
+ dput(dentry);
+ mntput(mnt);
+ goto out;
+ }
if (!exp2) {
dput(dentry);
dentry = dget(dparent);
@@ -157,9 +163,19 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
struct dentry *mounts = dget(dentry);
while (follow_down(&mnt,&mounts)&&d_mountpoint(mounts))
;
+
exp2 = exp_get_by_name(exp->ex_client, mnt,
mounts, &rqstp->rq_chandle);
- if (exp2 && EX_CROSSMNT(exp2)) {
+ if (IS_ERR(exp2)) {
+ err = PTR_ERR(exp2);
+ dput(mounts);
+ dput(dentry);
+ mntput(mnt);
+ goto out;
+ }
+ if (exp2 &&
+ ((exp->ex_flags & NFSEXP_CROSSMNT)
+ || EX_NOHIDE(exp2))) {
/* successfully crossed mount point */
exp_put(exp);
exp = exp2;
@@ -426,7 +442,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
{
struct dentry *dentry;
struct inode *inode;
- int flags = O_RDONLY|O_LARGEFILE, mode = FMODE_READ, err;
+ int flags = O_RDONLY|O_LARGEFILE, err;
/*
* If we get here, then the client has already done an "open",
@@ -463,14 +479,12 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
goto out_nfserr;
flags = O_WRONLY|O_LARGEFILE;
- mode = FMODE_WRITE;
DQUOT_INIT(inode);
}
- err = init_private_file(filp, dentry, mode);
+ err = open_private_file(filp, dentry, flags);
if (!err) {
- filp->f_flags = flags;
filp->f_vfsmnt = fhp->fh_export->ex_mnt;
} else if (access & MAY_WRITE)
put_write_access(inode);
@@ -491,8 +505,7 @@ nfsd_close(struct file *filp)
struct dentry *dentry = filp->f_dentry;
struct inode *inode = dentry->d_inode;
- if (filp->f_op->release)
- filp->f_op->release(inode, filp);
+ close_private_file(filp);
if (filp->f_mode & FMODE_WRITE)
put_write_access(inode);
}
@@ -1190,7 +1203,9 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
iap->ia_mode = (iap->ia_mode&S_IALLUGO)
| S_IFLNK;
err = notify_change(dnew, iap);
- if (!err && EX_ISSYNC(fhp->fh_export))
+ if (err)
+ err = nfserrno(err);
+ else if (EX_ISSYNC(fhp->fh_export))
write_inode_now(dentry->d_inode, 1);
}
}
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index f7c79e8704ee..f7332ea47ea1 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -42,6 +42,7 @@
#include <linux/blkdev.h>
#include <linux/hugetlb.h>
#include <linux/jiffies.h>
+#include <linux/sysrq.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/io.h>
@@ -521,6 +522,28 @@ static struct file_operations proc_profile_operations = {
.write = write_profile,
};
+#ifdef CONFIG_MAGIC_SYSRQ
+/*
+ * writing 'C' to /proc/sysrq-trigger is like sysrq-C
+ */
+static ssize_t write_sysrq_trigger(struct file *file, const char *buf,
+ size_t count, loff_t *ppos)
+{
+ if (count) {
+ char c;
+
+ if (get_user(c, buf))
+ return -EFAULT;
+ handle_sysrq(c, NULL, NULL);
+ }
+ return count;
+}
+
+static struct file_operations proc_sysrq_trigger_operations = {
+ .write = write_sysrq_trigger,
+};
+#endif
+
struct proc_dir_entry *proc_root_kcore;
static void create_seq_entry(char *name, mode_t mode, struct file_operations *f)
@@ -592,6 +615,11 @@ void __init proc_misc_init(void)
entry->size = (1+prof_len) * sizeof(unsigned int);
}
}
+#ifdef CONFIG_MAGIC_SYSRQ
+ entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
+ if (entry)
+ entry->proc_fops = &proc_sysrq_trigger_operations;
+#endif
#ifdef CONFIG_PPC32
{
extern struct file_operations ppc_htab_operations;
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index d90636bfe358..bd15acb84aa9 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -1310,6 +1310,10 @@ static void free_journal_ram(struct super_block *p_s_sb) {
if (SB_JOURNAL(p_s_sb)->j_header_bh) {
brelse(SB_JOURNAL(p_s_sb)->j_header_bh) ;
}
+ /* j_header_bh is on the journal dev, make sure not to release the journal
+ * dev until we brelse j_header_bh
+ */
+ release_journal_dev(p_s_sb, SB_JOURNAL(p_s_sb));
vfree(SB_JOURNAL(p_s_sb)) ;
}
@@ -1341,7 +1345,6 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, struct sup
commit_wq = NULL;
}
- release_journal_dev( p_s_sb, SB_JOURNAL( p_s_sb ) );
free_journal_ram(p_s_sb) ;
return 0 ;
@@ -1867,24 +1870,18 @@ static int release_journal_dev( struct super_block *super,
int result;
result = 0;
-
if( journal -> j_dev_file != NULL ) {
- /*
- * journal block device was taken via filp_open
- */
result = filp_close( journal -> j_dev_file, NULL );
journal -> j_dev_file = NULL;
journal -> j_dev_bd = NULL;
} else if( journal -> j_dev_bd != NULL ) {
- /*
- * journal block device was taken via bdget and blkdev_get
- */
result = blkdev_put( journal -> j_dev_bd, BDEV_FS );
journal -> j_dev_bd = NULL;
}
+
if( result != 0 ) {
- reiserfs_warning("sh-457: release_journal_dev: Cannot release journal device: %i", result );
+ reiserfs_warning("sh-457: release_journal_dev: Cannot release journal device: %i\n", result );
}
return result;
}
@@ -1895,6 +1892,7 @@ static int journal_init_dev( struct super_block *super,
{
int result;
dev_t jdev;
+ int blkdev_mode = FMODE_READ | FMODE_WRITE;
result = 0;
@@ -1902,12 +1900,16 @@ static int journal_init_dev( struct super_block *super,
journal -> j_dev_file = NULL;
jdev = SB_ONDISK_JOURNAL_DEVICE( super ) ?
SB_ONDISK_JOURNAL_DEVICE( super ) : super->s_dev;
+
+ if (bdev_read_only(super->s_bdev))
+ blkdev_mode = FMODE_READ;
+
/* there is no "jdev" option and journal is on separate device */
if( ( !jdev_name || !jdev_name[ 0 ] ) ) {
journal -> j_dev_bd = bdget(jdev);
if( journal -> j_dev_bd )
result = blkdev_get( journal -> j_dev_bd,
- FMODE_READ | FMODE_WRITE, 0,
+ blkdev_mode, 0,
BDEV_FS );
else
result = -ENOMEM;
@@ -1928,10 +1930,10 @@ static int journal_init_dev( struct super_block *super,
jdev_inode = journal -> j_dev_file -> f_dentry -> d_inode;
journal -> j_dev_bd = jdev_inode -> i_bdev;
if( !S_ISBLK( jdev_inode -> i_mode ) ) {
- printk( "journal_init_dev: '%s' is not a block device", jdev_name );
+ printk( "journal_init_dev: '%s' is not a block device\n", jdev_name );
result = -ENOTBLK;
} else if( jdev_inode -> i_bdev == NULL ) {
- printk( "journal_init_dev: bdev uninitialized for '%s'", jdev_name );
+ printk( "journal_init_dev: bdev uninitialized for '%s'\n", jdev_name );
result = -ENOMEM;
} else {
/* ok */
@@ -1941,12 +1943,12 @@ static int journal_init_dev( struct super_block *super,
} else {
result = PTR_ERR( journal -> j_dev_file );
journal -> j_dev_file = NULL;
- printk( "journal_init_dev: Cannot open '%s': %i", jdev_name, result );
+ printk( "journal_init_dev: Cannot open '%s': %i\n", jdev_name, result );
}
if( result != 0 ) {
release_journal_dev( super, journal );
}
- printk( "journal_init_dev: journal device: %s", bdevname(journal->j_dev_bd));
+ printk( "journal_init_dev: journal device: %s\n", bdevname(journal->j_dev_bd));
return result;
}
@@ -1960,20 +1962,24 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
struct reiserfs_journal_header *jh;
struct reiserfs_journal *journal;
- if (sizeof(struct reiserfs_journal_commit) != 4096 ||
- sizeof(struct reiserfs_journal_desc) != 4096
- ) {
- printk("journal-1249: commit or desc struct not 4096 %Zd %Zd\n", sizeof(struct reiserfs_journal_commit),
+ if (sizeof(struct reiserfs_journal_commit) != 4096 ||
+ sizeof(struct reiserfs_journal_desc) != 4096) {
+ printk("journal-1249: commit or desc struct not 4096 %Zd %Zd\n", sizeof(struct reiserfs_journal_commit),
sizeof(struct reiserfs_journal_desc)) ;
- return 1 ;
- }
+ return 1 ;
+ }
journal = SB_JOURNAL(p_s_sb) = vmalloc(sizeof (struct reiserfs_journal)) ;
if (!journal) {
printk("journal-1256: unable to get memory for journal structure\n") ;
- return 1 ;
- }
+ return 1 ;
+ }
memset(journal, 0, sizeof(struct reiserfs_journal)) ;
+ INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_bitmap_nodes) ;
+ INIT_LIST_HEAD (&SB_JOURNAL(p_s_sb)->j_prealloc_list);
+ reiserfs_allocate_list_bitmaps(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_bitmap,
+ SB_BMAP_NR(p_s_sb)) ;
+ allocate_bitmap_nodes(p_s_sb) ;
/* reserved for journal area support */
SB_JOURNAL_1st_RESERVED_BLOCK(p_s_sb) = (old_format ?
@@ -1983,7 +1989,7 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
if( journal_init_dev( p_s_sb, journal, j_dev_name ) != 0 ) {
printk( "sh-462: unable to initialize jornal device\n");
- return 1;
+ goto free_and_return;
}
rs = SB_DISK_SUPER_BLOCK(p_s_sb);
@@ -1993,8 +1999,7 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
SB_ONDISK_JOURNAL_1st_BLOCK(p_s_sb) + SB_ONDISK_JOURNAL_SIZE(p_s_sb));
if (!bhjh) {
printk("sh-459: unable to read journal header\n") ;
- release_journal_dev(p_s_sb, journal);
- return 1 ;
+ goto free_and_return;
}
jh = (struct reiserfs_journal_header *)(bhjh->b_data);
@@ -2005,8 +2010,7 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
jh->jh_journal.jp_journal_magic, bdevname( SB_JOURNAL(p_s_sb)->j_dev_bd ),
sb_jp_journal_magic(rs), reiserfs_bdevname (p_s_sb));
brelse (bhjh);
- release_journal_dev(p_s_sb, journal);
- return 1 ;
+ goto free_and_return;
}
SB_JOURNAL_TRANS_MAX(p_s_sb) = le32_to_cpu (jh->jh_journal.jp_journal_trans_max);
@@ -2064,7 +2068,6 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
brelse (bhjh);
-
SB_JOURNAL(p_s_sb)->j_list_bitmap_index = 0 ;
SB_JOURNAL_LIST_INDEX(p_s_sb) = -10000 ; /* make sure flush_old_commits does not try to flush a list while replay is on */
@@ -2075,12 +2078,8 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
memset(SB_JOURNAL(p_s_sb)->j_list_hash_table, 0, JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *)) ;
memset(journal_writers, 0, sizeof(char *) * 512) ; /* debug code */
- INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_bitmap_nodes) ;
INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_dirty_buffers) ;
spin_lock_init(&SB_JOURNAL(p_s_sb)->j_dirty_buffers_lock) ;
- reiserfs_allocate_list_bitmaps(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_bitmap,
- SB_BMAP_NR(p_s_sb)) ;
- allocate_bitmap_nodes(p_s_sb) ;
SB_JOURNAL(p_s_sb)->j_start = 0 ;
SB_JOURNAL(p_s_sb)->j_len = 0 ;
@@ -2107,20 +2106,15 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
SB_JOURNAL_LIST(p_s_sb)[0].j_list_bitmap = get_list_bitmap(p_s_sb, SB_JOURNAL_LIST(p_s_sb)) ;
if (!(SB_JOURNAL_LIST(p_s_sb)[0].j_list_bitmap)) {
reiserfs_warning("journal-2005, get_list_bitmap failed for journal list 0\n") ;
- release_journal_dev(p_s_sb, journal);
- return 1 ;
+ goto free_and_return;
}
if (journal_read(p_s_sb) < 0) {
reiserfs_warning("Replay Failure, unable to mount\n") ;
- free_journal_ram(p_s_sb) ;
- release_journal_dev(p_s_sb, journal);
- return 1 ;
+ goto free_and_return;
}
SB_JOURNAL_LIST_INDEX(p_s_sb) = 0 ; /* once the read is done, we can set this
where it belongs */
- INIT_LIST_HEAD (&SB_JOURNAL(p_s_sb)->j_prealloc_list);
-
if (reiserfs_dont_log (p_s_sb))
return 0;
@@ -2129,7 +2123,9 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
commit_wq = create_workqueue("reiserfs");
return 0 ;
-
+free_and_return:
+ free_journal_ram(p_s_sb);
+ return 1;
}
/*
diff --git a/fs/select.c b/fs/select.c
index 510e1defe964..ce46b5c90eb5 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -235,7 +235,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
}
__timeout = schedule_timeout(__timeout);
}
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
poll_freewait(&table);
@@ -425,7 +425,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list,
break;
timeout = schedule_timeout(timeout);
}
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
return count;
}
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 7d2b18a7bfe4..ba4d28168e01 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -1,7 +1,7 @@
/*
* linux/fs/seq_file.c
*
- * helper functions for making syntetic files from sequences of records.
+ * helper functions for making synthetic files from sequences of records.
* initial implementation -- AV, Oct 2001.
*/
@@ -215,7 +215,7 @@ loff_t seq_lseek(struct file *file, loff_t offset, int origin)
while ((retval=traverse(m, offset)) == -EAGAIN)
;
if (retval) {
- /* with extreme perjudice... */
+ /* with extreme prejudice... */
file->f_pos = 0;
m->index = 0;
m->count = 0;
diff --git a/fs/super.c b/fs/super.c
index 8ed04f0c4849..2bdc57573671 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -611,6 +611,7 @@ do_kern_mount(const char *fstype, int flags, char *name, void *data)
struct file_system_type *type = get_fs_type(fstype);
struct super_block *sb = ERR_PTR(-ENOMEM);
struct vfsmount *mnt;
+ int error;
if (!type)
return ERR_PTR(-ENODEV);
@@ -621,6 +622,9 @@ do_kern_mount(const char *fstype, int flags, char *name, void *data)
sb = type->get_sb(type, flags, name, data);
if (IS_ERR(sb))
goto out_mnt;
+ error = security_sb_kern_mount(sb);
+ if (error)
+ goto out_sb;
mnt->mnt_sb = sb;
mnt->mnt_root = dget(sb->s_root);
mnt->mnt_mountpoint = sb->s_root;
@@ -628,6 +632,10 @@ do_kern_mount(const char *fstype, int flags, char *name, void *data)
up_write(&sb->s_umount);
put_filesystem(type);
return mnt;
+out_sb:
+ up_write(&sb->s_umount);
+ deactivate_super(sb);
+ sb = ERR_PTR(error);
out_mnt:
free_vfsmnt(mnt);
out:
diff --git a/fs/ufs/util.c b/fs/ufs/util.c
index 41b5a8567eda..7656699c165d 100644
--- a/fs/ufs/util.c
+++ b/fs/ufs/util.c
@@ -48,6 +48,7 @@ struct ufs_buffer_head * _ubh_bread_ (struct ufs_sb_private_info * uspi,
failed:
for (j = 0; j < i; j++)
brelse (ubh->bh[j]);
+ kfree(ubh);
return NULL;
}