Skip to content

Commit 0f3278d

Browse files
author
Linus Torvalds
committed
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
2 parents 06024f2 + 15c84a4 commit 0f3278d

File tree

178 files changed

+5785
-11967
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+5785
-11967
lines changed

Documentation/filesystems/xfs.txt

Lines changed: 108 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,75 @@ Mount Options
1919

2020
When mounting an XFS filesystem, the following options are accepted.
2121

22-
biosize=size
23-
Sets the preferred buffered I/O size (default size is 64K).
24-
"size" must be expressed as the logarithm (base2) of the
25-
desired I/O size.
26-
Valid values for this option are 14 through 16, inclusive
27-
(i.e. 16K, 32K, and 64K bytes). On machines with a 4K
28-
pagesize, 13 (8K bytes) is also a valid size.
29-
The preferred buffered I/O size can also be altered on an
30-
individual file basis using the ioctl(2) system call.
22+
allocsize=size
23+
Sets the buffered I/O end-of-file preallocation size when
24+
doing delayed allocation writeout (default size is 64KiB).
25+
Valid values for this option are page size (typically 4KiB)
26+
through to 1GiB, inclusive, in power-of-2 increments.
27+
28+
attr2/noattr2
29+
The options enable/disable (default is disabled for backward
30+
compatibility on-disk) an "opportunistic" improvement to be
31+
made in the way inline extended attributes are stored on-disk.
32+
When the new form is used for the first time (by setting or
33+
removing extended attributes) the on-disk superblock feature
34+
bit field will be updated to reflect this format being in use.
35+
36+
barrier
37+
Enables the use of block layer write barriers for writes into
38+
the journal and unwritten extent conversion. This allows for
39+
drive level write caching to be enabled, for devices that
40+
support write barriers.
41+
42+
dmapi
43+
Enable the DMAPI (Data Management API) event callouts.
44+
Use with the "mtpt" option.
45+
46+
grpid/bsdgroups and nogrpid/sysvgroups
47+
These options define what group ID a newly created file gets.
48+
When grpid is set, it takes the group ID of the directory in
49+
which it is created; otherwise (the default) it takes the fsgid
50+
of the current process, unless the directory has the setgid bit
51+
set, in which case it takes the gid from the parent directory,
52+
and also gets the setgid bit set if it is a directory itself.
53+
54+
ihashsize=value
55+
Sets the number of hash buckets available for hashing the
56+
in-memory inodes of the specified mount point. If a value
57+
of zero is used, the value selected by the default algorithm
58+
will be displayed in /proc/mounts.
3159

3260
ikeep/noikeep
3361
When inode clusters are emptied of inodes, keep them around
3462
on the disk (ikeep) - this is the traditional XFS behaviour
3563
and is still the default for now. Using the noikeep option,
3664
inode clusters are returned to the free space pool.
3765

66+
inode64
67+
Indicates that XFS is allowed to create inodes at any location
68+
in the filesystem, including those which will result in inode
69+
numbers occupying more than 32 bits of significance. This is
70+
provided for backwards compatibility, but causes problems for
71+
backup applications that cannot handle large inode numbers.
72+
73+
largeio/nolargeio
74+
If "nolargeio" is specified, the optimal I/O reported in
75+
st_blksize by stat(2) will be as small as possible to allow user
76+
applications to avoid inefficient read/modify/write I/O.
77+
If "largeio" specified, a filesystem that has a "swidth" specified
78+
will return the "swidth" value (in bytes) in st_blksize. If the
79+
filesystem does not have a "swidth" specified but does specify
80+
an "allocsize" then "allocsize" (in bytes) will be returned
81+
instead.
82+
If neither of these two options are specified, then filesystem
83+
will behave as if "nolargeio" was specified.
84+
3885
logbufs=value
3986
Set the number of in-memory log buffers. Valid numbers range
4087
from 2-8 inclusive.
4188
The default value is 8 buffers for filesystems with a
42-
blocksize of 64K, 4 buffers for filesystems with a blocksize
43-
of 32K, 3 buffers for filesystems with a blocksize of 16K
89+
blocksize of 64KiB, 4 buffers for filesystems with a blocksize
90+
of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
4491
and 2 buffers for all other configurations. Increasing the
4592
number of buffers may increase performance on some workloads
4693
at the cost of the memory used for the additional log buffers
@@ -49,10 +96,10 @@ When mounting an XFS filesystem, the following options are accepted.
4996
logbsize=value
5097
Set the size of each in-memory log buffer.
5198
Size may be specified in bytes, or in kilobytes with a "k" suffix.
52-
Valid sizes for version 1 and version 2 logs are 16384 (16k) and
53-
32768 (32k). Valid sizes for version 2 logs also include
99+
Valid sizes for version 1 and version 2 logs are 16384 (16k) and
100+
32768 (32k). Valid sizes for version 2 logs also include
54101
65536 (64k), 131072 (128k) and 262144 (256k).
55-
The default value for machines with more than 32MB of memory
102+
The default value for machines with more than 32MiB of memory
56103
is 32768, machines with less memory use 16384 by default.
57104

