Loading Documentation/filesystems/xfs.txt +108 −34 Original line number Diff line number Diff line Loading @@ -19,15 +19,43 @@ Mount Options When mounting an XFS filesystem, the following options are accepted. biosize=size Sets the preferred buffered I/O size (default size is 64K). "size" must be expressed as the logarithm (base2) of the desired I/O size. Valid values for this option are 14 through 16, inclusive (i.e. 16K, 32K, and 64K bytes). On machines with a 4K pagesize, 13 (8K bytes) is also a valid size. The preferred buffered I/O size can also be altered on an individual file basis using the ioctl(2) system call. allocsize=size Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout (default size is 64KiB). Valid values for this option are page size (typically 4KiB) through to 1GiB, inclusive, in power-of-2 increments. attr2/noattr2 The options enable/disable (default is disabled for backward compatibility on-disk) an "opportunistic" improvement to be made in the way inline extended attributes are stored on-disk. When the new form is used for the first time (by setting or removing extended attributes) the on-disk superblock feature bit field will be updated to reflect this format being in use. barrier Enables the use of block layer write barriers for writes into the journal and unwritten extent conversion. This allows for drive level write caching to be enabled, for devices that support write barriers. dmapi Enable the DMAPI (Data Management API) event callouts. Use with the "mtpt" option. grpid/bsdgroups and nogrpid/sysvgroups These options define what group ID a newly created file gets. When grpid is set, it takes the group ID of the directory in which it is created; otherwise (the default) it takes the fsgid of the current process, unless the directory has the setgid bit set, in which case it takes the gid from the parent directory, and also gets the setgid bit set if it is a directory itself. ihashsize=value Sets the number of hash buckets available for hashing the in-memory inodes of the specified mount point. If a value of zero is used, the value selected by the default algorithm will be displayed in /proc/mounts. ikeep/noikeep When inode clusters are emptied of inodes, keep them around Loading @@ -35,12 +63,31 @@ When mounting an XFS filesystem, the following options are accepted. and is still the default for now. Using the noikeep option, inode clusters are returned to the free space pool. inode64 Indicates that XFS is allowed to create inodes at any location in the filesystem, including those which will result in inode numbers occupying more than 32 bits of significance. This is provided for backwards compatibility, but causes problems for backup applications that cannot handle large inode numbers. largeio/nolargeio If "nolargeio" is specified, the optimal I/O reported in st_blksize by stat(2) will be as small as possible to allow user applications to avoid inefficient read/modify/write I/O. If "largeio" specified, a filesystem that has a "swidth" specified will return the "swidth" value (in bytes) in st_blksize. If the filesystem does not have a "swidth" specified but does specify an "allocsize" then "allocsize" (in bytes) will be returned instead. If neither of these two options are specified, then filesystem will behave as if "nolargeio" was specified. logbufs=value Set the number of in-memory log buffers. Valid numbers range from 2-8 inclusive. The default value is 8 buffers for filesystems with a blocksize of 64K, 4 buffers for filesystems with a blocksize of 32K, 3 buffers for filesystems with a blocksize of 16K blocksize of 64KiB, 4 buffers for filesystems with a blocksize of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB and 2 buffers for all other configurations. Increasing the number of buffers may increase performance on some workloads at the cost of the memory used for the additional log buffers Loading @@ -52,7 +99,7 @@ When mounting an XFS filesystem, the following options are accepted. Valid sizes for version 1 and version 2 logs are 16384 (16k) and 32768 (32k). Valid sizes for version 2 logs also include 65536 (64k), 131072 (128k) and 262144 (256k). The default value for machines with more than 32MB of memory The default value for machines with more than 32MiB of memory is 32768, machines with less memory use 16384 by default. logdev=device and rtdev=device Loading @@ -62,6 +109,11 @@ When mounting an XFS filesystem, the following options are accepted. optional, and the log section can be separate from the data section or contained within it. mtpt=mountpoint Use with the "dmapi" option. The value specified here will be included in the DMAPI mount event, and should be the path of the actual mountpoint that is used. noalign Data allocations will not be aligned at stripe unit boundaries. Loading Loading @@ -91,13 +143,17 @@ When mounting an XFS filesystem, the following options are accepted. O_SYNC writes can be lost if the system crashes. If timestamp updates are critical, use the osyncisosync option. quota/usrquota/uqnoenforce uquota/usrquota/uqnoenforce/quota User disk quota accounting enabled, and limits (optionally) enforced. enforced. Refer to xfs_quota(8) for further details. grpquota/gqnoenforce gquota/grpquota/gqnoenforce Group disk quota accounting enabled and limits (optionally) enforced. enforced. Refer to xfs_quota(8) for further details. pquota/prjquota/pqnoenforce Project disk quota accounting enabled and limits (optionally) enforced. Refer to xfs_quota(8) for further details. sunit=value and swidth=value Used to specify the stripe unit and width for a RAID device or Loading @@ -113,6 +169,12 @@ When mounting an XFS filesystem, the following options are accepted. The "swidth" option is required if the "sunit" option has been specified, and must be a multiple of the "sunit" value. swalloc Data allocations will be rounded up to stripe width boundaries when the current end of file is being extended and the file size is larger than the stripe width size. sysctls ======= Loading Loading @@ -172,17 +234,29 @@ The following sysctls are available for the XFS filesystem: Controls whether unprivileged users can use chown to "give away" a file to another user. fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1) fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "sync" flag set by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1) fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "nodump" flag set by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1) fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "noatime" flag set by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "nosymlinks" flag set by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256) In "inode32" allocation mode, this option determines how many files the allocator attempts to allocate in the same allocation group before moving to the next allocation group. The intent is to control the rate at which the allocator moves between allocation groups when allocating extents for new files. fs/quota.c +7 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,10 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i if (!sb->s_qcop->get_xquota) return -ENOSYS; break; case Q_XQUOTASYNC: if (!sb->s_qcop->quota_sync) return -ENOSYS; break; default: return -EINVAL; } Loading @@ -128,7 +132,7 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i (type == XQM_GRPQUOTA && !in_egroup_p(id))) && !capable(CAP_SYS_ADMIN)) return -EPERM; } else if (cmd != Q_XGETQSTAT) { } else if (cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) { if (!capable(CAP_SYS_ADMIN)) return -EPERM; } Loading Loading @@ -322,6 +326,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void return -EFAULT; return 0; } case Q_XQUOTASYNC: return sb->s_qcop->quota_sync(sb, type); /* We never reach here unless validity check is broken */ default: BUG(); Loading fs/xfs/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ config XFS_EXPORT default y config XFS_QUOTA tristate "XFS Quota support" bool "XFS Quota support" depends on XFS_FS help If you say Y here, you will be able to set limits for disk usage on Loading fs/xfs/Makefile-linux-2.6 +0 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,6 @@ xfs-y += xfs_alloc.o \ xfs_dfrag.o \ xfs_log.o \ xfs_log_recover.o \ xfs_macros.o \ xfs_mount.o \ xfs_rename.o \ xfs_trans.o \ Loading fs/xfs/linux-2.6/kmem.c +11 −28 Original line number Diff line number Diff line /* * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Further, this software is distributed without any warranty that it is * free of the rightful claim of any third person regarding infringement * or the like. Any license provided herein, whether implied or * otherwise, applies only to this software file. Patent licenses, if * any, provided herein do not apply to combinations of this program with * other software, or any other product whatsoever. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ * You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <linux/sched.h> #include <linux/mm.h> #include <linux/vmalloc.h> #include <linux/highmem.h> #include <linux/swap.h> #include <linux/blkdev.h> #include "time.h" #include "kmem.h" #define MAX_VMALLOCS 6 #define MAX_SLAB_SIZE 0x20000 void * kmem_alloc(size_t size, unsigned int __nocast flags) { Loading Loading
Documentation/filesystems/xfs.txt +108 −34 Original line number Diff line number Diff line Loading @@ -19,15 +19,43 @@ Mount Options When mounting an XFS filesystem, the following options are accepted. biosize=size Sets the preferred buffered I/O size (default size is 64K). "size" must be expressed as the logarithm (base2) of the desired I/O size. Valid values for this option are 14 through 16, inclusive (i.e. 16K, 32K, and 64K bytes). On machines with a 4K pagesize, 13 (8K bytes) is also a valid size. The preferred buffered I/O size can also be altered on an individual file basis using the ioctl(2) system call. allocsize=size Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout (default size is 64KiB). Valid values for this option are page size (typically 4KiB) through to 1GiB, inclusive, in power-of-2 increments. attr2/noattr2 The options enable/disable (default is disabled for backward compatibility on-disk) an "opportunistic" improvement to be made in the way inline extended attributes are stored on-disk. When the new form is used for the first time (by setting or removing extended attributes) the on-disk superblock feature bit field will be updated to reflect this format being in use. barrier Enables the use of block layer write barriers for writes into the journal and unwritten extent conversion. This allows for drive level write caching to be enabled, for devices that support write barriers. dmapi Enable the DMAPI (Data Management API) event callouts. Use with the "mtpt" option. grpid/bsdgroups and nogrpid/sysvgroups These options define what group ID a newly created file gets. When grpid is set, it takes the group ID of the directory in which it is created; otherwise (the default) it takes the fsgid of the current process, unless the directory has the setgid bit set, in which case it takes the gid from the parent directory, and also gets the setgid bit set if it is a directory itself. ihashsize=value Sets the number of hash buckets available for hashing the in-memory inodes of the specified mount point. If a value of zero is used, the value selected by the default algorithm will be displayed in /proc/mounts. ikeep/noikeep When inode clusters are emptied of inodes, keep them around Loading @@ -35,12 +63,31 @@ When mounting an XFS filesystem, the following options are accepted. and is still the default for now. Using the noikeep option, inode clusters are returned to the free space pool. inode64 Indicates that XFS is allowed to create inodes at any location in the filesystem, including those which will result in inode numbers occupying more than 32 bits of significance. This is provided for backwards compatibility, but causes problems for backup applications that cannot handle large inode numbers. largeio/nolargeio If "nolargeio" is specified, the optimal I/O reported in st_blksize by stat(2) will be as small as possible to allow user applications to avoid inefficient read/modify/write I/O. If "largeio" specified, a filesystem that has a "swidth" specified will return the "swidth" value (in bytes) in st_blksize. If the filesystem does not have a "swidth" specified but does specify an "allocsize" then "allocsize" (in bytes) will be returned instead. If neither of these two options are specified, then filesystem will behave as if "nolargeio" was specified. logbufs=value Set the number of in-memory log buffers. Valid numbers range from 2-8 inclusive. The default value is 8 buffers for filesystems with a blocksize of 64K, 4 buffers for filesystems with a blocksize of 32K, 3 buffers for filesystems with a blocksize of 16K blocksize of 64KiB, 4 buffers for filesystems with a blocksize of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB and 2 buffers for all other configurations. Increasing the number of buffers may increase performance on some workloads at the cost of the memory used for the additional log buffers Loading @@ -52,7 +99,7 @@ When mounting an XFS filesystem, the following options are accepted. Valid sizes for version 1 and version 2 logs are 16384 (16k) and 32768 (32k). Valid sizes for version 2 logs also include 65536 (64k), 131072 (128k) and 262144 (256k). The default value for machines with more than 32MB of memory The default value for machines with more than 32MiB of memory is 32768, machines with less memory use 16384 by default. logdev=device and rtdev=device Loading @@ -62,6 +109,11 @@ When mounting an XFS filesystem, the following options are accepted. optional, and the log section can be separate from the data section or contained within it. mtpt=mountpoint Use with the "dmapi" option. The value specified here will be included in the DMAPI mount event, and should be the path of the actual mountpoint that is used. noalign Data allocations will not be aligned at stripe unit boundaries. Loading Loading @@ -91,13 +143,17 @@ When mounting an XFS filesystem, the following options are accepted. O_SYNC writes can be lost if the system crashes. If timestamp updates are critical, use the osyncisosync option. quota/usrquota/uqnoenforce uquota/usrquota/uqnoenforce/quota User disk quota accounting enabled, and limits (optionally) enforced. enforced. Refer to xfs_quota(8) for further details. grpquota/gqnoenforce gquota/grpquota/gqnoenforce Group disk quota accounting enabled and limits (optionally) enforced. enforced. Refer to xfs_quota(8) for further details. pquota/prjquota/pqnoenforce Project disk quota accounting enabled and limits (optionally) enforced. Refer to xfs_quota(8) for further details. sunit=value and swidth=value Used to specify the stripe unit and width for a RAID device or Loading @@ -113,6 +169,12 @@ When mounting an XFS filesystem, the following options are accepted. The "swidth" option is required if the "sunit" option has been specified, and must be a multiple of the "sunit" value. swalloc Data allocations will be rounded up to stripe width boundaries when the current end of file is being extended and the file size is larger than the stripe width size. sysctls ======= Loading Loading @@ -172,17 +234,29 @@ The following sysctls are available for the XFS filesystem: Controls whether unprivileged users can use chown to "give away" a file to another user. fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1) fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "sync" flag set by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1) fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "nodump" flag set by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1) fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "noatime" flag set by the chattr(1) command on a directory to be by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1) Setting this to "1" will cause the "nosymlinks" flag set by the xfs_io(8) chattr command on a directory to be inherited by files in that directory. fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256) In "inode32" allocation mode, this option determines how many files the allocator attempts to allocate in the same allocation group before moving to the next allocation group. The intent is to control the rate at which the allocator moves between allocation groups when allocating extents for new files.
fs/quota.c +7 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,10 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i if (!sb->s_qcop->get_xquota) return -ENOSYS; break; case Q_XQUOTASYNC: if (!sb->s_qcop->quota_sync) return -ENOSYS; break; default: return -EINVAL; } Loading @@ -128,7 +132,7 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i (type == XQM_GRPQUOTA && !in_egroup_p(id))) && !capable(CAP_SYS_ADMIN)) return -EPERM; } else if (cmd != Q_XGETQSTAT) { } else if (cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) { if (!capable(CAP_SYS_ADMIN)) return -EPERM; } Loading Loading @@ -322,6 +326,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void return -EFAULT; return 0; } case Q_XQUOTASYNC: return sb->s_qcop->quota_sync(sb, type); /* We never reach here unless validity check is broken */ default: BUG(); Loading
fs/xfs/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ config XFS_EXPORT default y config XFS_QUOTA tristate "XFS Quota support" bool "XFS Quota support" depends on XFS_FS help If you say Y here, you will be able to set limits for disk usage on Loading
fs/xfs/Makefile-linux-2.6 +0 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,6 @@ xfs-y += xfs_alloc.o \ xfs_dfrag.o \ xfs_log.o \ xfs_log_recover.o \ xfs_macros.o \ xfs_mount.o \ xfs_rename.o \ xfs_trans.o \ Loading
fs/xfs/linux-2.6/kmem.c +11 −28 Original line number Diff line number Diff line /* * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Further, this software is distributed without any warranty that it is * free of the rightful claim of any third person regarding infringement * or the like. Any license provided herein, whether implied or * otherwise, applies only to this software file. Patent licenses, if * any, provided herein do not apply to combinations of this program with * other software, or any other product whatsoever. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ * You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <linux/sched.h> #include <linux/mm.h> #include <linux/vmalloc.h> #include <linux/highmem.h> #include <linux/swap.h> #include <linux/blkdev.h> #include "time.h" #include "kmem.h" #define MAX_VMALLOCS 6 #define MAX_SLAB_SIZE 0x20000 void * kmem_alloc(size_t size, unsigned int __nocast flags) { Loading