58105
logdev=device and rtdev=device
@@ -62,6 +109,11 @@ When mounting an XFS filesystem, the following options are accepted.
62109
optional, and the log section can be separate from the data
63110
section or contained within it.
64111

112+
mtpt=mountpoint
113+
Use with the "dmapi" option. The value specified here will be
114+
included in the DMAPI mount event, and should be the path of
115+
the actual mountpoint that is used.
116+
65117
noalign
66118
Data allocations will not be aligned at stripe unit boundaries.
67119

@@ -91,13 +143,17 @@ When mounting an XFS filesystem, the following options are accepted.
91143
O_SYNC writes can be lost if the system crashes.
92144
If timestamp updates are critical, use the osyncisosync option.
93145

94-
quota/usrquota/uqnoenforce
146+
uquota/usrquota/uqnoenforce/quota
95147
User disk quota accounting enabled, and limits (optionally)
96-
enforced.
148+
enforced. Refer to xfs_quota(8) for further details.
97149

98-
grpquota/gqnoenforce
150+
gquota/grpquota/gqnoenforce
99151
Group disk quota accounting enabled and limits (optionally)
100-
enforced.
152+
enforced. Refer to xfs_quota(8) for further details.
153+
154+
pquota/prjquota/pqnoenforce
155+
Project disk quota accounting enabled and limits (optionally)
156+
enforced. Refer to xfs_quota(8) for further details.
101157

102158
sunit=value and swidth=value
103159
Used to specify the stripe unit and width for a RAID device or
@@ -113,15 +169,21 @@ When mounting an XFS filesystem, the following options are accepted.
113169
The "swidth" option is required if the "sunit" option has been
114170
specified, and must be a multiple of the "sunit" value.
115171

172+
swalloc
173+
Data allocations will be rounded up to stripe width boundaries
174+
when the current end of file is being extended and the file
175+
size is larger than the stripe width size.
176+
177+
116178
sysctls
117179
=======
118180

119181
The following sysctls are available for the XFS filesystem:
120182

121183
fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1)
122-
Setting this to "1" clears accumulated XFS statistics
184+
Setting this to "1" clears accumulated XFS statistics
123185
in /proc/fs/xfs/stat. It then immediately resets to "0".
124-
186+
125187
fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000)
126188
The interval at which the xfssyncd thread flushes metadata
127189
out to disk. This thread will flush log activity out, and
@@ -143,9 +205,9 @@ The following sysctls are available for the XFS filesystem:
143205
XFS_ERRLEVEL_HIGH: 5
144206

145207
fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127)
146-
Causes certain error conditions to call BUG(). Value is a bitmask;
208+
Causes certain error conditions to call BUG(). Value is a bitmask;
147209
AND together the tags which represent errors which should cause panics:
148-
210+
149211
XFS_NO_PTAG 0
150212
XFS_PTAG_IFLUSH 0x00000001
151213
XFS_PTAG_LOGRES 0x00000002
@@ -155,7 +217,7 @@ The following sysctls are available for the XFS filesystem:
155217
XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
156218
XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
157219

158-
This option is intended for debugging only.
220+
This option is intended for debugging only.
159221

160222
fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
161223
Controls whether symlinks are created with mode 0777 (default)
@@ -164,25 +226,37 @@ The following sysctls are available for the XFS filesystem:
164226
fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
165227
Controls files created in SGID directories.
166228
If the group ID of the new file does not match the effective group
167-
ID or one of the supplementary group IDs of the parent dir, the
168-
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
229+
ID or one of the supplementary group IDs of the parent dir, the
230+
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
169231
is set.
170232

171233
fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1)
172234
Controls whether unprivileged users can use chown to "give away"
173235
a file to another user.
174236

175-
fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1)
176-
Setting this to "1" will cause the "sync" flag set
177-
by the chattr(1) command on a directory to be
237+
fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
238+
Setting this to "1" will cause the "sync" flag set
239+
by the xfs_io(8) chattr command on a directory to be
178240
inherited by files in that directory.
179241

180-
fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1)
181-
Setting this to "1" will cause the "nodump" flag set
182-
by the chattr(1) command on a directory to be
242+
fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1)
243+
Setting this to "1" will cause the "nodump" flag set
244+
by the xfs_io(8) chattr command on a directory to be
183245
inherited by files in that directory.
184246

185-
fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1)
186-
Setting this to "1" will cause the "noatime" flag set
187-
by the chattr(1) command on a directory to be
247+
fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1)
248+
Setting this to "1" will cause the "noatime" flag set
249+
by the xfs_io(8) chattr command on a directory to be
188250
inherited by files in that directory.
251+
252+
fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1)
253+
Setting this to "1" will cause the "nosymlinks" flag set
254+
by the xfs_io(8) chattr command on a directory to be
255+
inherited by files in that directory.
256+
257+
fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256)
258+
In "inode32" allocation mode, this option determines how many
259+
files the allocator attempts to allocate in the same allocation
260+
group before moving to the next allocation group. The intent
261+
is to control the rate at which the allocator moves between
262+
allocation groups when allocating extents for new files.

fs/quota.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i
118118
if (!sb->s_qcop->get_xquota)
119119
return -ENOSYS;
120120
break;
121+
case Q_XQUOTASYNC:
122+
if (!sb->s_qcop->quota_sync)
123+
return -ENOSYS;
124+
break;
121125
default:
122126
return -EINVAL;
123127
}
@@ -128,7 +132,7 @@ static int xqm_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t i
128132
(type == XQM_GRPQUOTA && !in_egroup_p(id))) &&
129133
!capable(CAP_SYS_ADMIN))
130134
return -EPERM;
131-
} else if (cmd != Q_XGETQSTAT) {
135+
} else if (cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) {
132136
if (!capable(CAP_SYS_ADMIN))
133137
return -EPERM;
134138
}
@@ -322,6 +326,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void
322326
return -EFAULT;
323327
return 0;
324328
}
329+
case Q_XQUOTASYNC:
330+
return sb->s_qcop->quota_sync(sb, type);
325331
/* We never reach here unless validity check is broken */
326332
default:
327333
BUG();

fs/xfs/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ config XFS_EXPORT
2424
default y
2525

2626
config XFS_QUOTA
27-
tristate "XFS Quota support"
27+
bool "XFS Quota support"
2828
depends on XFS_FS
2929
help
3030
If you say Y here, you will be able to set limits for disk usage on

fs/xfs/Makefile-linux-2.6

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ xfs-y += xfs_alloc.o \
109109
xfs_dfrag.o \
110110
xfs_log.o \
111111
xfs_log_recover.o \
112-
xfs_macros.o \
113112
xfs_mount.o \
114113
xfs_rename.o \
115114
xfs_trans.o \

fs/xfs/linux-2.6/kmem.c

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,32 @@
11
/*
2-
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
2+
* Copyright (c) 2000-2005 Silicon Graphics, Inc.
3+
* All Rights Reserved.
34
*
4-
* This program is free software; you can redistribute it and/or modify it
5-
* under the terms of version 2 of the GNU General Public License as
5+
* This program is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
67
* published by the Free Software Foundation.
78
*
8-
* This program is distributed in the hope that it would be useful, but
9-
* WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9+
* This program is distributed in the hope that it would be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
1113
*
12-
* Further, this software is distributed without any warranty that it is
13-
* free of the rightful claim of any third person regarding infringement
14-
* or the like. Any license provided herein, whether implied or
15-
* otherwise, applies only to this software file. Patent licenses, if
16-
* any, provided herein do not apply to combinations of this program with
17-
* other software, or any other product whatsoever.
18-
*
19-
* You should have received a copy of the GNU General Public License along
20-
* with this program; if not, write the Free Software Foundation, Inc., 59
21-
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
22-
*
23-
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24-
* Mountain View, CA 94043, or:
25-
*
26-
* http://www.sgi.com
27-
*
28-
* For further information regarding this notice, see:
29-
*
30-
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write the Free Software Foundation,
16+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3117
*/
32-
3318
#include <linux/sched.h>
3419
#include <linux/mm.h>
3520
#include <linux/vmalloc.h>
3621
#include <linux/highmem.h>
3722
#include <linux/swap.h>
3823
#include <linux/blkdev.h>
39-
4024
#include "time.h"
4125
#include "kmem.h"
4226

4327
#define MAX_VMALLOCS 6
4428
#define MAX_SLAB_SIZE 0x20000
4529

46-
4730
void *
4831
kmem_alloc(size_t size, unsigned int __nocast flags)
4932
{

0 commit comments

Comments
 (0)