aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFelix Blyakher <felixb@sgi.com>2009-02-03 11:38:41 -0500
committerFelix Blyakher <felixb@sgi.com>2009-02-03 11:38:41 -0500
commit6d2160bfe7826aca1c94b4bca77093908a452ae7 (patch)
tree8153fcd8a7c467e5de136f312e8ef5b27bea9d6b /fs
parentf0e0059b9c18426cffdcc04161062251a8f9741e (diff)
parentb1792e367053968f2ddb48bc911d314143ce6242 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/Kconfig10
-rw-r--r--fs/Kconfig1401
-rw-r--r--fs/adfs/Kconfig27
-rw-r--r--fs/affs/Kconfig21
-rw-r--r--fs/afs/Kconfig21
-rw-r--r--fs/autofs/Kconfig21
-rw-r--r--fs/autofs4/Kconfig20
-rw-r--r--fs/befs/Kconfig26
-rw-r--r--fs/bfs/Kconfig19
-rw-r--r--fs/bio-integrity.c26
-rw-r--r--fs/btrfs/Kconfig18
-rw-r--r--fs/cifs/CHANGES4
-rw-r--r--fs/cifs/cifsencrypt.c18
-rw-r--r--fs/cifs/cifsproto.h4
-rw-r--r--fs/cifs/connect.c24
-rw-r--r--fs/cifs/dir.c56
-rw-r--r--fs/cifs/inode.c5
-rw-r--r--fs/cifs/md5.c38
-rw-r--r--fs/cifs/md5.h6
-rw-r--r--fs/cifs/transport.c127
-rw-r--r--fs/coda/Kconfig21
-rw-r--r--fs/compat_ioctl.c7
-rw-r--r--fs/configfs/Kconfig11
-rw-r--r--fs/cramfs/Kconfig19
-rw-r--r--fs/dlm/plock.c6
-rw-r--r--fs/dquot.c218
-rw-r--r--fs/ecryptfs/Kconfig11
-rw-r--r--fs/efs/Kconfig14
-rw-r--r--fs/eventpoll.c22
-rw-r--r--fs/ext3/namei.c20
-rw-r--r--fs/ext4/balloc.c6
-rw-r--r--fs/ext4/ext4.h7
-rw-r--r--fs/ext4/extents.c2
-rw-r--r--fs/ext4/inode.c9
-rw-r--r--fs/ext4/mballoc.c2
-rw-r--r--fs/ext4/namei.c21
-rw-r--r--fs/ext4/resize.c3
-rw-r--r--fs/fat/Kconfig97
-rw-r--r--fs/freevxfs/Kconfig16
-rw-r--r--fs/fuse/Kconfig15
-rw-r--r--fs/fuse/dev.c16
-rw-r--r--fs/fuse/file.c2
-rw-r--r--fs/fuse/inode.c30
-rw-r--r--fs/hfs/Kconfig12
-rw-r--r--fs/hfsplus/Kconfig13
-rw-r--r--fs/hpfs/Kconfig14
-rw-r--r--fs/isofs/Kconfig39
-rw-r--r--fs/jbd2/journal.c6
-rw-r--r--fs/jfs/Kconfig49
-rw-r--r--fs/minix/Kconfig17
-rw-r--r--fs/ncpfs/Kconfig21
-rw-r--r--fs/nfs/Kconfig86
-rw-r--r--fs/nfsd/Kconfig80
-rw-r--r--fs/nfsd/auth.c3
-rw-r--r--fs/nfsd/nfs4state.c1
-rw-r--r--fs/notify/inotify/inotify_user.c135
-rw-r--r--fs/ntfs/Kconfig78
-rw-r--r--fs/ocfs2/Kconfig85
-rw-r--r--fs/ocfs2/quota_global.c169
-rw-r--r--fs/omfs/Kconfig13
-rw-r--r--fs/qnx4/Kconfig25
-rw-r--r--fs/reiserfs/Kconfig85
-rw-r--r--fs/romfs/Kconfig16
-rw-r--r--fs/smbfs/Kconfig55
-rw-r--r--fs/squashfs/Kconfig51
-rw-r--r--fs/sysfs/Kconfig23
-rw-r--r--fs/sysfs/bin.c6
-rw-r--r--fs/sysv/Kconfig36
-rw-r--r--fs/udf/Kconfig18
-rw-r--r--fs/ufs/Kconfig43
70 files changed, 1719 insertions, 1927 deletions
diff --git a/fs/9p/Kconfig b/fs/9p/Kconfig
new file mode 100644
index 000000000000..74e0723e90bc
--- /dev/null
+++ b/fs/9p/Kconfig
@@ -0,0 +1,10 @@
1config 9P_FS
2 tristate "Plan 9 Resource Sharing Support (9P2000) (Experimental)"
3 depends on INET && NET_9P && EXPERIMENTAL
4 help
5 If you say Y here, you will get experimental support for
6 Plan 9 resource sharing via the 9P2000 protocol.
7
8 See <http://v9fs.sf.net> for more information.
9
10 If unsure, say N.
diff --git a/fs/Kconfig b/fs/Kconfig
index 51307b0fdf0f..93945dd0b1ae 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -27,141 +27,8 @@ config FS_MBCACHE
27 default y if EXT4_FS=y && EXT4_FS_XATTR 27 default y if EXT4_FS=y && EXT4_FS_XATTR
28 default m if EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4_FS_XATTR 28 default m if EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4_FS_XATTR
29 29
30config REISERFS_FS 30source "fs/reiserfs/Kconfig"
31 tristate "Reiserfs support" 31source "fs/jfs/Kconfig"
32 help
33 Stores not just filenames but the files themselves in a balanced
34 tree. Uses journalling.
35
36 Balanced trees are more efficient than traditional file system
37 architectural foundations.
38
39 In general, ReiserFS is as fast as ext2, but is very efficient with
40 large directories and small files. Additional patches are needed
41 for NFS and quotas, please see <http://www.namesys.com/> for links.
42
43 It is more easily extended to have features currently found in
44 database and keyword search systems than block allocation based file
45 systems are. The next version will be so extended, and will support
46 plugins consistent with our motto ``It takes more than a license to
47 make source code open.''
48
49 Read <http://www.namesys.com/> to learn more about reiserfs.
50
51 Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com.
52
53 If you like it, you can pay us to add new features to it that you
54 need, buy a support contract, or pay us to port it to another OS.
55
56config REISERFS_CHECK
57 bool "Enable reiserfs debug mode"
58 depends on REISERFS_FS
59 help
60 If you set this to Y, then ReiserFS will perform every check it can
61 possibly imagine of its internal consistency throughout its
62 operation. It will also go substantially slower. More than once we
63 have forgotten that this was on, and then gone despondent over the
64 latest benchmarks.:-) Use of this option allows our team to go all
65 out in checking for consistency when debugging without fear of its
66 effect on end users. If you are on the verge of sending in a bug
67 report, say Y and you might get a useful error message. Almost
68 everyone should say N.
69
70config REISERFS_PROC_INFO
71 bool "Stats in /proc/fs/reiserfs"
72 depends on REISERFS_FS && PROC_FS
73 help
74 Create under /proc/fs/reiserfs a hierarchy of files, displaying
75 various ReiserFS statistics and internal data at the expense of
76 making your kernel or module slightly larger (+8 KB). This also
77 increases the amount of kernel memory required for each mount.
78 Almost everyone but ReiserFS developers and people fine-tuning
79 reiserfs or tracing problems should say N.
80
81config REISERFS_FS_XATTR
82 bool "ReiserFS extended attributes"
83 depends on REISERFS_FS
84 help
85 Extended attributes are name:value pairs associated with inodes by
86 the kernel or by users (see the attr(5) manual page, or visit
87 <http://acl.bestbits.at/> for details).
88
89 If unsure, say N.
90
91config REISERFS_FS_POSIX_ACL
92 bool "ReiserFS POSIX Access Control Lists"
93 depends on REISERFS_FS_XATTR
94 select FS_POSIX_ACL
95 help
96 Posix Access Control Lists (ACLs) support permissions for users and
97 groups beyond the owner/group/world scheme.
98
99 To learn more about Access Control Lists, visit the Posix ACLs for
100 Linux website <http://acl.bestbits.at/>.
101
102 If you don't know what Access Control Lists are, say N
103
104config REISERFS_FS_SECURITY
105 bool "ReiserFS Security Labels"
106 depends on REISERFS_FS_XATTR
107 help
108 Security labels support alternative access control models
109 implemented by security modules like SELinux. This option
110 enables an extended attribute handler for file security
111 labels in the ReiserFS filesystem.
112
113 If you are not using a security module that requires using
114 extended attributes for file security labels, say N.
115
116config JFS_FS
117 tristate "JFS filesystem support"
118 select NLS
119 help
120 This is a port of IBM's Journaled Filesystem . More information is
121 available in the file <file:Documentation/filesystems/jfs.txt>.
122
123 If you do not intend to use the JFS filesystem, say N.
124
125config JFS_POSIX_ACL
126 bool "JFS POSIX Access Control Lists"
127 depends on JFS_FS
128 select FS_POSIX_ACL
129 help
130 Posix Access Control Lists (ACLs) support permissions for users and
131 groups beyond the owner/group/world scheme.
132
133 To learn more about Access Control Lists, visit the Posix ACLs for
134 Linux website <http://acl.bestbits.at/>.
135
136 If you don't know what Access Control Lists are, say N
137
138config JFS_SECURITY
139 bool "JFS Security Labels"
140 depends on JFS_FS
141 help
142 Security labels support alternative access control models
143 implemented by security modules like SELinux. This option
144 enables an extended attribute handler for file security
145 labels in the jfs filesystem.
146
147 If you are not using a security module that requires using
148 extended attributes for file security labels, say N.
149
150config JFS_DEBUG
151 bool "JFS debugging"
152 depends on JFS_FS
153 help
154 If you are experiencing any problems with the JFS filesystem, say
155 Y here. This will result in additional debugging messages to be
156 written to the system log. Under normal circumstances, this
157 results in very little overhead.
158
159config JFS_STATISTICS
160 bool "JFS statistics"
161 depends on JFS_FS
162 help
163 Enabling this option will cause statistics from the JFS file system
164 to be made available to the user in the /proc/fs/jfs/ directory.
165 32
166config FS_POSIX_ACL 33config FS_POSIX_ACL
167# Posix ACL utility routines (for now, only ext2/ext3/jfs/reiserfs/nfs4) 34# Posix ACL utility routines (for now, only ext2/ext3/jfs/reiserfs/nfs4)
@@ -182,111 +49,8 @@ config FILE_LOCKING
182 49
183source "fs/xfs/Kconfig" 50source "fs/xfs/Kconfig"
184source "fs/gfs2/Kconfig" 51source "fs/gfs2/Kconfig"
185 52source "fs/ocfs2/Kconfig"
186config OCFS2_FS 53source "fs/btrfs/Kconfig"
187 tristate "OCFS2 file system support"
188 depends on NET && SYSFS
189 select CONFIGFS_FS
190 select JBD2
191 select CRC32
192 select QUOTA
193 select QUOTA_TREE
194 help
195 OCFS2 is a general purpose extent based shared disk cluster file
196 system with many similarities to ext3. It supports 64 bit inode
197 numbers, and has automatically extending metadata groups which may
198 also make it attractive for non-clustered use.
199
200 You'll want to install the ocfs2-tools package in order to at least
201 get "mount.ocfs2".
202
203 Project web page: http://oss.oracle.com/projects/ocfs2
204 Tools web page: http://oss.oracle.com/projects/ocfs2-tools
205 OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
206
207 For more information on OCFS2, see the file
208 <file:Documentation/filesystems/ocfs2.txt>.
209
210config OCFS2_FS_O2CB
211 tristate "O2CB Kernelspace Clustering"
212 depends on OCFS2_FS
213 default y
214 help
215 OCFS2 includes a simple kernelspace clustering package, the OCFS2
216 Cluster Base. It only requires a very small userspace component
217 to configure it. This comes with the standard ocfs2-tools package.
218 O2CB is limited to maintaining a cluster for OCFS2 file systems.
219 It cannot manage any other cluster applications.
220
221 It is always safe to say Y here, as the clustering method is
222 run-time selectable.
223
224config OCFS2_FS_USERSPACE_CLUSTER
225 tristate "OCFS2 Userspace Clustering"
226 depends on OCFS2_FS && DLM
227 default y
228 help
229 This option will allow OCFS2 to use userspace clustering services
230 in conjunction with the DLM in fs/dlm. If you are using a
231 userspace cluster manager, say Y here.
232
233 It is safe to say Y, as the clustering method is run-time
234 selectable.
235
236config OCFS2_FS_STATS
237 bool "OCFS2 statistics"
238 depends on OCFS2_FS
239 default y
240 help
241 This option allows some fs statistics to be captured. Enabling
242 this option may increase the memory consumption.
243
244config OCFS2_DEBUG_MASKLOG
245 bool "OCFS2 logging support"
246 depends on OCFS2_FS
247 default y
248 help
249 The ocfs2 filesystem has an extensive logging system. The system
250 allows selection of events to log via files in /sys/o2cb/logmask/.
251 This option will enlarge your kernel, but it allows debugging of
252 ocfs2 filesystem issues.
253
254config OCFS2_DEBUG_FS
255 bool "OCFS2 expensive checks"
256 depends on OCFS2_FS
257 default n
258 help
259 This option will enable expensive consistency checks. Enable
260 this option for debugging only as it is likely to decrease
261 performance of the filesystem.
262
263config OCFS2_FS_POSIX_ACL
264 bool "OCFS2 POSIX Access Control Lists"
265 depends on OCFS2_FS
266 select FS_POSIX_ACL
267 default n
268 help
269 Posix Access Control Lists (ACLs) support permissions for users and
270 groups beyond the owner/group/world scheme.
271
272config BTRFS_FS
273 tristate "Btrfs filesystem (EXPERIMENTAL) Unstable disk format"
274 depends on EXPERIMENTAL
275 select LIBCRC32C
276 select ZLIB_INFLATE
277 select ZLIB_DEFLATE
278 help
279 Btrfs is a new filesystem with extents, writable snapshotting,
280 support for multiple devices and many more features.
281
282 Btrfs is highly experimental, and THE DISK FORMAT IS NOT YET
283 FINALIZED. You should say N here unless you are interested in
284 testing Btrfs with non-critical data.
285
286 To compile this file system support as a module, choose M here. The
287 module will be called btrfs.
288
289 If unsure, say N.
290 54
291endif # BLOCK 55endif # BLOCK
292 56
@@ -348,64 +112,9 @@ config QUOTACTL
348 depends on XFS_QUOTA || QUOTA 112 depends on XFS_QUOTA || QUOTA
349 default y 113 default y
350 114
351config AUTOFS_FS 115source "fs/autofs/Kconfig"
352 tristate "Kernel automounter support" 116source "fs/autofs4/Kconfig"
353 help 117source "fs/fuse/Kconfig"
354 The automounter is a tool to automatically mount remote file systems
355 on demand. This implementation is partially kernel-based to reduce
356 overhead in the already-mounted case; this is unlike the BSD
357 automounter (amd), which is a pure user space daemon.
358
359 To use the automounter you need the user-space tools from the autofs
360 package; you can find the location in <file:Documentation/Changes>.
361 You also want to answer Y to "NFS file system support", below.
362
363 If you want to use the newer version of the automounter with more
364 features, say N here and say Y to "Kernel automounter v4 support",
365 below.
366
367 To compile this support as a module, choose M here: the module will be
368 called autofs.
369
370 If you are not a part of a fairly large, distributed network, you
371 probably do not need an automounter, and can say N here.
372
373config AUTOFS4_FS
374 tristate "Kernel automounter version 4 support (also supports v3)"
375 help
376 The automounter is a tool to automatically mount remote file systems
377 on demand. This implementation is partially kernel-based to reduce
378 overhead in the already-mounted case; this is unlike the BSD
379 automounter (amd), which is a pure user space daemon.
380
381 To use the automounter you need the user-space tools from
382 <ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/>; you also
383 want to answer Y to "NFS file system support", below.
384
385 To compile this support as a module, choose M here: the module will be
386 called autofs4. You will need to add "alias autofs autofs4" to your
387 modules configuration file.
388
389 If you are not a part of a fairly large, distributed network or
390 don't have a laptop which needs to dynamically reconfigure to the
391 local network, you probably do not need an automounter, and can say
392 N here.
393
394config FUSE_FS
395 tristate "FUSE (Filesystem in Userspace) support"
396 help
397 With FUSE it is possible to implement a fully functional filesystem
398 in a userspace program.
399
400 There's also companion library: libfuse. This library along with
401 utilities is available from the FUSE homepage:
402 <http://fuse.sourceforge.net/>
403
404 See <file:Documentation/filesystems/fuse.txt> for more information.
405 See <file:Documentation/Changes> for needed library/utility version.
406
407 If you want to develop a userspace FS, or if you want to use
408 a filesystem based on FUSE, answer Y or M.
409 118
410config GENERIC_ACL 119config GENERIC_ACL
411 bool 120 bool
@@ -414,64 +123,8 @@ config GENERIC_ACL
414if BLOCK 123if BLOCK
415menu "CD-ROM/DVD Filesystems" 124menu "CD-ROM/DVD Filesystems"
416 125
417config ISO9660_FS 126source "fs/isofs/Kconfig"
418 tristate "ISO 9660 CDROM file system support" 127source "fs/udf/Kconfig"
419 help
420 This is the standard file system used on CD-ROMs. It was previously
421 known as "High Sierra File System" and is called "hsfs" on other
422 Unix systems. The so-called Rock-Ridge extensions which allow for
423 long Unix filenames and symbolic links are also supported by this
424 driver. If you have a CD-ROM drive and want to do more with it than
425 just listen to audio CDs and watch its LEDs, say Y (and read
426 <file:Documentation/filesystems/isofs.txt> and the CD-ROM-HOWTO,
427 available from <http://www.tldp.org/docs.html#howto>), thereby
428 enlarging your kernel by about 27 KB; otherwise say N.
429
430 To compile this file system support as a module, choose M here: the
431 module will be called isofs.
432
433config JOLIET
434 bool "Microsoft Joliet CDROM extensions"
435 depends on ISO9660_FS
436 select NLS
437 help
438 Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
439 which allows for long filenames in unicode format (unicode is the
440 new 16 bit character code, successor to ASCII, which encodes the
441 characters of almost all languages of the world; see
442 <http://www.unicode.org/> for more information). Say Y here if you
443 want to be able to read Joliet CD-ROMs under Linux.
444
445config ZISOFS
446 bool "Transparent decompression extension"
447 depends on ISO9660_FS
448 select ZLIB_INFLATE
449 help
450 This is a Linux-specific extension to RockRidge which lets you store
451 data in compressed form on a CD-ROM and have it transparently
452 decompressed when the CD-ROM is accessed. See
453 <http://www.kernel.org/pub/linux/utils/fs/zisofs/> for the tools
454 necessary to create such a filesystem. Say Y here if you want to be
455 able to read such compressed CD-ROMs.
456
457config UDF_FS
458 tristate "UDF file system support"
459 select CRC_ITU_T
460 help
461 This is the new file system used on some CD-ROMs and DVDs. Say Y if
462 you intend to mount DVD discs or CDRW's written in packet mode, or
463 if written to by other UDF utilities, such as DirectCD.
464 Please read <file:Documentation/filesystems/udf.txt>.
465
466 To compile this file system support as a module, choose M here: the
467 module will be called udf.
468
469 If unsure, say N.
470
471config UDF_NLS
472 bool
473 default y
474 depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y)
475 128
476endmenu 129endmenu
477endif # BLOCK 130endif # BLOCK
@@ -479,182 +132,8 @@ endif # BLOCK
479if BLOCK 132if BLOCK
480menu "DOS/FAT/NT Filesystems" 133menu "DOS/FAT/NT Filesystems"
481 134
482config FAT_FS 135source "fs/fat/Kconfig"
483 tristate 136source "fs/ntfs/Kconfig"
484 select NLS
485 help
486 If you want to use one of the FAT-based file systems (the MS-DOS and
487 VFAT (Windows 95) file systems), then you must say Y or M here
488 to include FAT support. You will then be able to mount partitions or
489 diskettes with FAT-based file systems and transparently access the
490 files on them, i.e. MSDOS files will look and behave just like all
491 other Unix files.
492
493 This FAT support is not a file system in itself, it only provides
494 the foundation for the other file systems. You will have to say Y or
495 M to at least one of "MSDOS fs support" or "VFAT fs support" in
496 order to make use of it.
497
498 Another way to read and write MSDOS floppies and hard drive
499 partitions from within Linux (but not transparently) is with the
500 mtools ("man mtools") program suite. You don't need to say Y here in
501 order to do that.
502
503 If you need to move large files on floppies between a DOS and a
504 Linux box, say Y here, mount the floppy under Linux with an MSDOS
505 file system and use GNU tar's M option. GNU tar is a program
506 available for Unix and DOS ("man tar" or "info tar").
507
508 The FAT support will enlarge your kernel by about 37 KB. If unsure,
509 say Y.
510
511 To compile this as a module, choose M here: the module will be called
512 fat. Note that if you compile the FAT support as a module, you
513 cannot compile any of the FAT-based file systems into the kernel
514 -- they will have to be modules as well.
515
516config MSDOS_FS
517 tristate "MSDOS fs support"
518 select FAT_FS
519 help
520 This allows you to mount MSDOS partitions of your hard drive (unless
521 they are compressed; to access compressed MSDOS partitions under
522 Linux, you can either use the DOS emulator DOSEMU, described in the
523 DOSEMU-HOWTO, available from
524 <http://www.tldp.org/docs.html#howto>, or try dmsdosfs in
525 <ftp://ibiblio.org/pub/Linux/system/filesystems/dosfs/>. If you
526 intend to use dosemu with a non-compressed MSDOS partition, say Y
527 here) and MSDOS floppies. This means that file access becomes
528 transparent, i.e. the MSDOS files look and behave just like all
529 other Unix files.
530
531 If you have Windows 95 or Windows NT installed on your MSDOS
532 partitions, you should use the VFAT file system (say Y to "VFAT fs
533 support" below), or you will not be able to see the long filenames
534 generated by Windows 95 / Windows NT.
535
536 This option will enlarge your kernel by about 7 KB. If unsure,
537 answer Y. This will only work if you said Y to "DOS FAT fs support"
538 as well. To compile this as a module, choose M here: the module will
539 be called msdos.
540
541config VFAT_FS
542 tristate "VFAT (Windows-95) fs support"
543 select FAT_FS
544 help
545 This option provides support for normal Windows file systems with
546 long filenames. That includes non-compressed FAT-based file systems
547 used by Windows 95, Windows 98, Windows NT 4.0, and the Unix
548 programs from the mtools package.
549
550 The VFAT support enlarges your kernel by about 10 KB and it only
551 works if you said Y to the "DOS FAT fs support" above. Please read
552 the file <file:Documentation/filesystems/vfat.txt> for details. If
553 unsure, say Y.
554
555 To compile this as a module, choose M here: the module will be called
556 vfat.
557
558config FAT_DEFAULT_CODEPAGE
559 int "Default codepage for FAT"
560 depends on MSDOS_FS || VFAT_FS
561 default 437
562 help
563 This option should be set to the codepage of your FAT filesystems.
564 It can be overridden with the "codepage" mount option.
565 See <file:Documentation/filesystems/vfat.txt> for more information.
566
567config FAT_DEFAULT_IOCHARSET
568 string "Default iocharset for FAT"
569 depends on VFAT_FS
570 default "iso8859-1"
571 help
572 Set this to the default input/output character set you'd
573 like FAT to use. It should probably match the character set
574 that most of your FAT filesystems use, and can be overridden
575 with the "iocharset" mount option for FAT filesystems.
576 Note that "utf8" is not recommended for FAT filesystems.
577 If unsure, you shouldn't set "utf8" here.
578 See <file:Documentation/filesystems/vfat.txt> for more information.
579
580config NTFS_FS
581 tristate "NTFS file system support"
582 select NLS
583 help
584 NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003.
585
586 Saying Y or M here enables read support. There is partial, but
587 safe, write support available. For write support you must also
588 say Y to "NTFS write support" below.
589
590 There are also a number of user-space tools available, called
591 ntfsprogs. These include ntfsundelete and ntfsresize, that work
592 without NTFS support enabled in the kernel.
593
594 This is a rewrite from scratch of Linux NTFS support and replaced
595 the old NTFS code starting with Linux 2.5.11. A backport to
596 the Linux 2.4 kernel series is separately available as a patch
597 from the project web site.
598
599 For more information see <file:Documentation/filesystems/ntfs.txt>
600 and <http://www.linux-ntfs.org/>.
601
602 To compile this file system support as a module, choose M here: the
603 module will be called ntfs.
604
605 If you are not using Windows NT, 2000, XP or 2003 in addition to
606 Linux on your computer it is safe to say N.
607
608config NTFS_DEBUG
609 bool "NTFS debugging support"
610 depends on NTFS_FS
611 help
612 If you are experiencing any problems with the NTFS file system, say
613 Y here. This will result in additional consistency checks to be
614 performed by the driver as well as additional debugging messages to
615 be written to the system log. Note that debugging messages are
616 disabled by default. To enable them, supply the option debug_msgs=1
617 at the kernel command line when booting the kernel or as an option
618 to insmod when loading the ntfs module. Once the driver is active,
619 you can enable debugging messages by doing (as root):
620 echo 1 > /proc/sys/fs/ntfs-debug
621 Replacing the "1" with "0" would disable debug messages.
622
623 If you leave debugging messages disabled, this results in little
624 overhead, but enabling debug messages results in very significant
625 slowdown of the system.
626
627 When reporting bugs, please try to have available a full dump of
628 debugging messages while the misbehaviour was occurring.
629
630config NTFS_RW
631 bool "NTFS write support"
632 depends on NTFS_FS
633 help
634 This enables the partial, but safe, write support in the NTFS driver.
635
636 The only supported operation is overwriting existing files, without
637 changing the file length. No file or directory creation, deletion or
638 renaming is possible. Note only non-resident files can be written to
639 so you may find that some very small files (<500 bytes or so) cannot
640 be written to.
641
642 While we cannot guarantee that it will not damage any data, we have
643 so far not received a single report where the driver would have
644 damaged someones data so we assume it is perfectly safe to use.
645
646 Note: While write support is safe in this version (a rewrite from
647 scratch of the NTFS support), it should be noted that the old NTFS
648 write support, included in Linux 2.5.10 and before (since 1997),
649 is not safe.
650
651 This is currently useful with TopologiLinux. TopologiLinux is run
652 on top of any DOS/Microsoft Windows system without partitioning your
653 hard disk. Unlike other Linux distributions TopologiLinux does not
654 need its own partition. For more information see
655 <http://topologi-linux.sourceforge.net/>
656
657 It is perfectly safe to say N here.
658 137
659endmenu 138endmenu
660endif # BLOCK 139endif # BLOCK
@@ -662,30 +141,7 @@ endif # BLOCK
662menu "Pseudo filesystems" 141menu "Pseudo filesystems"
663 142
664source "fs/proc/Kconfig" 143source "fs/proc/Kconfig"
665 144source "fs/sysfs/Kconfig"
666config SYSFS
667 bool "sysfs file system support" if EMBEDDED
668 default y
669 help
670 The sysfs filesystem is a virtual filesystem that the kernel uses to
671 export internal kernel objects, their attributes, and their
672 relationships to one another.
673
674 Users can use sysfs to ascertain useful information about the running
675 kernel, such as the devices the kernel has discovered on each bus and
676 which driver each is bound to. sysfs can also be used to tune devices
677 and other kernel subsystems.
678
679 Some system agents rely on the information in sysfs to operate.
680 /sbin/hotplug uses device and object attributes in sysfs to assist in
681 delegating policy decisions, like persistently naming devices.
682
683 sysfs is currently used by the block subsystem to mount the root
684 partition. If sysfs is disabled you must specify the boot device on
685 the kernel boot command line via its major and minor numbers. For
686 example, "root=03:01" for /dev/hda1.
687
688 Designers of embedded systems may wish to say N here to conserve space.
689 145
690config TMPFS 146config TMPFS
691 bool "Virtual memory file system support (former shm fs)" 147 bool "Virtual memory file system support (former shm fs)"
@@ -726,17 +182,7 @@ config HUGETLBFS
726config HUGETLB_PAGE 182config HUGETLB_PAGE
727 def_bool HUGETLBFS 183 def_bool HUGETLBFS
728 184
729config CONFIGFS_FS 185source "fs/configfs/Kconfig"
730 tristate "Userspace-driven configuration filesystem"
731 depends on SYSFS
732 help
733 configfs is a ram-based filesystem that provides the converse
734 of sysfs's functionality. Where sysfs is a filesystem-based
735 view of kernel objects, configfs is a filesystem-based manager
736 of kernel objects, or config_items.
737
738 Both sysfs and configfs can and should exist together on the
739 same system. One is not a replacement for the other.
740 186
741endmenu 187endmenu
742 188
@@ -755,425 +201,27 @@ menuconfig MISC_FILESYSTEMS
755 201
756if MISC_FILESYSTEMS 202if MISC_FILESYSTEMS
757 203
758config ADFS_FS 204source "fs/adfs/Kconfig"
759 tristate "ADFS file system support (EXPERIMENTAL)" 205source "fs/affs/Kconfig"
760 depends on BLOCK && EXPERIMENTAL 206source "fs/ecryptfs/Kconfig"
761 help 207source "fs/hfs/Kconfig"
762 The Acorn Disc Filing System is the standard file system of the 208source "fs/hfsplus/Kconfig"
763 RiscOS operating system which runs on Acorn's ARM-based Risc PC 209source "fs/befs/Kconfig"
764 systems and the Acorn Archimedes range of machines. If you say Y 210source "fs/bfs/Kconfig"
765 here, Linux will be able to read from ADFS partitions on hard drives 211source "fs/efs/Kconfig"
766 and from ADFS-formatted floppy discs. If you also want to be able to
767 write to those devices, say Y to "ADFS write support" below.
768
769 The ADFS partition should be the first partition (i.e.,
770 /dev/[hs]d?1) on each of your drives. Please read the file
771 <file:Documentation/filesystems/adfs.txt> for further details.
772
773 To compile this code as a module, choose M here: the module will be
774 called adfs.
775
776 If unsure, say N.
777
778config ADFS_FS_RW
779 bool "ADFS write support (DANGEROUS)"
780 depends on ADFS_FS
781 help
782 If you say Y here, you will be able to write to ADFS partitions on
783 hard drives and ADFS-formatted floppy disks. This is experimental
784 codes, so if you're unsure, say N.
785
786config AFFS_FS
787 tristate "Amiga FFS file system support (EXPERIMENTAL)"
788 depends on BLOCK && EXPERIMENTAL
789 help
790 The Fast File System (FFS) is the common file system used on hard
791 disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20). Say Y
792 if you want to be able to read and write files from and to an Amiga
793 FFS partition on your hard drive. Amiga floppies however cannot be
794 read with this driver due to an incompatibility of the floppy
795 controller used in an Amiga and the standard floppy controller in
796 PCs and workstations. Read <file:Documentation/filesystems/affs.txt>
797 and <file:fs/affs/Changes>.
798
799 With this driver you can also mount disk files used by Bernd
800 Schmidt's Un*X Amiga Emulator
801 (<http://www.freiburg.linux.de/~uae/>).
802 If you want to do this, you will also need to say Y or M to "Loop
803 device support", above.
804
805 To compile this file system support as a module, choose M here: the
806 module will be called affs. If unsure, say N.
807
808config ECRYPT_FS
809 tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
810 depends on EXPERIMENTAL && KEYS && CRYPTO && NET
811 help
812 Encrypted filesystem that operates on the VFS layer. See
813 <file:Documentation/filesystems/ecryptfs.txt> to learn more about
814 eCryptfs. Userspace components are required and can be
815 obtained from <http://ecryptfs.sf.net>.
816
817 To compile this file system support as a module, choose M here: the
818 module will be called ecryptfs.
819
820config HFS_FS
821 tristate "Apple Macintosh file system support (EXPERIMENTAL)"
822 depends on BLOCK && EXPERIMENTAL
823 select NLS
824 help
825 If you say Y here, you will be able to mount Macintosh-formatted
826 floppy disks and hard drive partitions with full read-write access.
827 Please read <file:Documentation/filesystems/hfs.txt> to learn about
828 the available mount options.
829
830 To compile this file system support as a module, choose M here: the
831 module will be called hfs.
832
833config HFSPLUS_FS
834 tristate "Apple Extended HFS file system support"
835 depends on BLOCK
836 select NLS
837 select NLS_UTF8
838 help
839 If you say Y here, you will be able to mount extended format
840 Macintosh-formatted hard drive partitions with full read-write access.
841
842 This file system is often called HFS+ and was introduced with
843 MacOS 8. It includes all Mac specific filesystem data such as
844 data forks and creator codes, but it also has several UNIX
845 style features such as file ownership and permissions.
846
847config BEFS_FS
848 tristate "BeOS file system (BeFS) support (read only) (EXPERIMENTAL)"
849 depends on BLOCK && EXPERIMENTAL
850 select NLS
851 help
852 The BeOS File System (BeFS) is the native file system of Be, Inc's
853 BeOS. Notable features include support for arbitrary attributes
854 on files and directories, and database-like indices on selected
855 attributes. (Also note that this driver doesn't make those features
856 available at this time). It is a 64 bit filesystem, so it supports
857 extremely large volumes and files.
858
859 If you use this filesystem, you should also say Y to at least one
860 of the NLS (native language support) options below.
861
862 If you don't know what this is about, say N.
863
864 To compile this as a module, choose M here: the module will be
865 called befs.
866
867config BEFS_DEBUG
868 bool "Debug BeFS"
869 depends on BEFS_FS
870 help
871 If you say Y here, you can use the 'debug' mount option to enable
872 debugging output from the driver.
873
874config BFS_FS
875 tristate "BFS file system support (EXPERIMENTAL)"
876 depends on BLOCK && EXPERIMENTAL
877 help
878 Boot File System (BFS) is a file system used under SCO UnixWare to
879 allow the bootloader access to the kernel image and other important
880 files during the boot process. It is usually mounted under /stand
881 and corresponds to the slice marked as "STAND" in the UnixWare
882 partition. You should say Y if you want to read or write the files
883 on your /stand slice from within Linux. You then also need to say Y
884 to "UnixWare slices support", below. More information about the BFS
885 file system is contained in the file
886 <file:Documentation/filesystems/bfs.txt>.
887
888 If you don't know what this is about, say N.
889
890 To compile this as a module, choose M here: the module will be called
891 bfs. Note that the file system of your root partition (the one
892 containing the directory /) cannot be compiled as a module.
893
894
895
896config EFS_FS
897 tristate "EFS file system support (read only) (EXPERIMENTAL)"
898 depends on BLOCK && EXPERIMENTAL
899 help
900 EFS is an older file system used for non-ISO9660 CD-ROMs and hard
901 disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer
902 uses the XFS file system for hard disk partitions however).
903
904 This implementation only offers read-only access. If you don't know
905 what all this is about, it's safe to say N. For more information
906 about EFS see its home page at <http://aeschi.ch.eu.org/efs/>.
907
908 To compile the EFS file system support as a module, choose M here: the
909 module will be called efs.
910
911source "fs/jffs2/Kconfig" 212source "fs/jffs2/Kconfig"
912# UBIFS File system configuration 213# UBIFS File system configuration
913source "fs/ubifs/Kconfig" 214source "fs/ubifs/Kconfig"
914 215source "fs/cramfs/Kconfig"
915config CRAMFS 216source "fs/squashfs/Kconfig"
916 tristate "Compressed ROM file system support (cramfs)" 217source "fs/freevxfs/Kconfig"
917 depends on BLOCK 218source "fs/minix/Kconfig"
918 select ZLIB_INFLATE 219source "fs/omfs/Kconfig"
919 help 220source "fs/hpfs/Kconfig"
920 Saying Y here includes support for CramFs (Compressed ROM File 221source "fs/qnx4/Kconfig"
921 System). CramFs is designed to be a simple, small, and compressed 222source "fs/romfs/Kconfig"
922 file system for ROM based embedded systems. CramFs is read-only, 223source "fs/sysv/Kconfig"
923 limited to 256MB file systems (with 16MB files), and doesn't support 224source "fs/ufs/Kconfig"
924 16/32 bits uid/gid, hard links and timestamps.
925
926 See <file:Documentation/filesystems/cramfs.txt> and
927 <file:fs/cramfs/README> for further information.
928
929 To compile this as a module, choose M here: the module will be called
930 cramfs. Note that the root file system (the one containing the
931 directory /) cannot be compiled as a module.
932
933 If unsure, say N.
934
935config SQUASHFS
936 tristate "SquashFS 4.0 - Squashed file system support"
937 depends on BLOCK
938 select ZLIB_INFLATE
939 help
940 Saying Y here includes support for SquashFS 4.0 (a Compressed
941 Read-Only File System). Squashfs is a highly compressed read-only
942 filesystem for Linux. It uses zlib compression to compress both
943 files, inodes and directories. Inodes in the system are very small
944 and all blocks are packed to minimise data overhead. Block sizes
945 greater than 4K are supported up to a maximum of 1 Mbytes (default
946 block size 128K). SquashFS 4.0 supports 64 bit filesystems and files
947 (larger than 4GB), full uid/gid information, hard links and
948 timestamps.
949
950 Squashfs is intended for general read-only filesystem use, for
951 archival use (i.e. in cases where a .tar.gz file may be used), and in
952 embedded systems where low overhead is needed. Further information
953 and tools are available from http://squashfs.sourceforge.net.
954
955 If you want to compile this as a module ( = code which can be
956 inserted in and removed from the running kernel whenever you want),
957 say M here and read <file:Documentation/modules.txt>. The module
958 will be called squashfs. Note that the root file system (the one
959 containing the directory /) cannot be compiled as a module.
960
961 If unsure, say N.
962
963config SQUASHFS_EMBEDDED
964
965 bool "Additional option for memory-constrained systems"
966 depends on SQUASHFS
967 default n
968 help
969 Saying Y here allows you to specify cache size.
970
971 If unsure, say N.
972
973config SQUASHFS_FRAGMENT_CACHE_SIZE
974 int "Number of fragments cached" if SQUASHFS_EMBEDDED
975 depends on SQUASHFS
976 default "3"
977 help
978 By default SquashFS caches the last 3 fragments read from
979 the filesystem. Increasing this amount may mean SquashFS
980 has to re-read fragments less often from disk, at the expense
981 of extra system memory. Decreasing this amount will mean
982 SquashFS uses less memory at the expense of extra reads from disk.
983
984 Note there must be at least one cached fragment. Anything
985 much more than three will probably not make much difference.
986
987config VXFS_FS
988 tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
989 depends on BLOCK
990 help
991 FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
992 file system format. VERITAS VxFS(TM) is the standard file system
993 of SCO UnixWare (and possibly others) and optionally available
994 for Sunsoft Solaris, HP-UX and many other operating systems.
995 Currently only readonly access is supported.
996
997 NOTE: the file system type as used by mount(1), mount(2) and
998 fstab(5) is 'vxfs' as it describes the file system format, not
999 the actual driver.
1000
1001 To compile this as a module, choose M here: the module will be
1002 called freevxfs. If unsure, say N.
1003
1004config MINIX_FS
1005 tristate "Minix file system support"
1006 depends on BLOCK
1007 help
1008 Minix is a simple operating system used in many classes about OS's.
1009 The minix file system (method to organize files on a hard disk
1010 partition or a floppy disk) was the original file system for Linux,
1011 but has been superseded by the second extended file system ext2fs.
1012 You don't want to use the minix file system on your hard disk
1013 because of certain built-in restrictions, but it is sometimes found
1014 on older Linux floppy disks. This option will enlarge your kernel
1015 by about 28 KB. If unsure, say N.
1016
1017 To compile this file system support as a module, choose M here: the
1018 module will be called minix. Note that the file system of your root
1019 partition (the one containing the directory /) cannot be compiled as
1020 a module.
1021
1022config OMFS_FS
1023 tristate "SonicBlue Optimized MPEG File System support"
1024 depends on BLOCK
1025 select CRC_ITU_T
1026 help
1027 This is the proprietary file system used by the Rio Karma music
1028 player and ReplayTV DVR. Despite the name, this filesystem is not
1029 more efficient than a standard FS for MPEG files, in fact likely
1030 the opposite is true. Say Y if you have either of these devices
1031 and wish to mount its disk.
1032
1033 To compile this file system support as a module, choose M here: the
1034 module will be called omfs. If unsure, say N.
1035
1036config HPFS_FS
1037 tristate "OS/2 HPFS file system support"
1038 depends on BLOCK
1039 help
1040 OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS
1041 is the file system used for organizing files on OS/2 hard disk
1042 partitions. Say Y if you want to be able to read files from and
1043 write files to an OS/2 HPFS partition on your hard drive. OS/2
1044 floppies however are in regular MSDOS format, so you don't need this
1045 option in order to be able to read them. Read
1046 <file:Documentation/filesystems/hpfs.txt>.
1047
1048 To compile this file system support as a module, choose M here: the
1049 module will be called hpfs. If unsure, say N.
1050
1051
1052config QNX4FS_FS
1053 tristate "QNX4 file system support (read only)"
1054 depends on BLOCK
1055 help
1056 This is the file system used by the real-time operating systems
1057 QNX 4 and QNX 6 (the latter is also called QNX RTP).
1058 Further information is available at <http://www.qnx.com/>.
1059 Say Y if you intend to mount QNX hard disks or floppies.
1060 Unless you say Y to "QNX4FS read-write support" below, you will
1061 only be able to read these file systems.
1062
1063 To compile this file system support as a module, choose M here: the
1064 module will be called qnx4.
1065
1066 If you don't know whether you need it, then you don't need it:
1067 answer N.
1068
1069config QNX4FS_RW
1070 bool "QNX4FS write support (DANGEROUS)"
1071 depends on QNX4FS_FS && EXPERIMENTAL && BROKEN
1072 help
1073 Say Y if you want to test write support for QNX4 file systems.
1074
1075 It's currently broken, so for now:
1076 answer N.
1077
1078config ROMFS_FS
1079 tristate "ROM file system support"
1080 depends on BLOCK
1081 ---help---
1082 This is a very small read-only file system mainly intended for
1083 initial ram disks of installation disks, but it could be used for
1084 other read-only media as well. Read
1085 <file:Documentation/filesystems/romfs.txt> for details.
1086
1087 To compile this file system support as a module, choose M here: the
1088 module will be called romfs. Note that the file system of your
1089 root partition (the one containing the directory /) cannot be a
1090 module.
1091
1092 If you don't know whether you need it, then you don't need it:
1093 answer N.
1094
1095
1096config SYSV_FS
1097 tristate "System V/Xenix/V7/Coherent file system support"
1098 depends on BLOCK
1099 help
1100 SCO, Xenix and Coherent are commercial Unix systems for Intel
1101 machines, and Version 7 was used on the DEC PDP-11. Saying Y
1102 here would allow you to read from their floppies and hard disk
1103 partitions.
1104
1105 If you have floppies or hard disk partitions like that, it is likely
1106 that they contain binaries from those other Unix systems; in order
1107 to run these binaries, you will want to install linux-abi which is
1108 a set of kernel modules that lets you run SCO, Xenix, Wyse,
1109 UnixWare, Dell Unix and System V programs under Linux. It is
1110 available via FTP (user: ftp) from
1111 <ftp://ftp.openlinux.org/pub/people/hch/linux-abi/>).
1112 NOTE: that will work only for binaries from Intel-based systems;
1113 PDP ones will have to wait until somebody ports Linux to -11 ;-)
1114
1115 If you only intend to mount files from some other Unix over the
1116 network using NFS, you don't need the System V file system support
1117 (but you need NFS file system support obviously).
1118
1119 Note that this option is generally not needed for floppies, since a
1120 good portable way to transport files and directories between unixes
1121 (and even other operating systems) is given by the tar program ("man
1122 tar" or preferably "info tar"). Note also that this option has
1123 nothing whatsoever to do with the option "System V IPC". Read about
1124 the System V file system in
1125 <file:Documentation/filesystems/sysv-fs.txt>.
1126 Saying Y here will enlarge your kernel by about 27 KB.
1127
1128 To compile this as a module, choose M here: the module will be called
1129 sysv.
1130
1131 If you haven't heard about all of this before, it's safe to say N.
1132
1133
1134config UFS_FS
1135 tristate "UFS file system support (read only)"
1136 depends on BLOCK
1137 help
1138 BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
1139 OpenBSD and NeXTstep) use a file system called UFS. Some System V
1140 Unixes can create and mount hard disk partitions and diskettes using
1141 this file system as well. Saying Y here will allow you to read from
1142 these partitions; if you also want to write to them, say Y to the
1143 experimental "UFS file system write support", below. Please read the
1144 file <file:Documentation/filesystems/ufs.txt> for more information.
1145
1146 The recently released UFS2 variant (used in FreeBSD 5.x) is
1147 READ-ONLY supported.
1148
1149 Note that this option is generally not needed for floppies, since a
1150 good portable way to transport files and directories between unixes
1151 (and even other operating systems) is given by the tar program ("man
1152 tar" or preferably "info tar").
1153
1154 When accessing NeXTstep files, you may need to convert them from the
1155 NeXT character set to the Latin1 character set; use the program
1156 recode ("info recode") for this purpose.
1157
1158 To compile the UFS file system support as a module, choose M here: the
1159 module will be called ufs.
1160
1161 If you haven't heard about all of this before, it's safe to say N.
1162
1163config UFS_FS_WRITE
1164 bool "UFS file system write support (DANGEROUS)"
1165 depends on UFS_FS && EXPERIMENTAL
1166 help
1167 Say Y here if you want to try writing to UFS partitions. This is
1168 experimental, so you should back up your UFS partitions beforehand.
1169
1170config UFS_DEBUG
1171 bool "UFS debugging"
1172 depends on UFS_FS
1173 help
1174 If you are experiencing any problems with the UFS filesystem, say
1175 Y here. This will result in _many_ additional debugging messages to be
1176 written to the system log.
1177 225
1178endif # MISC_FILESYSTEMS 226endif # MISC_FILESYSTEMS
1179 227
@@ -1193,173 +241,8 @@ menuconfig NETWORK_FILESYSTEMS
1193 241
1194if NETWORK_FILESYSTEMS 242if NETWORK_FILESYSTEMS
1195 243
1196config NFS_FS 244source "fs/nfs/Kconfig"
1197 tristate "NFS client support" 245source "fs/nfsd/Kconfig"
1198 depends on INET
1199 select LOCKD
1200 select SUNRPC
1201 select NFS_ACL_SUPPORT if NFS_V3_ACL
1202 help
1203 Choose Y here if you want to access files residing on other
1204 computers using Sun's Network File System protocol. To compile
1205 this file system support as a module, choose M here: the module
1206 will be called nfs.
1207
1208 To mount file systems exported by NFS servers, you also need to
1209 install the user space mount.nfs command which can be found in
1210 the Linux nfs-utils package, available from http://linux-nfs.org/.
1211 Information about using the mount command is available in the
1212 mount(8) man page. More detail about the Linux NFS client
1213 implementation is available via the nfs(5) man page.
1214
1215 Below you can choose which versions of the NFS protocol are
1216 available in the kernel to mount NFS servers. Support for NFS
1217 version 2 (RFC 1094) is always available when NFS_FS is selected.
1218
1219 To configure a system which mounts its root file system via NFS
1220 at boot time, say Y here, select "Kernel level IP
1221 autoconfiguration" in the NETWORK menu, and select "Root file
1222 system on NFS" below. You cannot compile this file system as a
1223 module in this case.
1224
1225 If unsure, say N.
1226
1227config NFS_V3
1228 bool "NFS client support for NFS version 3"
1229 depends on NFS_FS
1230 help
1231 This option enables support for version 3 of the NFS protocol
1232 (RFC 1813) in the kernel's NFS client.
1233
1234 If unsure, say Y.
1235
1236config NFS_V3_ACL
1237 bool "NFS client support for the NFSv3 ACL protocol extension"
1238 depends on NFS_V3
1239 help
1240 Some NFS servers support an auxiliary NFSv3 ACL protocol that
1241 Sun added to Solaris but never became an official part of the
1242 NFS version 3 protocol. This protocol extension allows
1243 applications on NFS clients to manipulate POSIX Access Control
1244 Lists on files residing on NFS servers. NFS servers enforce
1245 ACLs on local files whether this protocol is available or not.
1246
1247 Choose Y here if your NFS server supports the Solaris NFSv3 ACL
1248 protocol extension and you want your NFS client to allow
1249 applications to access and modify ACLs on files on the server.
1250
1251 Most NFS servers don't support the Solaris NFSv3 ACL protocol
1252 extension. You can choose N here or specify the "noacl" mount
1253 option to prevent your NFS client from trying to use the NFSv3
1254 ACL protocol.
1255
1256 If unsure, say N.
1257
1258config NFS_V4
1259 bool "NFS client support for NFS version 4 (EXPERIMENTAL)"
1260 depends on NFS_FS && EXPERIMENTAL
1261 select RPCSEC_GSS_KRB5
1262 help
1263 This option enables support for version 4 of the NFS protocol
1264 (RFC 3530) in the kernel's NFS client.
1265
1266 To mount NFS servers using NFSv4, you also need to install user
1267 space programs which can be found in the Linux nfs-utils package,
1268 available from http://linux-nfs.org/.
1269
1270 If unsure, say N.
1271
1272config ROOT_NFS
1273 bool "Root file system on NFS"
1274 depends on NFS_FS=y && IP_PNP
1275 help
1276 If you want your system to mount its root file system via NFS,
1277 choose Y here. This is common practice for managing systems
1278 without local permanent storage. For details, read
1279 <file:Documentation/filesystems/nfsroot.txt>.
1280
1281 Most people say N here.
1282
1283config NFSD
1284 tristate "NFS server support"
1285 depends on INET
1286 select LOCKD
1287 select SUNRPC
1288 select EXPORTFS
1289 select NFS_ACL_SUPPORT if NFSD_V2_ACL
1290 help
1291 Choose Y here if you want to allow other computers to access
1292 files residing on this system using Sun's Network File System
1293 protocol. To compile the NFS server support as a module,
1294 choose M here: the module will be called nfsd.
1295
1296 You may choose to use a user-space NFS server instead, in which
1297 case you can choose N here.
1298
1299 To export local file systems using NFS, you also need to install
1300 user space programs which can be found in the Linux nfs-utils
1301 package, available from http://linux-nfs.org/. More detail about
1302 the Linux NFS server implementation is available via the
1303 exports(5) man page.
1304
1305 Below you can choose which versions of the NFS protocol are
1306 available to clients mounting the NFS server on this system.
1307 Support for NFS version 2 (RFC 1094) is always available when
1308 CONFIG_NFSD is selected.
1309
1310 If unsure, say N.
1311
1312config NFSD_V2_ACL
1313 bool
1314 depends on NFSD
1315
1316config NFSD_V3
1317 bool "NFS server support for NFS version 3"
1318 depends on NFSD
1319 help
1320 This option enables support in your system's NFS server for
1321 version 3 of the NFS protocol (RFC 1813).
1322
1323 If unsure, say Y.
1324
1325config NFSD_V3_ACL
1326 bool "NFS server support for the NFSv3 ACL protocol extension"
1327 depends on NFSD_V3
1328 select NFSD_V2_ACL
1329 help
1330 Solaris NFS servers support an auxiliary NFSv3 ACL protocol that
1331 never became an official part of the NFS version 3 protocol.
1332 This protocol extension allows applications on NFS clients to
1333 manipulate POSIX Access Control Lists on files residing on NFS
1334 servers. NFS servers enforce POSIX ACLs on local files whether
1335 this protocol is available or not.
1336
1337 This option enables support in your system's NFS server for the
1338 NFSv3 ACL protocol extension allowing NFS clients to manipulate
1339 POSIX ACLs on files exported by your system's NFS server. NFS
1340 clients which support the Solaris NFSv3 ACL protocol can then
1341 access and modify ACLs on your NFS server.
1342
1343 To store ACLs on your NFS server, you also need to enable ACL-
1344 related CONFIG options for your local file systems of choice.
1345
1346 If unsure, say N.
1347
1348config NFSD_V4
1349 bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
1350 depends on NFSD && PROC_FS && EXPERIMENTAL
1351 select NFSD_V3
1352 select FS_POSIX_ACL
1353 select RPCSEC_GSS_KRB5
1354 help
1355 This option enables support in your system's NFS server for
1356 version 4 of the NFS protocol (RFC 3530).
1357
1358 To export files using NFSv4, you need to install additional user
1359 space programs which can be found in the Linux nfs-utils package,
1360 available from http://linux-nfs.org/.
1361
1362 If unsure, say N.
1363 246
1364config LOCKD 247config LOCKD
1365 tristate 248 tristate
@@ -1381,221 +264,13 @@ config NFS_COMMON
1381 depends on NFSD || NFS_FS 264 depends on NFSD || NFS_FS
1382 default y 265 default y
1383 266
1384config SUNRPC 267source "net/sunrpc/Kconfig"
1385 tristate 268source "fs/smbfs/Kconfig"
1386
1387config SUNRPC_GSS
1388 tristate
1389
1390config SUNRPC_XPRT_RDMA
1391 tristate
1392 depends on SUNRPC && INFINIBAND && EXPERIMENTAL
1393 default SUNRPC && INFINIBAND
1394 help
1395 This option enables an RPC client transport capability that
1396 allows the NFS client to mount servers via an RDMA-enabled
1397 transport.
1398
1399 To compile RPC client RDMA transport support as a module,
1400 choose M here: the module will be called xprtrdma.
1401
1402 If unsure, say N.
1403
1404config SUNRPC_REGISTER_V4
1405 bool "Register local RPC services via rpcbind v4 (EXPERIMENTAL)"
1406 depends on SUNRPC && EXPERIMENTAL
1407 default n
1408 help
1409 Sun added support for registering RPC services at an IPv6
1410 address by creating two new versions of the rpcbind protocol
1411 (RFC 1833).
1412
1413 This option enables support in the kernel RPC server for
1414 registering kernel RPC services via version 4 of the rpcbind
1415 protocol. If you enable this option, you must run a portmapper
1416 daemon that supports rpcbind protocol version 4.
1417
1418 Serving NFS over IPv6 from knfsd (the kernel's NFS server)
1419 requires that you enable this option and use a portmapper that
1420 supports rpcbind version 4.
1421
1422 If unsure, say N to get traditional behavior (register kernel
1423 RPC services using only rpcbind version 2). Distributions
1424 using the legacy Linux portmapper daemon must say N here.
1425
1426config RPCSEC_GSS_KRB5
1427 tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
1428 depends on SUNRPC && EXPERIMENTAL
1429 select SUNRPC_GSS
1430 select CRYPTO
1431 select CRYPTO_MD5
1432 select CRYPTO_DES
1433 select CRYPTO_CBC
1434 help
1435 Choose Y here to enable Secure RPC using the Kerberos version 5
1436 GSS-API mechanism (RFC 1964).
1437
1438 Secure RPC calls with Kerberos require an auxiliary user-space
1439 daemon which may be found in the Linux nfs-utils package
1440 available from http://linux-nfs.org/. In addition, user-space
1441 Kerberos support should be installed.
1442
1443 If unsure, say N.
1444
1445config RPCSEC_GSS_SPKM3
1446 tristate "Secure RPC: SPKM3 mechanism (EXPERIMENTAL)"
1447 depends on SUNRPC && EXPERIMENTAL
1448 select SUNRPC_GSS
1449 select CRYPTO
1450 select CRYPTO_MD5
1451 select CRYPTO_DES
1452 select CRYPTO_CAST5
1453 select CRYPTO_CBC
1454 help
1455 Choose Y here to enable Secure RPC using the SPKM3 public key
1456 GSS-API mechansim (RFC 2025).
1457
1458 Secure RPC calls with SPKM3 require an auxiliary userspace
1459 daemon which may be found in the Linux nfs-utils package
1460 available from http://linux-nfs.org/.
1461
1462 If unsure, say N.
1463
1464config SMB_FS
1465 tristate "SMB file system support (OBSOLETE, please use CIFS)"
1466 depends on INET
1467 select NLS
1468 help
1469 SMB (Server Message Block) is the protocol Windows for Workgroups
1470 (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share
1471 files and printers over local networks. Saying Y here allows you to
1472 mount their file systems (often called "shares" in this context) and
1473 access them just like any other Unix directory. Currently, this
1474 works only if the Windows machines use TCP/IP as the underlying
1475 transport protocol, and not NetBEUI. For details, read
1476 <file:Documentation/filesystems/smbfs.txt> and the SMB-HOWTO,
1477 available from <http://www.tldp.org/docs.html#howto>.
1478
1479 Note: if you just want your box to act as an SMB *server* and make
1480 files and printing services available to Windows clients (which need
1481 to have a TCP/IP stack), you don't need to say Y here; you can use
1482 the program SAMBA (available from <ftp://ftp.samba.org/pub/samba/>)
1483 for that.
1484
1485 General information about how to connect Linux, Windows machines and
1486 Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
1487
1488 To compile the SMB support as a module, choose M here:
1489 the module will be called smbfs. Most people say N, however.
1490
1491config SMB_NLS_DEFAULT
1492 bool "Use a default NLS"
1493 depends on SMB_FS
1494 help
1495 Enabling this will make smbfs use nls translations by default. You
1496 need to specify the local charset (CONFIG_NLS_DEFAULT) in the nls
1497 settings and you need to give the default nls for the SMB server as
1498 CONFIG_SMB_NLS_REMOTE.
1499
1500 The nls settings can be changed at mount time, if your smbmount
1501 supports that, using the codepage and iocharset parameters.
1502
1503 smbmount from samba 2.2.0 or later supports this.
1504
1505config SMB_NLS_REMOTE
1506 string "Default Remote NLS Option"
1507 depends on SMB_NLS_DEFAULT
1508 default "cp437"
1509 help
1510 This setting allows you to specify a default value for which
1511 codepage the server uses. If this field is left blank no
1512 translations will be done by default. The local codepage/charset
1513 default to CONFIG_NLS_DEFAULT.
1514
1515 The nls settings can be changed at mount time, if your smbmount
1516 supports that, using the codepage and iocharset parameters.
1517
1518 smbmount from samba 2.2.0 or later supports this.
1519
1520source "fs/cifs/Kconfig" 269source "fs/cifs/Kconfig"
1521
1522config NCP_FS
1523 tristate "NCP file system support (to mount NetWare volumes)"
1524 depends on IPX!=n || INET
1525 help
1526 NCP (NetWare Core Protocol) is a protocol that runs over IPX and is
1527 used by Novell NetWare clients to talk to file servers. It is to
1528 IPX what NFS is to TCP/IP, if that helps. Saying Y here allows you
1529 to mount NetWare file server volumes and to access them just like
1530 any other Unix directory. For details, please read the file
1531 <file:Documentation/filesystems/ncpfs.txt> in the kernel source and
1532 the IPX-HOWTO from <http://www.tldp.org/docs.html#howto>.
1533
1534 You do not have to say Y here if you want your Linux box to act as a
1535 file *server* for Novell NetWare clients.
1536
1537 General information about how to connect Linux, Windows machines and
1538 Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
1539
1540 To compile this as a module, choose M here: the module will be called
1541 ncpfs. Say N unless you are connected to a Novell network.
1542
1543source "fs/ncpfs/Kconfig" 270source "fs/ncpfs/Kconfig"
1544 271source "fs/coda/Kconfig"
1545config CODA_FS 272source "fs/afs/Kconfig"
1546 tristate "Coda file system support (advanced network fs)" 273source "fs/9p/Kconfig"
1547 depends on INET
1548 help
1549 Coda is an advanced network file system, similar to NFS in that it
1550 enables you to mount file systems of a remote server and access them
1551 with regular Unix commands as if they were sitting on your hard
1552 disk. Coda has several advantages over NFS: support for
1553 disconnected operation (e.g. for laptops), read/write server
1554 replication, security model for authentication and encryption,
1555 persistent client caches and write back caching.
1556
1557 If you say Y here, your Linux box will be able to act as a Coda
1558 *client*. You will need user level code as well, both for the
1559 client and server. Servers are currently user level, i.e. they need
1560 no kernel support. Please read
1561 <file:Documentation/filesystems/coda.txt> and check out the Coda
1562 home page <http://www.coda.cs.cmu.edu/>.
1563
1564 To compile the coda client support as a module, choose M here: the
1565 module will be called coda.
1566
1567config AFS_FS
1568 tristate "Andrew File System support (AFS) (EXPERIMENTAL)"
1569 depends on INET && EXPERIMENTAL
1570 select AF_RXRPC
1571 help
1572 If you say Y here, you will get an experimental Andrew File System
1573 driver. It currently only supports unsecured read-only AFS access.
1574
1575 See <file:Documentation/filesystems/afs.txt> for more information.
1576
1577 If unsure, say N.
1578
1579config AFS_DEBUG
1580 bool "AFS dynamic debugging"
1581 depends on AFS_FS
1582 help
1583 Say Y here to make runtime controllable debugging messages appear.
1584
1585 See <file:Documentation/filesystems/afs.txt> for more information.
1586
1587 If unsure, say N.
1588
1589config 9P_FS
1590 tristate "Plan 9 Resource Sharing Support (9P2000) (Experimental)"
1591 depends on INET && NET_9P && EXPERIMENTAL
1592 help
1593 If you say Y here, you will get experimental support for
1594 Plan 9 resource sharing via the 9P2000 protocol.
1595
1596 See <http://v9fs.sf.net> for more information.
1597
1598 If unsure, say N.
1599 274
1600endif # NETWORK_FILESYSTEMS 275endif # NETWORK_FILESYSTEMS
1601 276
diff --git a/fs/adfs/Kconfig b/fs/adfs/Kconfig
new file mode 100644
index 000000000000..e55182a74605
--- /dev/null
+++ b/fs/adfs/Kconfig
@@ -0,0 +1,27 @@
1config ADFS_FS
2 tristate "ADFS file system support (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 help
5 The Acorn Disc Filing System is the standard file system of the
6 RiscOS operating system which runs on Acorn's ARM-based Risc PC
7 systems and the Acorn Archimedes range of machines. If you say Y
8 here, Linux will be able to read from ADFS partitions on hard drives
9 and from ADFS-formatted floppy discs. If you also want to be able to
10 write to those devices, say Y to "ADFS write support" below.
11
12 The ADFS partition should be the first partition (i.e.,
13 /dev/[hs]d?1) on each of your drives. Please read the file
14 <file:Documentation/filesystems/adfs.txt> for further details.
15
16 To compile this code as a module, choose M here: the module will be
17 called adfs.
18
19 If unsure, say N.
20
21config ADFS_FS_RW
22 bool "ADFS write support (DANGEROUS)"
23 depends on ADFS_FS
24 help
25 If you say Y here, you will be able to write to ADFS partitions on
26 hard drives and ADFS-formatted floppy disks. This is experimental
27 codes, so if you're unsure, say N.
diff --git a/fs/affs/Kconfig b/fs/affs/Kconfig
new file mode 100644
index 000000000000..cfad9afb4762
--- /dev/null
+++ b/fs/affs/Kconfig
@@ -0,0 +1,21 @@
1config AFFS_FS
2 tristate "Amiga FFS file system support (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 help
5 The Fast File System (FFS) is the common file system used on hard
6 disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20). Say Y
7 if you want to be able to read and write files from and to an Amiga
8 FFS partition on your hard drive. Amiga floppies however cannot be
9 read with this driver due to an incompatibility of the floppy
10 controller used in an Amiga and the standard floppy controller in
11 PCs and workstations. Read <file:Documentation/filesystems/affs.txt>
12 and <file:fs/affs/Changes>.
13
14 With this driver you can also mount disk files used by Bernd
15 Schmidt's Un*X Amiga Emulator
16 (<http://www.freiburg.linux.de/~uae/>).
17 If you want to do this, you will also need to say Y or M to "Loop
18 device support", above.
19
20 To compile this file system support as a module, choose M here: the
21 module will be called affs. If unsure, say N.
diff --git a/fs/afs/Kconfig b/fs/afs/Kconfig
new file mode 100644
index 000000000000..e7b522fe15e1
--- /dev/null
+++ b/fs/afs/Kconfig
@@ -0,0 +1,21 @@
1config AFS_FS
2 tristate "Andrew File System support (AFS) (EXPERIMENTAL)"
3 depends on INET && EXPERIMENTAL
4 select AF_RXRPC
5 help
6 If you say Y here, you will get an experimental Andrew File System
7 driver. It currently only supports unsecured read-only AFS access.
8
9 See <file:Documentation/filesystems/afs.txt> for more information.
10
11 If unsure, say N.
12
13config AFS_DEBUG
14 bool "AFS dynamic debugging"
15 depends on AFS_FS
16 help
17 Say Y here to make runtime controllable debugging messages appear.
18
19 See <file:Documentation/filesystems/afs.txt> for more information.
20
21 If unsure, say N.
diff --git a/fs/autofs/Kconfig b/fs/autofs/Kconfig
new file mode 100644
index 000000000000..5f3bea90911e
--- /dev/null
+++ b/fs/autofs/Kconfig
@@ -0,0 +1,21 @@
1config AUTOFS_FS
2 tristate "Kernel automounter support"
3 help
4 The automounter is a tool to automatically mount remote file systems
5 on demand. This implementation is partially kernel-based to reduce
6 overhead in the already-mounted case; this is unlike the BSD
7 automounter (amd), which is a pure user space daemon.
8
9 To use the automounter you need the user-space tools from the autofs
10 package; you can find the location in <file:Documentation/Changes>.
11 You also want to answer Y to "NFS file system support", below.
12
13 If you want to use the newer version of the automounter with more
14 features, say N here and say Y to "Kernel automounter v4 support",
15 below.
16
17 To compile this support as a module, choose M here: the module will be
18 called autofs.
19
20 If you are not a part of a fairly large, distributed network, you
21 probably do not need an automounter, and can say N here.
diff --git a/fs/autofs4/Kconfig b/fs/autofs4/Kconfig
new file mode 100644
index 000000000000..1204d6384d39
--- /dev/null
+++ b/fs/autofs4/Kconfig
@@ -0,0 +1,20 @@
1config AUTOFS4_FS
2 tristate "Kernel automounter version 4 support (also supports v3)"
3 help
4 The automounter is a tool to automatically mount remote file systems
5 on demand. This implementation is partially kernel-based to reduce
6 overhead in the already-mounted case; this is unlike the BSD
7 automounter (amd), which is a pure user space daemon.
8
9 To use the automounter you need the user-space tools from
10 <ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/>; you also
11 want to answer Y to "NFS file system support", below.
12
13 To compile this support as a module, choose M here: the module will be
14 called autofs4. You will need to add "alias autofs autofs4" to your
15 modules configuration file.
16
17 If you are not a part of a fairly large, distributed network or
18 don't have a laptop which needs to dynamically reconfigure to the
19 local network, you probably do not need an automounter, and can say
20 N here.
diff --git a/fs/befs/Kconfig b/fs/befs/Kconfig
new file mode 100644
index 000000000000..7835d30f211f
--- /dev/null
+++ b/fs/befs/Kconfig
@@ -0,0 +1,26 @@
1config BEFS_FS
2 tristate "BeOS file system (BeFS) support (read only) (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 select NLS
5 help
6 The BeOS File System (BeFS) is the native file system of Be, Inc's
7 BeOS. Notable features include support for arbitrary attributes
8 on files and directories, and database-like indices on selected
9 attributes. (Also note that this driver doesn't make those features
10 available at this time). It is a 64 bit filesystem, so it supports
11 extremely large volumes and files.
12
13 If you use this filesystem, you should also say Y to at least one
14 of the NLS (native language support) options below.
15
16 If you don't know what this is about, say N.
17
18 To compile this as a module, choose M here: the module will be
19 called befs.
20
21config BEFS_DEBUG
22 bool "Debug BeFS"
23 depends on BEFS_FS
24 help
25 If you say Y here, you can use the 'debug' mount option to enable
26 debugging output from the driver.
diff --git a/fs/bfs/Kconfig b/fs/bfs/Kconfig
new file mode 100644
index 000000000000..c2336c62024f
--- /dev/null
+++ b/fs/bfs/Kconfig
@@ -0,0 +1,19 @@
1config BFS_FS
2 tristate "BFS file system support (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 help
5 Boot File System (BFS) is a file system used under SCO UnixWare to
6 allow the bootloader access to the kernel image and other important
7 files during the boot process. It is usually mounted under /stand
8 and corresponds to the slice marked as "STAND" in the UnixWare
9 partition. You should say Y if you want to read or write the files
10 on your /stand slice from within Linux. You then also need to say Y
11 to "UnixWare slices support", below. More information about the BFS
12 file system is contained in the file
13 <file:Documentation/filesystems/bfs.txt>.
14
15 If you don't know what this is about, say N.
16
17 To compile this as a module, choose M here: the module will be called
18 bfs. Note that the file system of your root partition (the one
19 containing the directory /) cannot be compiled as a module.
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
index 77ebc3c263d6..549b0144da11 100644
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@ -140,7 +140,6 @@ int bio_integrity_add_page(struct bio *bio, struct page *page,
140 140
141 iv = bip_vec_idx(bip, bip->bip_vcnt); 141 iv = bip_vec_idx(bip, bip->bip_vcnt);
142 BUG_ON(iv == NULL); 142 BUG_ON(iv == NULL);
143 BUG_ON(iv->bv_page != NULL);
144 143
145 iv->bv_page = page; 144 iv->bv_page = page;
146 iv->bv_len = len; 145 iv->bv_len = len;
@@ -465,7 +464,7 @@ static int bio_integrity_verify(struct bio *bio)
465 464
466 if (ret) { 465 if (ret) {
467 kunmap_atomic(kaddr, KM_USER0); 466 kunmap_atomic(kaddr, KM_USER0);
468 break; 467 return ret;
469 } 468 }
470 469
471 sectors = bv->bv_len / bi->sector_size; 470 sectors = bv->bv_len / bi->sector_size;
@@ -493,18 +492,13 @@ static void bio_integrity_verify_fn(struct work_struct *work)
493 struct bio_integrity_payload *bip = 492 struct bio_integrity_payload *bip =
494 container_of(work, struct bio_integrity_payload, bip_work); 493 container_of(work, struct bio_integrity_payload, bip_work);
495 struct bio *bio = bip->bip_bio; 494 struct bio *bio = bip->bip_bio;
496 int error = bip->bip_error; 495 int error;
497 496
498 if (bio_integrity_verify(bio)) { 497 error = bio_integrity_verify(bio);
499 clear_bit(BIO_UPTODATE, &bio->bi_flags);
500 error = -EIO;
501 }
502 498
503 /* Restore original bio completion handler */ 499 /* Restore original bio completion handler */
504 bio->bi_end_io = bip->bip_end_io; 500 bio->bi_end_io = bip->bip_end_io;
505 501 bio_endio(bio, error);
506 if (bio->bi_end_io)
507 bio->bi_end_io(bio, error);
508} 502}
509 503
510/** 504/**
@@ -525,7 +519,17 @@ void bio_integrity_endio(struct bio *bio, int error)
525 519
526 BUG_ON(bip->bip_bio != bio); 520 BUG_ON(bip->bip_bio != bio);
527 521
528 bip->bip_error = error; 522 /* In case of an I/O error there is no point in verifying the
523 * integrity metadata. Restore original bio end_io handler
524 * and run it.
525 */
526 if (error) {
527 bio->bi_end_io = bip->bip_end_io;
528 bio_endio(bio, error);
529
530 return;
531 }
532
529 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); 533 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn);
530 queue_work(kintegrityd_wq, &bip->bip_work); 534 queue_work(kintegrityd_wq, &bip->bip_work);
531} 535}
diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig
new file mode 100644
index 000000000000..f8fcf999ea1b
--- /dev/null
+++ b/fs/btrfs/Kconfig
@@ -0,0 +1,18 @@
1config BTRFS_FS
2 tristate "Btrfs filesystem (EXPERIMENTAL) Unstable disk format"
3 depends on EXPERIMENTAL
4 select LIBCRC32C
5 select ZLIB_INFLATE
6 select ZLIB_DEFLATE
7 help
8 Btrfs is a new filesystem with extents, writable snapshotting,
9 support for multiple devices and many more features.
10
11 Btrfs is highly experimental, and THE DISK FORMAT IS NOT YET
12 FINALIZED. You should say N here unless you are interested in
13 testing Btrfs with non-critical data.
14
15 To compile this file system support as a module, choose M here. The
16 module will be called btrfs.
17
18 If unsure, say N.
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 080703a15f44..73ac7ebd1dfc 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -5,7 +5,9 @@ rather than posix (advisory) byte range locks, even though server would
5support posix byte range locks. Fix query of root inode when prefixpath 5support posix byte range locks. Fix query of root inode when prefixpath
6specified and user does not have access to query information about the 6specified and user does not have access to query information about the
7top of the share. Fix problem in 2.6.28 resolving DFS paths to 7top of the share. Fix problem in 2.6.28 resolving DFS paths to
8Samba servers (worked to Windows). 8Samba servers (worked to Windows). Fix rmdir so that pending search
9(readdir) requests do not get invalid results which include the now
10removed directory.
9 11
10Version 1.55 12Version 1.55
11------------ 13------------
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index d4839cf0cb2c..7c9809523f42 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -48,11 +48,11 @@ static int cifs_calculate_signature(const struct smb_hdr *cifs_pdu,
48 if ((cifs_pdu == NULL) || (signature == NULL) || (key == NULL)) 48 if ((cifs_pdu == NULL) || (signature == NULL) || (key == NULL))
49 return -EINVAL; 49 return -EINVAL;
50 50
51 MD5Init(&context); 51 cifs_MD5_init(&context);
52 MD5Update(&context, (char *)&key->data, key->len); 52 cifs_MD5_update(&context, (char *)&key->data, key->len);
53 MD5Update(&context, cifs_pdu->Protocol, cifs_pdu->smb_buf_length); 53 cifs_MD5_update(&context, cifs_pdu->Protocol, cifs_pdu->smb_buf_length);
54 54
55 MD5Final(signature, &context); 55 cifs_MD5_final(signature, &context);
56 return 0; 56 return 0;
57} 57}
58 58
@@ -96,8 +96,8 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec,
96 if ((iov == NULL) || (signature == NULL) || (key == NULL)) 96 if ((iov == NULL) || (signature == NULL) || (key == NULL))
97 return -EINVAL; 97 return -EINVAL;
98 98
99 MD5Init(&context); 99 cifs_MD5_init(&context);
100 MD5Update(&context, (char *)&key->data, key->len); 100 cifs_MD5_update(&context, (char *)&key->data, key->len);
101 for (i = 0; i < n_vec; i++) { 101 for (i = 0; i < n_vec; i++) {
102 if (iov[i].iov_len == 0) 102 if (iov[i].iov_len == 0)
103 continue; 103 continue;
@@ -110,13 +110,13 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec,
110 if (i == 0) { 110 if (i == 0) {
111 if (iov[0].iov_len <= 8) /* cmd field at offset 9 */ 111 if (iov[0].iov_len <= 8) /* cmd field at offset 9 */
112 break; /* nothing to sign or corrupt header */ 112 break; /* nothing to sign or corrupt header */
113 MD5Update(&context, iov[0].iov_base+4, 113 cifs_MD5_update(&context, iov[0].iov_base+4,
114 iov[0].iov_len-4); 114 iov[0].iov_len-4);
115 } else 115 } else
116 MD5Update(&context, iov[i].iov_base, iov[i].iov_len); 116 cifs_MD5_update(&context, iov[i].iov_base, iov[i].iov_len);
117 } 117 }
118 118
119 MD5Final(signature, &context); 119 cifs_MD5_final(signature, &context);
120 120
121 return 0; 121 return 0;
122} 122}
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 06f6779988bf..382ba6298809 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -35,8 +35,8 @@ extern struct smb_hdr *cifs_buf_get(void);
35extern void cifs_buf_release(void *); 35extern void cifs_buf_release(void *);
36extern struct smb_hdr *cifs_small_buf_get(void); 36extern struct smb_hdr *cifs_small_buf_get(void);
37extern void cifs_small_buf_release(void *); 37extern void cifs_small_buf_release(void *);
38extern int smb_send(struct socket *, struct smb_hdr *, 38extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *,
39 unsigned int /* length */ , struct sockaddr *, bool); 39 unsigned int /* length */);
40extern unsigned int _GetXid(void); 40extern unsigned int _GetXid(void);
41extern void _FreeXid(unsigned int); 41extern void _FreeXid(unsigned int);
42#define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current_fsuid())); 42#define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current_fsuid()));
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index e9ea394ee075..2209be943051 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1354,7 +1354,7 @@ cifs_parse_mount_options(char *options, const char *devname,
1354} 1354}
1355 1355
1356static struct TCP_Server_Info * 1356static struct TCP_Server_Info *
1357cifs_find_tcp_session(struct sockaddr *addr) 1357cifs_find_tcp_session(struct sockaddr_storage *addr)
1358{ 1358{
1359 struct list_head *tmp; 1359 struct list_head *tmp;
1360 struct TCP_Server_Info *server; 1360 struct TCP_Server_Info *server;
@@ -1374,11 +1374,11 @@ cifs_find_tcp_session(struct sockaddr *addr)
1374 if (server->tcpStatus == CifsNew) 1374 if (server->tcpStatus == CifsNew)
1375 continue; 1375 continue;
1376 1376
1377 if (addr->sa_family == AF_INET && 1377 if (addr->ss_family == AF_INET &&
1378 (addr4->sin_addr.s_addr != 1378 (addr4->sin_addr.s_addr !=
1379 server->addr.sockAddr.sin_addr.s_addr)) 1379 server->addr.sockAddr.sin_addr.s_addr))
1380 continue; 1380 continue;
1381 else if (addr->sa_family == AF_INET6 && 1381 else if (addr->ss_family == AF_INET6 &&
1382 memcmp(&server->addr.sockAddr6.sin6_addr, 1382 memcmp(&server->addr.sockAddr6.sin6_addr,
1383 &addr6->sin6_addr, sizeof(addr6->sin6_addr))) 1383 &addr6->sin6_addr, sizeof(addr6->sin6_addr)))
1384 continue; 1384 continue;
@@ -1419,12 +1419,12 @@ static struct TCP_Server_Info *
1419cifs_get_tcp_session(struct smb_vol *volume_info) 1419cifs_get_tcp_session(struct smb_vol *volume_info)
1420{ 1420{
1421 struct TCP_Server_Info *tcp_ses = NULL; 1421 struct TCP_Server_Info *tcp_ses = NULL;
1422 struct sockaddr addr; 1422 struct sockaddr_storage addr;
1423 struct sockaddr_in *sin_server = (struct sockaddr_in *) &addr; 1423 struct sockaddr_in *sin_server = (struct sockaddr_in *) &addr;
1424 struct sockaddr_in6 *sin_server6 = (struct sockaddr_in6 *) &addr; 1424 struct sockaddr_in6 *sin_server6 = (struct sockaddr_in6 *) &addr;
1425 int rc; 1425 int rc;
1426 1426
1427 memset(&addr, 0, sizeof(struct sockaddr)); 1427 memset(&addr, 0, sizeof(struct sockaddr_storage));
1428 1428
1429 if (volume_info->UNCip && volume_info->UNC) { 1429 if (volume_info->UNCip && volume_info->UNC) {
1430 rc = cifs_inet_pton(AF_INET, volume_info->UNCip, 1430 rc = cifs_inet_pton(AF_INET, volume_info->UNCip,
@@ -1435,9 +1435,9 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
1435 rc = cifs_inet_pton(AF_INET6, volume_info->UNCip, 1435 rc = cifs_inet_pton(AF_INET6, volume_info->UNCip,
1436 &sin_server6->sin6_addr.in6_u); 1436 &sin_server6->sin6_addr.in6_u);
1437 if (rc > 0) 1437 if (rc > 0)
1438 addr.sa_family = AF_INET6; 1438 addr.ss_family = AF_INET6;
1439 } else { 1439 } else {
1440 addr.sa_family = AF_INET; 1440 addr.ss_family = AF_INET;
1441 } 1441 }
1442 1442
1443 if (rc <= 0) { 1443 if (rc <= 0) {
@@ -1502,7 +1502,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
1502 tcp_ses->tcpStatus = CifsNew; 1502 tcp_ses->tcpStatus = CifsNew;
1503 ++tcp_ses->srv_count; 1503 ++tcp_ses->srv_count;
1504 1504
1505 if (addr.sa_family == AF_INET6) { 1505 if (addr.ss_family == AF_INET6) {
1506 cFYI(1, ("attempting ipv6 connect")); 1506 cFYI(1, ("attempting ipv6 connect"));
1507 /* BB should we allow ipv6 on port 139? */ 1507 /* BB should we allow ipv6 on port 139? */
1508 /* other OS never observed in Wild doing 139 with v6 */ 1508 /* other OS never observed in Wild doing 139 with v6 */
@@ -1802,7 +1802,7 @@ ipv4_connect(struct TCP_Server_Info *server)
1802 * user space buffer 1802 * user space buffer
1803 */ 1803 */
1804 socket->sk->sk_rcvtimeo = 7 * HZ; 1804 socket->sk->sk_rcvtimeo = 7 * HZ;
1805 socket->sk->sk_sndtimeo = 3 * HZ; 1805 socket->sk->sk_sndtimeo = 5 * HZ;
1806 1806
1807 /* make the bufsizes depend on wsize/rsize and max requests */ 1807 /* make the bufsizes depend on wsize/rsize and max requests */
1808 if (server->noautotune) { 1808 if (server->noautotune) {
@@ -1860,9 +1860,7 @@ ipv4_connect(struct TCP_Server_Info *server)
1860 smb_buf = (struct smb_hdr *)ses_init_buf; 1860 smb_buf = (struct smb_hdr *)ses_init_buf;
1861 /* sizeof RFC1002_SESSION_REQUEST with no scope */ 1861 /* sizeof RFC1002_SESSION_REQUEST with no scope */
1862 smb_buf->smb_buf_length = 0x81000044; 1862 smb_buf->smb_buf_length = 0x81000044;
1863 rc = smb_send(socket, smb_buf, 0x44, 1863 rc = smb_send(server, smb_buf, 0x44);
1864 (struct sockaddr *) &server->addr.sockAddr,
1865 server->noblocksnd);
1866 kfree(ses_init_buf); 1864 kfree(ses_init_buf);
1867 msleep(1); /* RFC1001 layer in at least one server 1865 msleep(1); /* RFC1001 layer in at least one server
1868 requires very short break before negprot 1866 requires very short break before negprot
@@ -1955,7 +1953,7 @@ ipv6_connect(struct TCP_Server_Info *server)
1955 * user space buffer 1953 * user space buffer
1956 */ 1954 */
1957 socket->sk->sk_rcvtimeo = 7 * HZ; 1955 socket->sk->sk_rcvtimeo = 7 * HZ;
1958 socket->sk->sk_sndtimeo = 3 * HZ; 1956 socket->sk->sk_sndtimeo = 5 * HZ;
1959 server->ssocket = socket; 1957 server->ssocket = socket;
1960 1958
1961 return rc; 1959 return rc;
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 838d9c720a5c..964aad03c5ad 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -129,6 +129,17 @@ cifs_bp_rename_retry:
129 return full_path; 129 return full_path;
130} 130}
131 131
132static void setup_cifs_dentry(struct cifsTconInfo *tcon,
133 struct dentry *direntry,
134 struct inode *newinode)
135{
136 if (tcon->nocase)
137 direntry->d_op = &cifs_ci_dentry_ops;
138 else
139 direntry->d_op = &cifs_dentry_ops;
140 d_instantiate(direntry, newinode);
141}
142
132/* Inode operations in similar order to how they appear in Linux file fs.h */ 143/* Inode operations in similar order to how they appear in Linux file fs.h */
133 144
134int 145int
@@ -139,14 +150,14 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
139 int xid; 150 int xid;
140 int create_options = CREATE_NOT_DIR; 151 int create_options = CREATE_NOT_DIR;
141 int oplock = 0; 152 int oplock = 0;
153 /* BB below access is too much for the mknod to request */
142 int desiredAccess = GENERIC_READ | GENERIC_WRITE; 154 int desiredAccess = GENERIC_READ | GENERIC_WRITE;
143 __u16 fileHandle; 155 __u16 fileHandle;
144 struct cifs_sb_info *cifs_sb; 156 struct cifs_sb_info *cifs_sb;
145 struct cifsTconInfo *pTcon; 157 struct cifsTconInfo *tcon;
146 char *full_path = NULL; 158 char *full_path = NULL;
147 FILE_ALL_INFO *buf = NULL; 159 FILE_ALL_INFO *buf = NULL;
148 struct inode *newinode = NULL; 160 struct inode *newinode = NULL;
149 struct cifsFileInfo *pCifsFile = NULL;
150 struct cifsInodeInfo *pCifsInode; 161 struct cifsInodeInfo *pCifsInode;
151 int disposition = FILE_OVERWRITE_IF; 162 int disposition = FILE_OVERWRITE_IF;
152 bool write_only = false; 163 bool write_only = false;
@@ -154,7 +165,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
154 xid = GetXid(); 165 xid = GetXid();
155 166
156 cifs_sb = CIFS_SB(inode->i_sb); 167 cifs_sb = CIFS_SB(inode->i_sb);
157 pTcon = cifs_sb->tcon; 168 tcon = cifs_sb->tcon;
158 169
159 full_path = build_path_from_dentry(direntry); 170 full_path = build_path_from_dentry(direntry);
160 if (full_path == NULL) { 171 if (full_path == NULL) {
@@ -162,6 +173,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
162 return -ENOMEM; 173 return -ENOMEM;
163 } 174 }
164 175
176 mode &= ~current->fs->umask;
177
165 if (nd && (nd->flags & LOOKUP_OPEN)) { 178 if (nd && (nd->flags & LOOKUP_OPEN)) {
166 int oflags = nd->intent.open.flags; 179 int oflags = nd->intent.open.flags;
167 180
@@ -196,17 +209,15 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
196 return -ENOMEM; 209 return -ENOMEM;
197 } 210 }
198 211
199 mode &= ~current->fs->umask;
200
201 /* 212 /*
202 * if we're not using unix extensions, see if we need to set 213 * if we're not using unix extensions, see if we need to set
203 * ATTR_READONLY on the create call 214 * ATTR_READONLY on the create call
204 */ 215 */
205 if (!pTcon->unix_ext && (mode & S_IWUGO) == 0) 216 if (!tcon->unix_ext && (mode & S_IWUGO) == 0)
206 create_options |= CREATE_OPTION_READONLY; 217 create_options |= CREATE_OPTION_READONLY;
207 218
208 if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS) 219 if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS)
209 rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, 220 rc = CIFSSMBOpen(xid, tcon, full_path, disposition,
210 desiredAccess, create_options, 221 desiredAccess, create_options,
211 &fileHandle, &oplock, buf, cifs_sb->local_nls, 222 &fileHandle, &oplock, buf, cifs_sb->local_nls,
212 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 223 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -215,7 +226,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
215 226
216 if (rc == -EIO) { 227 if (rc == -EIO) {
217 /* old server, retry the open legacy style */ 228 /* old server, retry the open legacy style */
218 rc = SMBLegacyOpen(xid, pTcon, full_path, disposition, 229 rc = SMBLegacyOpen(xid, tcon, full_path, disposition,
219 desiredAccess, create_options, 230 desiredAccess, create_options,
220 &fileHandle, &oplock, buf, cifs_sb->local_nls, 231 &fileHandle, &oplock, buf, cifs_sb->local_nls,
221 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 232 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -225,7 +236,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
225 } else { 236 } else {
226 /* If Open reported that we actually created a file 237 /* If Open reported that we actually created a file
227 then we now have to set the mode if possible */ 238 then we now have to set the mode if possible */
228 if ((pTcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) { 239 if ((tcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) {
229 struct cifs_unix_set_info_args args = { 240 struct cifs_unix_set_info_args args = {
230 .mode = mode, 241 .mode = mode,
231 .ctime = NO_CHANGE_64, 242 .ctime = NO_CHANGE_64,
@@ -244,20 +255,20 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
244 args.uid = NO_CHANGE_64; 255 args.uid = NO_CHANGE_64;
245 args.gid = NO_CHANGE_64; 256 args.gid = NO_CHANGE_64;
246 } 257 }
247 CIFSSMBUnixSetInfo(xid, pTcon, full_path, &args, 258 CIFSSMBUnixSetInfo(xid, tcon, full_path, &args,
248 cifs_sb->local_nls, 259 cifs_sb->local_nls,
249 cifs_sb->mnt_cifs_flags & 260 cifs_sb->mnt_cifs_flags &
250 CIFS_MOUNT_MAP_SPECIAL_CHR); 261 CIFS_MOUNT_MAP_SPECIAL_CHR);
251 } else { 262 } else {
252 /* BB implement mode setting via Windows security 263 /* BB implement mode setting via Windows security
253 descriptors e.g. */ 264 descriptors e.g. */
254 /* CIFSSMBWinSetPerms(xid,pTcon,path,mode,-1,-1,nls);*/ 265 /* CIFSSMBWinSetPerms(xid,tcon,path,mode,-1,-1,nls);*/
255 266
256 /* Could set r/o dos attribute if mode & 0222 == 0 */ 267 /* Could set r/o dos attribute if mode & 0222 == 0 */
257 } 268 }
258 269
259 /* server might mask mode so we have to query for it */ 270 /* server might mask mode so we have to query for it */
260 if (pTcon->unix_ext) 271 if (tcon->unix_ext)
261 rc = cifs_get_inode_info_unix(&newinode, full_path, 272 rc = cifs_get_inode_info_unix(&newinode, full_path,
262 inode->i_sb, xid); 273 inode->i_sb, xid);
263 else { 274 else {
@@ -283,22 +294,17 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
283 } 294 }
284 295
285 if (rc != 0) { 296 if (rc != 0) {
286 cFYI(1, 297 cFYI(1, ("Create worked, get_inode_info failed rc = %d",
287 ("Create worked but get_inode_info failed rc = %d", 298 rc));
288 rc)); 299 } else
289 } else { 300 setup_cifs_dentry(tcon, direntry, newinode);
290 if (pTcon->nocase) 301
291 direntry->d_op = &cifs_ci_dentry_ops;
292 else
293 direntry->d_op = &cifs_dentry_ops;
294 d_instantiate(direntry, newinode);
295 }
296 if ((nd == NULL /* nfsd case - nfs srv does not set nd */) || 302 if ((nd == NULL /* nfsd case - nfs srv does not set nd */) ||
297 (!(nd->flags & LOOKUP_OPEN))) { 303 (!(nd->flags & LOOKUP_OPEN))) {
298 /* mknod case - do not leave file open */ 304 /* mknod case - do not leave file open */
299 CIFSSMBClose(xid, pTcon, fileHandle); 305 CIFSSMBClose(xid, tcon, fileHandle);
300 } else if (newinode) { 306 } else if (newinode) {
301 pCifsFile = 307 struct cifsFileInfo *pCifsFile =
302 kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); 308 kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL);
303 309
304 if (pCifsFile == NULL) 310 if (pCifsFile == NULL)
@@ -316,7 +322,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
316 /* set the following in open now 322 /* set the following in open now
317 pCifsFile->pfile = file; */ 323 pCifsFile->pfile = file; */
318 write_lock(&GlobalSMBSeslock); 324 write_lock(&GlobalSMBSeslock);
319 list_add(&pCifsFile->tlist, &pTcon->openFileList); 325 list_add(&pCifsFile->tlist, &tcon->openFileList);
320 pCifsInode = CIFS_I(newinode); 326 pCifsInode = CIFS_I(newinode);
321 if (pCifsInode) { 327 if (pCifsInode) {
322 /* if readable file instance put first in list*/ 328 /* if readable file instance put first in list*/
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 5ab9896fdcb2..bcf7b5184664 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1285,6 +1285,11 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
1285 cifsInode = CIFS_I(direntry->d_inode); 1285 cifsInode = CIFS_I(direntry->d_inode);
1286 cifsInode->time = 0; /* force revalidate to go get info when 1286 cifsInode->time = 0; /* force revalidate to go get info when
1287 needed */ 1287 needed */
1288
1289 cifsInode = CIFS_I(inode);
1290 cifsInode->time = 0; /* force revalidate to get parent dir info
1291 since cached search results now invalid */
1292
1288 direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = 1293 direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime =
1289 current_fs_time(inode->i_sb); 1294 current_fs_time(inode->i_sb);
1290 1295
diff --git a/fs/cifs/md5.c b/fs/cifs/md5.c
index 462bbfefd4b6..98b66a54c319 100644
--- a/fs/cifs/md5.c
+++ b/fs/cifs/md5.c
@@ -10,8 +10,8 @@
10 * with every copy. 10 * with every copy.
11 * 11 *
12 * To compute the message digest of a chunk of bytes, declare an 12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as 13 * MD5Context structure, pass it to cifs_MD5_init, call cifs_MD5_update as
14 * needed on buffers full of bytes, and then call MD5Final, which 14 * needed on buffers full of bytes, and then call cifs_MD5_final, which
15 * will fill a supplied 16-byte array with the digest. 15 * will fill a supplied 16-byte array with the digest.
16 */ 16 */
17 17
@@ -45,7 +45,7 @@ byteReverse(unsigned char *buf, unsigned longs)
45 * initialization constants. 45 * initialization constants.
46 */ 46 */
47void 47void
48MD5Init(struct MD5Context *ctx) 48cifs_MD5_init(struct MD5Context *ctx)
49{ 49{
50 ctx->buf[0] = 0x67452301; 50 ctx->buf[0] = 0x67452301;
51 ctx->buf[1] = 0xefcdab89; 51 ctx->buf[1] = 0xefcdab89;
@@ -61,7 +61,7 @@ MD5Init(struct MD5Context *ctx)
61 * of bytes. 61 * of bytes.
62 */ 62 */
63void 63void
64MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) 64cifs_MD5_update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
65{ 65{
66 register __u32 t; 66 register __u32 t;
67 67
@@ -110,7 +110,7 @@ MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
110 * 1 0* (64-bit count of bits processed, MSB-first) 110 * 1 0* (64-bit count of bits processed, MSB-first)
111 */ 111 */
112void 112void
113MD5Final(unsigned char digest[16], struct MD5Context *ctx) 113cifs_MD5_final(unsigned char digest[16], struct MD5Context *ctx)
114{ 114{
115 unsigned int count; 115 unsigned int count;
116 unsigned char *p; 116 unsigned char *p;
@@ -165,7 +165,7 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
165 165
166/* 166/*
167 * The core of the MD5 algorithm, this alters an existing MD5 hash to 167 * The core of the MD5 algorithm, this alters an existing MD5 hash to
168 * reflect the addition of 16 longwords of new data. MD5Update blocks 168 * reflect the addition of 16 longwords of new data. cifs_MD5_update blocks
169 * the data and converts bytes into longwords for this routine. 169 * the data and converts bytes into longwords for this routine.
170 */ 170 */
171static void 171static void
@@ -267,9 +267,9 @@ hmac_md5_init_rfc2104(unsigned char *key, int key_len,
267 unsigned char tk[16]; 267 unsigned char tk[16];
268 struct MD5Context tctx; 268 struct MD5Context tctx;
269 269
270 MD5Init(&tctx); 270 cifs_MD5_init(&tctx);
271 MD5Update(&tctx, key, key_len); 271 cifs_MD5_update(&tctx, key, key_len);
272 MD5Final(tk, &tctx); 272 cifs_MD5_final(tk, &tctx);
273 273
274 key = tk; 274 key = tk;
275 key_len = 16; 275 key_len = 16;
@@ -287,8 +287,8 @@ hmac_md5_init_rfc2104(unsigned char *key, int key_len,
287 ctx->k_opad[i] ^= 0x5c; 287 ctx->k_opad[i] ^= 0x5c;
288 } 288 }
289 289
290 MD5Init(&ctx->ctx); 290 cifs_MD5_init(&ctx->ctx);
291 MD5Update(&ctx->ctx, ctx->k_ipad, 64); 291 cifs_MD5_update(&ctx->ctx, ctx->k_ipad, 64);
292} 292}
293#endif 293#endif
294 294
@@ -317,8 +317,8 @@ hmac_md5_init_limK_to_64(const unsigned char *key, int key_len,
317 ctx->k_opad[i] ^= 0x5c; 317 ctx->k_opad[i] ^= 0x5c;
318 } 318 }
319 319
320 MD5Init(&ctx->ctx); 320 cifs_MD5_init(&ctx->ctx);
321 MD5Update(&ctx->ctx, ctx->k_ipad, 64); 321 cifs_MD5_update(&ctx->ctx, ctx->k_ipad, 64);
322} 322}
323 323
324/*********************************************************************** 324/***********************************************************************
@@ -328,7 +328,7 @@ void
328hmac_md5_update(const unsigned char *text, int text_len, 328hmac_md5_update(const unsigned char *text, int text_len,
329 struct HMACMD5Context *ctx) 329 struct HMACMD5Context *ctx)
330{ 330{
331 MD5Update(&ctx->ctx, text, text_len); /* then text of datagram */ 331 cifs_MD5_update(&ctx->ctx, text, text_len); /* then text of datagram */
332} 332}
333 333
334/*********************************************************************** 334/***********************************************************************
@@ -339,12 +339,12 @@ hmac_md5_final(unsigned char *digest, struct HMACMD5Context *ctx)
339{ 339{
340 struct MD5Context ctx_o; 340 struct MD5Context ctx_o;
341 341
342 MD5Final(digest, &ctx->ctx); 342 cifs_MD5_final(digest, &ctx->ctx);
343 343
344 MD5Init(&ctx_o); 344 cifs_MD5_init(&ctx_o);
345 MD5Update(&ctx_o, ctx->k_opad, 64); 345 cifs_MD5_update(&ctx_o, ctx->k_opad, 64);
346 MD5Update(&ctx_o, digest, 16); 346 cifs_MD5_update(&ctx_o, digest, 16);
347 MD5Final(digest, &ctx_o); 347 cifs_MD5_final(digest, &ctx_o);
348} 348}
349 349
350/*********************************************************** 350/***********************************************************
diff --git a/fs/cifs/md5.h b/fs/cifs/md5.h
index f7d4f4197bac..6fba8cb402fd 100644
--- a/fs/cifs/md5.h
+++ b/fs/cifs/md5.h
@@ -20,10 +20,10 @@ struct HMACMD5Context {
20}; 20};
21#endif /* _HMAC_MD5_H */ 21#endif /* _HMAC_MD5_H */
22 22
23void MD5Init(struct MD5Context *context); 23void cifs_MD5_init(struct MD5Context *context);
24void MD5Update(struct MD5Context *context, unsigned char const *buf, 24void cifs_MD5_update(struct MD5Context *context, unsigned char const *buf,
25 unsigned len); 25 unsigned len);
26void MD5Final(unsigned char digest[16], struct MD5Context *context); 26void cifs_MD5_final(unsigned char digest[16], struct MD5Context *context);
27 27
28/* The following definitions come from lib/hmacmd5.c */ 28/* The following definitions come from lib/hmacmd5.c */
29 29
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 7ebe6599ed3a..0ad3e2d116a6 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -154,81 +154,8 @@ void DeleteTconOplockQEntries(struct cifsTconInfo *tcon)
154 spin_unlock(&GlobalMid_Lock); 154 spin_unlock(&GlobalMid_Lock);
155} 155}
156 156
157int
158smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
159 unsigned int smb_buf_length, struct sockaddr *sin, bool noblocksnd)
160{
161 int rc = 0;
162 int i = 0;
163 struct msghdr smb_msg;
164 struct kvec iov;
165 unsigned len = smb_buf_length + 4;
166
167 if (ssocket == NULL)
168 return -ENOTSOCK; /* BB eventually add reconnect code here */
169 iov.iov_base = smb_buffer;
170 iov.iov_len = len;
171
172 smb_msg.msg_name = sin;
173 smb_msg.msg_namelen = sizeof(struct sockaddr);
174 smb_msg.msg_control = NULL;
175 smb_msg.msg_controllen = 0;
176 if (noblocksnd)
177 smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL;
178 else
179 smb_msg.msg_flags = MSG_NOSIGNAL;
180
181 /* smb header is converted in header_assemble. bcc and rest of SMB word
182 area, and byte area if necessary, is converted to littleendian in
183 cifssmb.c and RFC1001 len is converted to bigendian in smb_send
184 Flags2 is converted in SendReceive */
185
186 smb_buffer->smb_buf_length = cpu_to_be32(smb_buffer->smb_buf_length);
187 cFYI(1, ("Sending smb of length %d", smb_buf_length));
188 dump_smb(smb_buffer, len);
189
190 while (len > 0) {
191 rc = kernel_sendmsg(ssocket, &smb_msg, &iov, 1, len);
192 if ((rc == -ENOSPC) || (rc == -EAGAIN)) {
193 i++;
194 /* smaller timeout here than send2 since smaller size */
195 /* Although it may not be required, this also is smaller
196 oplock break time */
197 if (i > 12) {
198 cERROR(1,
199 ("sends on sock %p stuck for 7 seconds",
200 ssocket));
201 rc = -EAGAIN;
202 break;
203 }
204 msleep(1 << i);
205 continue;
206 }
207 if (rc < 0)
208 break;
209 else
210 i = 0; /* reset i after each successful send */
211 iov.iov_base += rc;
212 iov.iov_len -= rc;
213 len -= rc;
214 }
215
216 if (rc < 0) {
217 cERROR(1, ("Error %d sending data on socket to server", rc));
218 } else {
219 rc = 0;
220 }
221
222 /* Don't want to modify the buffer as a
223 side effect of this call. */
224 smb_buffer->smb_buf_length = smb_buf_length;
225
226 return rc;
227}
228
229static int 157static int
230smb_send2(struct TCP_Server_Info *server, struct kvec *iov, int n_vec, 158smb_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec)
231 struct sockaddr *sin, bool noblocksnd)
232{ 159{
233 int rc = 0; 160 int rc = 0;
234 int i = 0; 161 int i = 0;
@@ -243,11 +170,11 @@ smb_send2(struct TCP_Server_Info *server, struct kvec *iov, int n_vec,
243 if (ssocket == NULL) 170 if (ssocket == NULL)
244 return -ENOTSOCK; /* BB eventually add reconnect code here */ 171 return -ENOTSOCK; /* BB eventually add reconnect code here */
245 172
246 smb_msg.msg_name = sin; 173 smb_msg.msg_name = (struct sockaddr *) &server->addr.sockAddr;
247 smb_msg.msg_namelen = sizeof(struct sockaddr); 174 smb_msg.msg_namelen = sizeof(struct sockaddr);
248 smb_msg.msg_control = NULL; 175 smb_msg.msg_control = NULL;
249 smb_msg.msg_controllen = 0; 176 smb_msg.msg_controllen = 0;
250 if (noblocksnd) 177 if (server->noblocksnd)
251 smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL; 178 smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL;
252 else 179 else
253 smb_msg.msg_flags = MSG_NOSIGNAL; 180 smb_msg.msg_flags = MSG_NOSIGNAL;
@@ -272,7 +199,25 @@ smb_send2(struct TCP_Server_Info *server, struct kvec *iov, int n_vec,
272 n_vec - first_vec, total_len); 199 n_vec - first_vec, total_len);
273 if ((rc == -ENOSPC) || (rc == -EAGAIN)) { 200 if ((rc == -ENOSPC) || (rc == -EAGAIN)) {
274 i++; 201 i++;
275 if (i >= 14) { 202 /* if blocking send we try 3 times, since each can block
203 for 5 seconds. For nonblocking we have to try more
204 but wait increasing amounts of time allowing time for
205 socket to clear. The overall time we wait in either
206 case to send on the socket is about 15 seconds.
207 Similarly we wait for 15 seconds for
208 a response from the server in SendReceive[2]
209 for the server to send a response back for
210 most types of requests (except SMB Write
211 past end of file which can be slow, and
212 blocking lock operations). NFS waits slightly longer
213 than CIFS, but this can make it take longer for
214 nonresponsive servers to be detected and 15 seconds
215 is more than enough time for modern networks to
216 send a packet. In most cases if we fail to send
217 after the retries we will kill the socket and
218 reconnect which may clear the network problem.
219 */
220 if ((i >= 14) || (!server->noblocksnd && (i > 2))) {
276 cERROR(1, 221 cERROR(1,
277 ("sends on sock %p stuck for 15 seconds", 222 ("sends on sock %p stuck for 15 seconds",
278 ssocket)); 223 ssocket));
@@ -339,6 +284,18 @@ smb_send2(struct TCP_Server_Info *server, struct kvec *iov, int n_vec,
339 return rc; 284 return rc;
340} 285}
341 286
287int
288smb_send(struct TCP_Server_Info *server, struct smb_hdr *smb_buffer,
289 unsigned int smb_buf_length)
290{
291 struct kvec iov;
292
293 iov.iov_base = smb_buffer;
294 iov.iov_len = smb_buf_length + 4;
295
296 return smb_sendv(server, &iov, 1);
297}
298
342static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op) 299static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op)
343{ 300{
344 if (long_op == CIFS_ASYNC_OP) { 301 if (long_op == CIFS_ASYNC_OP) {
@@ -540,9 +497,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
540#ifdef CONFIG_CIFS_STATS2 497#ifdef CONFIG_CIFS_STATS2
541 atomic_inc(&ses->server->inSend); 498 atomic_inc(&ses->server->inSend);
542#endif 499#endif
543 rc = smb_send2(ses->server, iov, n_vec, 500 rc = smb_sendv(ses->server, iov, n_vec);
544 (struct sockaddr *) &(ses->server->addr.sockAddr),
545 ses->server->noblocksnd);
546#ifdef CONFIG_CIFS_STATS2 501#ifdef CONFIG_CIFS_STATS2
547 atomic_dec(&ses->server->inSend); 502 atomic_dec(&ses->server->inSend);
548 midQ->when_sent = jiffies; 503 midQ->when_sent = jiffies;
@@ -736,9 +691,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
736#ifdef CONFIG_CIFS_STATS2 691#ifdef CONFIG_CIFS_STATS2
737 atomic_inc(&ses->server->inSend); 692 atomic_inc(&ses->server->inSend);
738#endif 693#endif
739 rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length, 694 rc = smb_send(ses->server, in_buf, in_buf->smb_buf_length);
740 (struct sockaddr *) &(ses->server->addr.sockAddr),
741 ses->server->noblocksnd);
742#ifdef CONFIG_CIFS_STATS2 695#ifdef CONFIG_CIFS_STATS2
743 atomic_dec(&ses->server->inSend); 696 atomic_dec(&ses->server->inSend);
744 midQ->when_sent = jiffies; 697 midQ->when_sent = jiffies;
@@ -879,9 +832,7 @@ send_nt_cancel(struct cifsTconInfo *tcon, struct smb_hdr *in_buf,
879 mutex_unlock(&ses->server->srv_mutex); 832 mutex_unlock(&ses->server->srv_mutex);
880 return rc; 833 return rc;
881 } 834 }
882 rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length, 835 rc = smb_send(ses->server, in_buf, in_buf->smb_buf_length);
883 (struct sockaddr *) &(ses->server->addr.sockAddr),
884 ses->server->noblocksnd);
885 mutex_unlock(&ses->server->srv_mutex); 836 mutex_unlock(&ses->server->srv_mutex);
886 return rc; 837 return rc;
887} 838}
@@ -973,9 +924,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,
973#ifdef CONFIG_CIFS_STATS2 924#ifdef CONFIG_CIFS_STATS2
974 atomic_inc(&ses->server->inSend); 925 atomic_inc(&ses->server->inSend);
975#endif 926#endif
976 rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length, 927 rc = smb_send(ses->server, in_buf, in_buf->smb_buf_length);
977 (struct sockaddr *) &(ses->server->addr.sockAddr),
978 ses->server->noblocksnd);
979#ifdef CONFIG_CIFS_STATS2 928#ifdef CONFIG_CIFS_STATS2
980 atomic_dec(&ses->server->inSend); 929 atomic_dec(&ses->server->inSend);
981 midQ->when_sent = jiffies; 930 midQ->when_sent = jiffies;
diff --git a/fs/coda/Kconfig b/fs/coda/Kconfig
new file mode 100644
index 000000000000..c0e5a7fad06d
--- /dev/null
+++ b/fs/coda/Kconfig
@@ -0,0 +1,21 @@
1config CODA_FS
2 tristate "Coda file system support (advanced network fs)"
3 depends on INET
4 help
5 Coda is an advanced network file system, similar to NFS in that it
6 enables you to mount file systems of a remote server and access them
7 with regular Unix commands as if they were sitting on your hard
8 disk. Coda has several advantages over NFS: support for
9 disconnected operation (e.g. for laptops), read/write server
10 replication, security model for authentication and encryption,
11 persistent client caches and write back caching.
12
13 If you say Y here, your Linux box will be able to act as a Coda
14 *client*. You will need user level code as well, both for the
15 client and server. Servers are currently user level, i.e. they need
16 no kernel support. Please read
17 <file:Documentation/filesystems/coda.txt> and check out the Coda
18 home page <http://www.coda.cs.cmu.edu/>.
19
20 To compile the coda client support as a module, choose M here: the
21 module will be called coda.
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 5235c67e7594..c8f8d5904f5e 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -538,6 +538,7 @@ static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
538 * cannot be fixed without breaking all existing apps. 538 * cannot be fixed without breaking all existing apps.
539 */ 539 */
540 case TUNSETIFF: 540 case TUNSETIFF:
541 case TUNGETIFF:
541 case SIOCGIFFLAGS: 542 case SIOCGIFFLAGS:
542 case SIOCGIFMETRIC: 543 case SIOCGIFMETRIC:
543 case SIOCGIFMTU: 544 case SIOCGIFMTU:
@@ -1982,6 +1983,11 @@ COMPATIBLE_IOCTL(TUNSETNOCSUM)
1982COMPATIBLE_IOCTL(TUNSETDEBUG) 1983COMPATIBLE_IOCTL(TUNSETDEBUG)
1983COMPATIBLE_IOCTL(TUNSETPERSIST) 1984COMPATIBLE_IOCTL(TUNSETPERSIST)
1984COMPATIBLE_IOCTL(TUNSETOWNER) 1985COMPATIBLE_IOCTL(TUNSETOWNER)
1986COMPATIBLE_IOCTL(TUNSETLINK)
1987COMPATIBLE_IOCTL(TUNSETGROUP)
1988COMPATIBLE_IOCTL(TUNGETFEATURES)
1989COMPATIBLE_IOCTL(TUNSETOFFLOAD)
1990COMPATIBLE_IOCTL(TUNSETTXFILTER)
1985/* Big V */ 1991/* Big V */
1986COMPATIBLE_IOCTL(VT_SETMODE) 1992COMPATIBLE_IOCTL(VT_SETMODE)
1987COMPATIBLE_IOCTL(VT_GETMODE) 1993COMPATIBLE_IOCTL(VT_GETMODE)
@@ -2573,6 +2579,7 @@ HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
2573HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc) 2579HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
2574HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc) 2580HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
2575HANDLE_IOCTL(TUNSETIFF, dev_ifsioc) 2581HANDLE_IOCTL(TUNSETIFF, dev_ifsioc)
2582HANDLE_IOCTL(TUNGETIFF, dev_ifsioc)
2576HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl) 2583HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl)
2577HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl) 2584HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl)
2578HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl) 2585HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
diff --git a/fs/configfs/Kconfig b/fs/configfs/Kconfig
new file mode 100644
index 000000000000..13587cc97a0b
--- /dev/null
+++ b/fs/configfs/Kconfig
@@ -0,0 +1,11 @@
1config CONFIGFS_FS
2 tristate "Userspace-driven configuration filesystem"
3 depends on SYSFS
4 help
5 configfs is a ram-based filesystem that provides the converse
6 of sysfs's functionality. Where sysfs is a filesystem-based
7 view of kernel objects, configfs is a filesystem-based manager
8 of kernel objects, or config_items.
9
10 Both sysfs and configfs can and should exist together on the
11 same system. One is not a replacement for the other.
diff --git a/fs/cramfs/Kconfig b/fs/cramfs/Kconfig
new file mode 100644
index 000000000000..cd06466f365e
--- /dev/null
+++ b/fs/cramfs/Kconfig
@@ -0,0 +1,19 @@
1config CRAMFS
2 tristate "Compressed ROM file system support (cramfs)"
3 depends on BLOCK
4 select ZLIB_INFLATE
5 help
6 Saying Y here includes support for CramFs (Compressed ROM File
7 System). CramFs is designed to be a simple, small, and compressed
8 file system for ROM based embedded systems. CramFs is read-only,
9 limited to 256MB file systems (with 16MB files), and doesn't support
10 16/32 bits uid/gid, hard links and timestamps.
11
12 See <file:Documentation/filesystems/cramfs.txt> and
13 <file:fs/cramfs/README> for further information.
14
15 To compile this as a module, choose M here: the module will be called
16 cramfs. Note that the root file system (the one containing the
17 directory /) cannot be compiled as a module.
18
19 If unsure, say N.
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index eba87ff3177b..894a32d438d5 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -168,7 +168,7 @@ static int dlm_plock_callback(struct plock_op *op)
168 notify = xop->callback; 168 notify = xop->callback;
169 169
170 if (op->info.rv) { 170 if (op->info.rv) {
171 notify(flc, NULL, op->info.rv); 171 notify(fl, NULL, op->info.rv);
172 goto out; 172 goto out;
173 } 173 }
174 174
@@ -187,7 +187,7 @@ static int dlm_plock_callback(struct plock_op *op)
187 (unsigned long long)op->info.number, file, fl); 187 (unsigned long long)op->info.number, file, fl);
188 } 188 }
189 189
190 rv = notify(flc, NULL, 0); 190 rv = notify(fl, NULL, 0);
191 if (rv) { 191 if (rv) {
192 /* XXX: We need to cancel the fs lock here: */ 192 /* XXX: We need to cancel the fs lock here: */
193 log_print("dlm_plock_callback: lock granted after lock request " 193 log_print("dlm_plock_callback: lock granted after lock request "
@@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
304 if (rv == -ENOENT) 304 if (rv == -ENOENT)
305 rv = 0; 305 rv = 0;
306 else if (rv > 0) { 306 else if (rv > 0) {
307 locks_init_lock(fl);
307 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; 308 fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
309 fl->fl_flags = FL_POSIX;
308 fl->fl_pid = op->info.pid; 310 fl->fl_pid = op->info.pid;
309 fl->fl_start = op->info.start; 311 fl->fl_start = op->info.start;
310 fl->fl_end = op->info.end; 312 fl->fl_end = op->info.end;
diff --git a/fs/dquot.c b/fs/dquot.c
index 48c0571f831d..bca3cac4bee7 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -87,14 +87,17 @@
87#define __DQUOT_PARANOIA 87#define __DQUOT_PARANOIA
88 88
89/* 89/*
90 * There are two quota SMP locks. dq_list_lock protects all lists with quotas 90 * There are three quota SMP locks. dq_list_lock protects all lists with quotas
91 * and quota formats and also dqstats structure containing statistics about the 91 * and quota formats, dqstats structure containing statistics about the lists
92 * lists. dq_data_lock protects data from dq_dqb and also mem_dqinfo structures 92 * dq_data_lock protects data from dq_dqb and also mem_dqinfo structures and
93 * and also guards consistency of dquot->dq_dqb with inode->i_blocks, i_bytes. 93 * also guards consistency of dquot->dq_dqb with inode->i_blocks, i_bytes.
94 * i_blocks and i_bytes updates itself are guarded by i_lock acquired directly 94 * i_blocks and i_bytes updates itself are guarded by i_lock acquired directly
95 * in inode_add_bytes() and inode_sub_bytes(). 95 * in inode_add_bytes() and inode_sub_bytes(). dq_state_lock protects
96 * modifications of quota state (on quotaon and quotaoff) and readers who care
97 * about latest values take it as well.
96 * 98 *
97 * The spinlock ordering is hence: dq_data_lock > dq_list_lock > i_lock 99 * The spinlock ordering is hence: dq_data_lock > dq_list_lock > i_lock,
100 * dq_list_lock > dq_state_lock
98 * 101 *
99 * Note that some things (eg. sb pointer, type, id) doesn't change during 102 * Note that some things (eg. sb pointer, type, id) doesn't change during
100 * the life of the dquot structure and so needn't to be protected by a lock 103 * the life of the dquot structure and so needn't to be protected by a lock
@@ -103,12 +106,7 @@
103 * operation is just reading pointers from inode (or not using them at all) the 106 * operation is just reading pointers from inode (or not using them at all) the
104 * read lock is enough. If pointers are altered function must hold write lock 107 * read lock is enough. If pointers are altered function must hold write lock
105 * (these locking rules also apply for S_NOQUOTA flag in the inode - note that 108 * (these locking rules also apply for S_NOQUOTA flag in the inode - note that
106 * for altering the flag i_mutex is also needed). If operation is holding 109 * for altering the flag i_mutex is also needed).
107 * reference to dquot in other way (e.g. quotactl ops) it must be guarded by
108 * dqonoff_mutex.
109 * This locking assures that:
110 * a) update/access to dquot pointers in inode is serialized
111 * b) everyone is guarded against invalidate_dquots()
112 * 110 *
113 * Each dquot has its dq_lock mutex. Locked dquots might not be referenced 111 * Each dquot has its dq_lock mutex. Locked dquots might not be referenced
114 * from inodes (dquot_alloc_space() and such don't check the dq_lock). 112 * from inodes (dquot_alloc_space() and such don't check the dq_lock).
@@ -122,10 +120,17 @@
122 * Lock ordering (including related VFS locks) is the following: 120 * Lock ordering (including related VFS locks) is the following:
123 * i_mutex > dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > 121 * i_mutex > dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock >
124 * dqio_mutex 122 * dqio_mutex
123 * The lock ordering of dqptr_sem imposed by quota code is only dqonoff_sem >
124 * dqptr_sem. But filesystem has to count with the fact that functions such as
125 * dquot_alloc_space() acquire dqptr_sem and they usually have to be called
126 * from inside a transaction to keep filesystem consistency after a crash. Also
127 * filesystems usually want to do some IO on dquot from ->mark_dirty which is
128 * called with dqptr_sem held.
125 * i_mutex on quota files is special (it's below dqio_mutex) 129 * i_mutex on quota files is special (it's below dqio_mutex)
126 */ 130 */
127 131
128static DEFINE_SPINLOCK(dq_list_lock); 132static DEFINE_SPINLOCK(dq_list_lock);
133static DEFINE_SPINLOCK(dq_state_lock);
129DEFINE_SPINLOCK(dq_data_lock); 134DEFINE_SPINLOCK(dq_data_lock);
130 135
131static char *quotatypes[] = INITQFNAMES; 136static char *quotatypes[] = INITQFNAMES;
@@ -428,7 +433,7 @@ static inline void do_destroy_dquot(struct dquot *dquot)
428 * quota is disabled and pointers from inodes removed so there cannot be new 433 * quota is disabled and pointers from inodes removed so there cannot be new
429 * quota users. There can still be some users of quotas due to inodes being 434 * quota users. There can still be some users of quotas due to inodes being
430 * just deleted or pruned by prune_icache() (those are not attached to any 435 * just deleted or pruned by prune_icache() (those are not attached to any
431 * list). We have to wait for such users. 436 * list) or parallel quotactl call. We have to wait for such users.
432 */ 437 */
433static void invalidate_dquots(struct super_block *sb, int type) 438static void invalidate_dquots(struct super_block *sb, int type)
434{ 439{
@@ -600,7 +605,6 @@ static struct shrinker dqcache_shrinker = {
600/* 605/*
601 * Put reference to dquot 606 * Put reference to dquot
602 * NOTE: If you change this function please check whether dqput_blocks() works right... 607 * NOTE: If you change this function please check whether dqput_blocks() works right...
603 * MUST be called with either dqptr_sem or dqonoff_mutex held
604 */ 608 */
605void dqput(struct dquot *dquot) 609void dqput(struct dquot *dquot)
606{ 610{
@@ -697,36 +701,30 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type)
697} 701}
698 702
699/* 703/*
700 * Check whether dquot is in memory.
701 * MUST be called with either dqptr_sem or dqonoff_mutex held
702 */
703int dquot_is_cached(struct super_block *sb, unsigned int id, int type)
704{
705 unsigned int hashent = hashfn(sb, id, type);
706 int ret = 0;
707
708 if (!sb_has_quota_active(sb, type))
709 return 0;
710 spin_lock(&dq_list_lock);
711 if (find_dquot(hashent, sb, id, type) != NODQUOT)
712 ret = 1;
713 spin_unlock(&dq_list_lock);
714 return ret;
715}
716
717/*
718 * Get reference to dquot 704 * Get reference to dquot
719 * MUST be called with either dqptr_sem or dqonoff_mutex held 705 *
706 * Locking is slightly tricky here. We are guarded from parallel quotaoff()
707 * destroying our dquot by:
708 * a) checking for quota flags under dq_list_lock and
709 * b) getting a reference to dquot before we release dq_list_lock
720 */ 710 */
721struct dquot *dqget(struct super_block *sb, unsigned int id, int type) 711struct dquot *dqget(struct super_block *sb, unsigned int id, int type)
722{ 712{
723 unsigned int hashent = hashfn(sb, id, type); 713 unsigned int hashent = hashfn(sb, id, type);
724 struct dquot *dquot, *empty = NODQUOT; 714 struct dquot *dquot = NODQUOT, *empty = NODQUOT;
725 715
726 if (!sb_has_quota_active(sb, type)) 716 if (!sb_has_quota_active(sb, type))
727 return NODQUOT; 717 return NODQUOT;
728we_slept: 718we_slept:
729 spin_lock(&dq_list_lock); 719 spin_lock(&dq_list_lock);
720 spin_lock(&dq_state_lock);
721 if (!sb_has_quota_active(sb, type)) {
722 spin_unlock(&dq_state_lock);
723 spin_unlock(&dq_list_lock);
724 goto out;
725 }
726 spin_unlock(&dq_state_lock);
727
730 if ((dquot = find_dquot(hashent, sb, id, type)) == NODQUOT) { 728 if ((dquot = find_dquot(hashent, sb, id, type)) == NODQUOT) {
731 if (empty == NODQUOT) { 729 if (empty == NODQUOT) {
732 spin_unlock(&dq_list_lock); 730 spin_unlock(&dq_list_lock);
@@ -735,6 +733,7 @@ we_slept:
735 goto we_slept; 733 goto we_slept;
736 } 734 }
737 dquot = empty; 735 dquot = empty;
736 empty = NODQUOT;
738 dquot->dq_id = id; 737 dquot->dq_id = id;
739 /* all dquots go on the inuse_list */ 738 /* all dquots go on the inuse_list */
740 put_inuse(dquot); 739 put_inuse(dquot);
@@ -749,8 +748,6 @@ we_slept:
749 dqstats.cache_hits++; 748 dqstats.cache_hits++;
750 dqstats.lookups++; 749 dqstats.lookups++;
751 spin_unlock(&dq_list_lock); 750 spin_unlock(&dq_list_lock);
752 if (empty)
753 do_destroy_dquot(empty);
754 } 751 }
755 /* Wait for dq_lock - after this we know that either dquot_release() is already 752 /* Wait for dq_lock - after this we know that either dquot_release() is already
756 * finished or it will be canceled due to dq_count > 1 test */ 753 * finished or it will be canceled due to dq_count > 1 test */
@@ -758,11 +755,15 @@ we_slept:
758 /* Read the dquot and instantiate it (everything done only if needed) */ 755 /* Read the dquot and instantiate it (everything done only if needed) */
759 if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && sb->dq_op->acquire_dquot(dquot) < 0) { 756 if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && sb->dq_op->acquire_dquot(dquot) < 0) {
760 dqput(dquot); 757 dqput(dquot);
761 return NODQUOT; 758 dquot = NODQUOT;
759 goto out;
762 } 760 }
763#ifdef __DQUOT_PARANOIA 761#ifdef __DQUOT_PARANOIA
764 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */ 762 BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */
765#endif 763#endif
764out:
765 if (empty)
766 do_destroy_dquot(empty);
766 767
767 return dquot; 768 return dquot;
768} 769}
@@ -1198,63 +1199,76 @@ static int info_bdq_free(struct dquot *dquot, qsize_t space)
1198} 1199}
1199/* 1200/*
1200 * Initialize quota pointers in inode 1201 * Initialize quota pointers in inode
1201 * Transaction must be started at entry 1202 * We do things in a bit complicated way but by that we avoid calling
1203 * dqget() and thus filesystem callbacks under dqptr_sem.
1202 */ 1204 */
1203int dquot_initialize(struct inode *inode, int type) 1205int dquot_initialize(struct inode *inode, int type)
1204{ 1206{
1205 unsigned int id = 0; 1207 unsigned int id = 0;
1206 int cnt, ret = 0; 1208 int cnt, ret = 0;
1209 struct dquot *got[MAXQUOTAS] = { NODQUOT, NODQUOT };
1210 struct super_block *sb = inode->i_sb;
1207 1211
1208 /* First test before acquiring mutex - solves deadlocks when we 1212 /* First test before acquiring mutex - solves deadlocks when we
1209 * re-enter the quota code and are already holding the mutex */ 1213 * re-enter the quota code and are already holding the mutex */
1210 if (IS_NOQUOTA(inode)) 1214 if (IS_NOQUOTA(inode))
1211 return 0; 1215 return 0;
1212 down_write(&sb_dqopt(inode->i_sb)->dqptr_sem); 1216
1217 /* First get references to structures we might need. */
1218 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1219 if (type != -1 && cnt != type)
1220 continue;
1221 switch (cnt) {
1222 case USRQUOTA:
1223 id = inode->i_uid;
1224 break;
1225 case GRPQUOTA:
1226 id = inode->i_gid;
1227 break;
1228 }
1229 got[cnt] = dqget(sb, id, cnt);
1230 }
1231
1232 down_write(&sb_dqopt(sb)->dqptr_sem);
1213 /* Having dqptr_sem we know NOQUOTA flags can't be altered... */ 1233 /* Having dqptr_sem we know NOQUOTA flags can't be altered... */
1214 if (IS_NOQUOTA(inode)) 1234 if (IS_NOQUOTA(inode))
1215 goto out_err; 1235 goto out_err;
1216 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1236 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1217 if (type != -1 && cnt != type) 1237 if (type != -1 && cnt != type)
1218 continue; 1238 continue;
1239 /* Avoid races with quotaoff() */
1240 if (!sb_has_quota_active(sb, cnt))
1241 continue;
1219 if (inode->i_dquot[cnt] == NODQUOT) { 1242 if (inode->i_dquot[cnt] == NODQUOT) {
1220 switch (cnt) { 1243 inode->i_dquot[cnt] = got[cnt];
1221 case USRQUOTA: 1244 got[cnt] = NODQUOT;
1222 id = inode->i_uid;
1223 break;
1224 case GRPQUOTA:
1225 id = inode->i_gid;
1226 break;
1227 }
1228 inode->i_dquot[cnt] = dqget(inode->i_sb, id, cnt);
1229 } 1245 }
1230 } 1246 }
1231out_err: 1247out_err:
1232 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem); 1248 up_write(&sb_dqopt(sb)->dqptr_sem);
1249 /* Drop unused references */
1250 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1251 dqput(got[cnt]);
1233 return ret; 1252 return ret;
1234} 1253}
1235 1254
1236/* 1255/*
1237 * Release all quotas referenced by inode 1256 * Release all quotas referenced by inode
1238 * Transaction must be started at an entry
1239 */ 1257 */
1240int dquot_drop_locked(struct inode *inode) 1258int dquot_drop(struct inode *inode)
1241{ 1259{
1242 int cnt; 1260 int cnt;
1261 struct dquot *put[MAXQUOTAS];
1243 1262
1263 down_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1244 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1264 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1245 if (inode->i_dquot[cnt] != NODQUOT) { 1265 put[cnt] = inode->i_dquot[cnt];
1246 dqput(inode->i_dquot[cnt]); 1266 inode->i_dquot[cnt] = NODQUOT;
1247 inode->i_dquot[cnt] = NODQUOT;
1248 }
1249 } 1267 }
1250 return 0;
1251}
1252
1253int dquot_drop(struct inode *inode)
1254{
1255 down_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1256 dquot_drop_locked(inode);
1257 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem); 1268 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1269
1270 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1271 dqput(put[cnt]);
1258 return 0; 1272 return 0;
1259} 1273}
1260 1274
@@ -1470,8 +1484,9 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr)
1470 qsize_t space; 1484 qsize_t space;
1471 struct dquot *transfer_from[MAXQUOTAS]; 1485 struct dquot *transfer_from[MAXQUOTAS];
1472 struct dquot *transfer_to[MAXQUOTAS]; 1486 struct dquot *transfer_to[MAXQUOTAS];
1473 int cnt, ret = NO_QUOTA, chuid = (iattr->ia_valid & ATTR_UID) && inode->i_uid != iattr->ia_uid, 1487 int cnt, ret = QUOTA_OK;
1474 chgid = (iattr->ia_valid & ATTR_GID) && inode->i_gid != iattr->ia_gid; 1488 int chuid = iattr->ia_valid & ATTR_UID && inode->i_uid != iattr->ia_uid,
1489 chgid = iattr->ia_valid & ATTR_GID && inode->i_gid != iattr->ia_gid;
1475 char warntype_to[MAXQUOTAS]; 1490 char warntype_to[MAXQUOTAS];
1476 char warntype_from_inodes[MAXQUOTAS], warntype_from_space[MAXQUOTAS]; 1491 char warntype_from_inodes[MAXQUOTAS], warntype_from_space[MAXQUOTAS];
1477 1492
@@ -1479,21 +1494,11 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr)
1479 * re-enter the quota code and are already holding the mutex */ 1494 * re-enter the quota code and are already holding the mutex */
1480 if (IS_NOQUOTA(inode)) 1495 if (IS_NOQUOTA(inode))
1481 return QUOTA_OK; 1496 return QUOTA_OK;
1482 /* Clear the arrays */ 1497 /* Initialize the arrays */
1483 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1498 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1484 transfer_to[cnt] = transfer_from[cnt] = NODQUOT; 1499 transfer_from[cnt] = NODQUOT;
1500 transfer_to[cnt] = NODQUOT;
1485 warntype_to[cnt] = QUOTA_NL_NOWARN; 1501 warntype_to[cnt] = QUOTA_NL_NOWARN;
1486 }
1487 down_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1488 /* Now recheck reliably when holding dqptr_sem */
1489 if (IS_NOQUOTA(inode)) { /* File without quota accounting? */
1490 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1491 return QUOTA_OK;
1492 }
1493 /* First build the transfer_to list - here we can block on
1494 * reading/instantiating of dquots. We know that the transaction for
1495 * us was already started so we don't violate lock ranking here */
1496 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1497 switch (cnt) { 1502 switch (cnt) {
1498 case USRQUOTA: 1503 case USRQUOTA:
1499 if (!chuid) 1504 if (!chuid)
@@ -1507,6 +1512,13 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr)
1507 break; 1512 break;
1508 } 1513 }
1509 } 1514 }
1515
1516 down_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1517 /* Now recheck reliably when holding dqptr_sem */
1518 if (IS_NOQUOTA(inode)) { /* File without quota accounting? */
1519 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1520 goto put_all;
1521 }
1510 spin_lock(&dq_data_lock); 1522 spin_lock(&dq_data_lock);
1511 space = inode_get_bytes(inode); 1523 space = inode_get_bytes(inode);
1512 /* Build the transfer_from list and check the limits */ 1524 /* Build the transfer_from list and check the limits */
@@ -1517,7 +1529,7 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr)
1517 if (check_idq(transfer_to[cnt], 1, warntype_to + cnt) == 1529 if (check_idq(transfer_to[cnt], 1, warntype_to + cnt) ==
1518 NO_QUOTA || check_bdq(transfer_to[cnt], space, 0, 1530 NO_QUOTA || check_bdq(transfer_to[cnt], space, 0,
1519 warntype_to + cnt) == NO_QUOTA) 1531 warntype_to + cnt) == NO_QUOTA)
1520 goto warn_put_all; 1532 goto over_quota;
1521 } 1533 }
1522 1534
1523 /* 1535 /*
@@ -1545,28 +1557,37 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr)
1545 1557
1546 inode->i_dquot[cnt] = transfer_to[cnt]; 1558 inode->i_dquot[cnt] = transfer_to[cnt];
1547 } 1559 }
1548 ret = QUOTA_OK;
1549warn_put_all:
1550 spin_unlock(&dq_data_lock); 1560 spin_unlock(&dq_data_lock);
1561 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1562
1551 /* Dirtify all the dquots - this can block when journalling */ 1563 /* Dirtify all the dquots - this can block when journalling */
1552 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1564 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1553 if (transfer_from[cnt]) 1565 if (transfer_from[cnt])
1554 mark_dquot_dirty(transfer_from[cnt]); 1566 mark_dquot_dirty(transfer_from[cnt]);
1555 if (transfer_to[cnt]) 1567 if (transfer_to[cnt]) {
1556 mark_dquot_dirty(transfer_to[cnt]); 1568 mark_dquot_dirty(transfer_to[cnt]);
1569 /* The reference we got is transferred to the inode */
1570 transfer_to[cnt] = NODQUOT;
1571 }
1557 } 1572 }
1573warn_put_all:
1558 flush_warnings(transfer_to, warntype_to); 1574 flush_warnings(transfer_to, warntype_to);
1559 flush_warnings(transfer_from, warntype_from_inodes); 1575 flush_warnings(transfer_from, warntype_from_inodes);
1560 flush_warnings(transfer_from, warntype_from_space); 1576 flush_warnings(transfer_from, warntype_from_space);
1561 1577put_all:
1562 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1578 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1563 if (ret == QUOTA_OK && transfer_from[cnt] != NODQUOT) 1579 dqput(transfer_from[cnt]);
1564 dqput(transfer_from[cnt]); 1580 dqput(transfer_to[cnt]);
1565 if (ret == NO_QUOTA && transfer_to[cnt] != NODQUOT)
1566 dqput(transfer_to[cnt]);
1567 } 1581 }
1568 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1569 return ret; 1582 return ret;
1583over_quota:
1584 spin_unlock(&dq_data_lock);
1585 up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
1586 /* Clear dquot pointers we don't want to dqput() */
1587 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1588 transfer_from[cnt] = NODQUOT;
1589 ret = NO_QUOTA;
1590 goto warn_put_all;
1570} 1591}
1571 1592
1572/* Wrapper for transferring ownership of an inode */ 1593/* Wrapper for transferring ownership of an inode */
@@ -1651,19 +1672,24 @@ int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags)
1651 continue; 1672 continue;
1652 1673
1653 if (flags & DQUOT_SUSPENDED) { 1674 if (flags & DQUOT_SUSPENDED) {
1675 spin_lock(&dq_state_lock);
1654 dqopt->flags |= 1676 dqopt->flags |=
1655 dquot_state_flag(DQUOT_SUSPENDED, cnt); 1677 dquot_state_flag(DQUOT_SUSPENDED, cnt);
1678 spin_unlock(&dq_state_lock);
1656 } else { 1679 } else {
1680 spin_lock(&dq_state_lock);
1657 dqopt->flags &= ~dquot_state_flag(flags, cnt); 1681 dqopt->flags &= ~dquot_state_flag(flags, cnt);
1658 /* Turning off suspended quotas? */ 1682 /* Turning off suspended quotas? */
1659 if (!sb_has_quota_loaded(sb, cnt) && 1683 if (!sb_has_quota_loaded(sb, cnt) &&
1660 sb_has_quota_suspended(sb, cnt)) { 1684 sb_has_quota_suspended(sb, cnt)) {
1661 dqopt->flags &= ~dquot_state_flag( 1685 dqopt->flags &= ~dquot_state_flag(
1662 DQUOT_SUSPENDED, cnt); 1686 DQUOT_SUSPENDED, cnt);
1687 spin_unlock(&dq_state_lock);
1663 iput(dqopt->files[cnt]); 1688 iput(dqopt->files[cnt]);
1664 dqopt->files[cnt] = NULL; 1689 dqopt->files[cnt] = NULL;
1665 continue; 1690 continue;
1666 } 1691 }
1692 spin_unlock(&dq_state_lock);
1667 } 1693 }
1668 1694
1669 /* We still have to keep quota loaded? */ 1695 /* We still have to keep quota loaded? */
@@ -1830,7 +1856,9 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
1830 } 1856 }
1831 mutex_unlock(&dqopt->dqio_mutex); 1857 mutex_unlock(&dqopt->dqio_mutex);
1832 mutex_unlock(&inode->i_mutex); 1858 mutex_unlock(&inode->i_mutex);
1859 spin_lock(&dq_state_lock);
1833 dqopt->flags |= dquot_state_flag(flags, type); 1860 dqopt->flags |= dquot_state_flag(flags, type);
1861 spin_unlock(&dq_state_lock);
1834 1862
1835 add_dquot_ref(sb, type); 1863 add_dquot_ref(sb, type);
1836 mutex_unlock(&dqopt->dqonoff_mutex); 1864 mutex_unlock(&dqopt->dqonoff_mutex);
@@ -1872,9 +1900,11 @@ static int vfs_quota_on_remount(struct super_block *sb, int type)
1872 } 1900 }
1873 inode = dqopt->files[type]; 1901 inode = dqopt->files[type];
1874 dqopt->files[type] = NULL; 1902 dqopt->files[type] = NULL;
1903 spin_lock(&dq_state_lock);
1875 flags = dqopt->flags & dquot_state_flag(DQUOT_USAGE_ENABLED | 1904 flags = dqopt->flags & dquot_state_flag(DQUOT_USAGE_ENABLED |
1876 DQUOT_LIMITS_ENABLED, type); 1905 DQUOT_LIMITS_ENABLED, type);
1877 dqopt->flags &= ~dquot_state_flag(DQUOT_STATE_FLAGS, type); 1906 dqopt->flags &= ~dquot_state_flag(DQUOT_STATE_FLAGS, type);
1907 spin_unlock(&dq_state_lock);
1878 mutex_unlock(&dqopt->dqonoff_mutex); 1908 mutex_unlock(&dqopt->dqonoff_mutex);
1879 1909
1880 flags = dquot_generic_flag(flags, type); 1910 flags = dquot_generic_flag(flags, type);
@@ -1952,7 +1982,9 @@ int vfs_quota_enable(struct inode *inode, int type, int format_id,
1952 ret = -EBUSY; 1982 ret = -EBUSY;
1953 goto out_lock; 1983 goto out_lock;
1954 } 1984 }
1985 spin_lock(&dq_state_lock);
1955 sb_dqopt(sb)->flags |= dquot_state_flag(flags, type); 1986 sb_dqopt(sb)->flags |= dquot_state_flag(flags, type);
1987 spin_unlock(&dq_state_lock);
1956out_lock: 1988out_lock:
1957 mutex_unlock(&dqopt->dqonoff_mutex); 1989 mutex_unlock(&dqopt->dqonoff_mutex);
1958 return ret; 1990 return ret;
@@ -2039,14 +2071,12 @@ int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d
2039{ 2071{
2040 struct dquot *dquot; 2072 struct dquot *dquot;
2041 2073
2042 mutex_lock(&sb_dqopt(sb)->dqonoff_mutex); 2074 dquot = dqget(sb, id, type);
2043 if (!(dquot = dqget(sb, id, type))) { 2075 if (dquot == NODQUOT)
2044 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
2045 return -ESRCH; 2076 return -ESRCH;
2046 }
2047 do_get_dqblk(dquot, di); 2077 do_get_dqblk(dquot, di);
2048 dqput(dquot); 2078 dqput(dquot);
2049 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); 2079
2050 return 0; 2080 return 0;
2051} 2081}
2052 2082
@@ -2130,7 +2160,6 @@ int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d
2130 struct dquot *dquot; 2160 struct dquot *dquot;
2131 int rc; 2161 int rc;
2132 2162
2133 mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
2134 dquot = dqget(sb, id, type); 2163 dquot = dqget(sb, id, type);
2135 if (!dquot) { 2164 if (!dquot) {
2136 rc = -ESRCH; 2165 rc = -ESRCH;
@@ -2139,7 +2168,6 @@ int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d
2139 rc = do_set_dqblk(dquot, di); 2168 rc = do_set_dqblk(dquot, di);
2140 dqput(dquot); 2169 dqput(dquot);
2141out: 2170out:
2142 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
2143 return rc; 2171 return rc;
2144} 2172}
2145 2173
@@ -2370,11 +2398,9 @@ EXPORT_SYMBOL(dquot_release);
2370EXPORT_SYMBOL(dquot_mark_dquot_dirty); 2398EXPORT_SYMBOL(dquot_mark_dquot_dirty);
2371EXPORT_SYMBOL(dquot_initialize); 2399EXPORT_SYMBOL(dquot_initialize);
2372EXPORT_SYMBOL(dquot_drop); 2400EXPORT_SYMBOL(dquot_drop);
2373EXPORT_SYMBOL(dquot_drop_locked);
2374EXPORT_SYMBOL(vfs_dq_drop); 2401EXPORT_SYMBOL(vfs_dq_drop);
2375EXPORT_SYMBOL(dqget); 2402EXPORT_SYMBOL(dqget);
2376EXPORT_SYMBOL(dqput); 2403EXPORT_SYMBOL(dqput);
2377EXPORT_SYMBOL(dquot_is_cached);
2378EXPORT_SYMBOL(dquot_alloc_space); 2404EXPORT_SYMBOL(dquot_alloc_space);
2379EXPORT_SYMBOL(dquot_alloc_inode); 2405EXPORT_SYMBOL(dquot_alloc_inode);
2380EXPORT_SYMBOL(dquot_free_space); 2406EXPORT_SYMBOL(dquot_free_space);
diff --git a/fs/ecryptfs/Kconfig b/fs/ecryptfs/Kconfig
new file mode 100644
index 000000000000..0c754e64232b
--- /dev/null
+++ b/fs/ecryptfs/Kconfig
@@ -0,0 +1,11 @@
1config ECRYPT_FS
2 tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
3 depends on EXPERIMENTAL && KEYS && CRYPTO && NET
4 help
5 Encrypted filesystem that operates on the VFS layer. See
6 <file:Documentation/filesystems/ecryptfs.txt> to learn more about
7 eCryptfs. Userspace components are required and can be
8 obtained from <http://ecryptfs.sf.net>.
9
10 To compile this file system support as a module, choose M here: the
11 module will be called ecryptfs.
diff --git a/fs/efs/Kconfig b/fs/efs/Kconfig
new file mode 100644
index 000000000000..6ebfc1c207a8
--- /dev/null
+++ b/fs/efs/Kconfig
@@ -0,0 +1,14 @@
1config EFS_FS
2 tristate "EFS file system support (read only) (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 help
5 EFS is an older file system used for non-ISO9660 CD-ROMs and hard
6 disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer
7 uses the XFS file system for hard disk partitions however).
8
9 This implementation only offers read-only access. If you don't know
10 what all this is about, it's safe to say N. For more information
11 about EFS see its home page at <http://aeschi.ch.eu.org/efs/>.
12
13 To compile the EFS file system support as a module, choose M here: the
14 module will be called efs.
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index ba2f9ec71192..011b9b8c90c6 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -234,8 +234,6 @@ struct ep_pqueue {
234/* 234/*
235 * Configuration options available inside /proc/sys/fs/epoll/ 235 * Configuration options available inside /proc/sys/fs/epoll/
236 */ 236 */
237/* Maximum number of epoll devices, per user */
238static int max_user_instances __read_mostly;
239/* Maximum number of epoll watched descriptors, per user */ 237/* Maximum number of epoll watched descriptors, per user */
240static int max_user_watches __read_mostly; 238static int max_user_watches __read_mostly;
241 239
@@ -261,14 +259,6 @@ static int zero;
261 259
262ctl_table epoll_table[] = { 260ctl_table epoll_table[] = {
263 { 261 {
264 .procname = "max_user_instances",
265 .data = &max_user_instances,
266 .maxlen = sizeof(int),
267 .mode = 0644,
268 .proc_handler = &proc_dointvec_minmax,
269 .extra1 = &zero,
270 },
271 {
272 .procname = "max_user_watches", 262 .procname = "max_user_watches",
273 .data = &max_user_watches, 263 .data = &max_user_watches,
274 .maxlen = sizeof(int), 264 .maxlen = sizeof(int),
@@ -491,7 +481,6 @@ static void ep_free(struct eventpoll *ep)
491 481
492 mutex_unlock(&epmutex); 482 mutex_unlock(&epmutex);
493 mutex_destroy(&ep->mtx); 483 mutex_destroy(&ep->mtx);
494 atomic_dec(&ep->user->epoll_devs);
495 free_uid(ep->user); 484 free_uid(ep->user);
496 kfree(ep); 485 kfree(ep);
497} 486}
@@ -581,10 +570,6 @@ static int ep_alloc(struct eventpoll **pep)
581 struct eventpoll *ep; 570 struct eventpoll *ep;
582 571
583 user = get_current_user(); 572 user = get_current_user();
584 error = -EMFILE;
585 if (unlikely(atomic_read(&user->epoll_devs) >=
586 max_user_instances))
587 goto free_uid;
588 error = -ENOMEM; 573 error = -ENOMEM;
589 ep = kzalloc(sizeof(*ep), GFP_KERNEL); 574 ep = kzalloc(sizeof(*ep), GFP_KERNEL);
590 if (unlikely(!ep)) 575 if (unlikely(!ep))
@@ -1141,7 +1126,6 @@ SYSCALL_DEFINE1(epoll_create1, int, flags)
1141 flags & O_CLOEXEC); 1126 flags & O_CLOEXEC);
1142 if (fd < 0) 1127 if (fd < 0)
1143 ep_free(ep); 1128 ep_free(ep);
1144 atomic_inc(&ep->user->epoll_devs);
1145 1129
1146error_return: 1130error_return:
1147 DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", 1131 DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
@@ -1366,8 +1350,10 @@ static int __init eventpoll_init(void)
1366 struct sysinfo si; 1350 struct sysinfo si;
1367 1351
1368 si_meminfo(&si); 1352 si_meminfo(&si);
1369 max_user_instances = 128; 1353 /*
1370 max_user_watches = (((si.totalram - si.totalhigh) / 32) << PAGE_SHIFT) / 1354 * Allows top 4% of lomem to be allocated for epoll watches (per user).
1355 */
1356 max_user_watches = (((si.totalram - si.totalhigh) / 25) << PAGE_SHIFT) /
1371 EP_ITEM_COST; 1357 EP_ITEM_COST;
1372 1358
1373 /* Initialize the structure used to perform safe poll wait head wake ups */ 1359 /* Initialize the structure used to perform safe poll wait head wake ups */
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 69a3d19ca9fd..4db4ffa1edad 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -1358,7 +1358,7 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1358 struct fake_dirent *fde; 1358 struct fake_dirent *fde;
1359 1359
1360 blocksize = dir->i_sb->s_blocksize; 1360 blocksize = dir->i_sb->s_blocksize;
1361 dxtrace(printk("Creating index\n")); 1361 dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino));
1362 retval = ext3_journal_get_write_access(handle, bh); 1362 retval = ext3_journal_get_write_access(handle, bh);
1363 if (retval) { 1363 if (retval) {
1364 ext3_std_error(dir->i_sb, retval); 1364 ext3_std_error(dir->i_sb, retval);
@@ -1367,6 +1367,19 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1367 } 1367 }
1368 root = (struct dx_root *) bh->b_data; 1368 root = (struct dx_root *) bh->b_data;
1369 1369
1370 /* The 0th block becomes the root, move the dirents out */
1371 fde = &root->dotdot;
1372 de = (struct ext3_dir_entry_2 *)((char *)fde +
1373 ext3_rec_len_from_disk(fde->rec_len));
1374 if ((char *) de >= (((char *) root) + blocksize)) {
1375 ext3_error(dir->i_sb, __func__,
1376 "invalid rec_len for '..' in inode %lu",
1377 dir->i_ino);
1378 brelse(bh);
1379 return -EIO;
1380 }
1381 len = ((char *) root) + blocksize - (char *) de;
1382
1370 bh2 = ext3_append (handle, dir, &block, &retval); 1383 bh2 = ext3_append (handle, dir, &block, &retval);
1371 if (!(bh2)) { 1384 if (!(bh2)) {
1372 brelse(bh); 1385 brelse(bh);
@@ -1375,11 +1388,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1375 EXT3_I(dir)->i_flags |= EXT3_INDEX_FL; 1388 EXT3_I(dir)->i_flags |= EXT3_INDEX_FL;
1376 data1 = bh2->b_data; 1389 data1 = bh2->b_data;
1377 1390
1378 /* The 0th block becomes the root, move the dirents out */
1379 fde = &root->dotdot;
1380 de = (struct ext3_dir_entry_2 *)((char *)fde +
1381 ext3_rec_len_from_disk(fde->rec_len));
1382 len = ((char *) root) + blocksize - (char *) de;
1383 memcpy (data1, de, len); 1391 memcpy (data1, de, len);
1384 de = (struct ext3_dir_entry_2 *) data1; 1392 de = (struct ext3_dir_entry_2 *) data1;
1385 top = data1 + len; 1393 top = data1 + len;
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 6bba06b09dd1..9a50b8052dcf 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -684,15 +684,15 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
684 gdp = ext4_get_group_desc(sb, i, NULL); 684 gdp = ext4_get_group_desc(sb, i, NULL);
685 if (!gdp) 685 if (!gdp)
686 continue; 686 continue;
687 desc_count += le16_to_cpu(gdp->bg_free_blocks_count); 687 desc_count += ext4_free_blks_count(sb, gdp);
688 brelse(bitmap_bh); 688 brelse(bitmap_bh);
689 bitmap_bh = ext4_read_block_bitmap(sb, i); 689 bitmap_bh = ext4_read_block_bitmap(sb, i);
690 if (bitmap_bh == NULL) 690 if (bitmap_bh == NULL)
691 continue; 691 continue;
692 692
693 x = ext4_count_free(bitmap_bh, sb->s_blocksize); 693 x = ext4_count_free(bitmap_bh, sb->s_blocksize);
694 printk(KERN_DEBUG "group %lu: stored = %d, counted = %u\n", 694 printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n",
695 i, le16_to_cpu(gdp->bg_free_blocks_count), x); 695 i, ext4_free_blks_count(sb, gdp), x);
696 bitmap_count += x; 696 bitmap_count += x;
697 } 697 }
698 brelse(bitmap_bh); 698 brelse(bitmap_bh);
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index c668e4377d76..aafc9eba1c25 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1206,8 +1206,11 @@ static inline void ext4_r_blocks_count_set(struct ext4_super_block *es,
1206 1206
1207static inline loff_t ext4_isize(struct ext4_inode *raw_inode) 1207static inline loff_t ext4_isize(struct ext4_inode *raw_inode)
1208{ 1208{
1209 return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | 1209 if (S_ISREG(le16_to_cpu(raw_inode->i_mode)))
1210 le32_to_cpu(raw_inode->i_size_lo); 1210 return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) |
1211 le32_to_cpu(raw_inode->i_size_lo);
1212 else
1213 return (loff_t) le32_to_cpu(raw_inode->i_size_lo);
1211} 1214}
1212 1215
1213static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size) 1216static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 54bf0623a9ae..e2eab196875f 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3048,7 +3048,7 @@ retry:
3048 WARN_ON(ret <= 0); 3048 WARN_ON(ret <= 0);
3049 printk(KERN_ERR "%s: ext4_ext_get_blocks " 3049 printk(KERN_ERR "%s: ext4_ext_get_blocks "
3050 "returned error inode#%lu, block=%u, " 3050 "returned error inode#%lu, block=%u, "
3051 "max_blocks=%lu", __func__, 3051 "max_blocks=%u", __func__,
3052 inode->i_ino, block, max_blocks); 3052 inode->i_ino, block, max_blocks);
3053#endif 3053#endif
3054 ext4_mark_inode_dirty(handle, inode); 3054 ext4_mark_inode_dirty(handle, inode);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a6444cee0c7e..03ba20be1329 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -360,9 +360,9 @@ static int ext4_block_to_path(struct inode *inode,
360 final = ptrs; 360 final = ptrs;
361 } else { 361 } else {
362 ext4_warning(inode->i_sb, "ext4_block_to_path", 362 ext4_warning(inode->i_sb, "ext4_block_to_path",
363 "block %lu > max", 363 "block %lu > max in inode %lu",
364 i_block + direct_blocks + 364 i_block + direct_blocks +
365 indirect_blocks + double_blocks); 365 indirect_blocks + double_blocks, inode->i_ino);
366 } 366 }
367 if (boundary) 367 if (boundary)
368 *boundary = final - 1 - (i_block & (ptrs - 1)); 368 *boundary = final - 1 - (i_block & (ptrs - 1));
@@ -2821,9 +2821,6 @@ static sector_t ext4_bmap(struct address_space *mapping, sector_t block)
2821 filemap_write_and_wait(mapping); 2821 filemap_write_and_wait(mapping);
2822 } 2822 }
2823 2823
2824 BUG_ON(!EXT4_JOURNAL(inode) &&
2825 EXT4_I(inode)->i_state & EXT4_STATE_JDATA);
2826
2827 if (EXT4_JOURNAL(inode) && EXT4_I(inode)->i_state & EXT4_STATE_JDATA) { 2824 if (EXT4_JOURNAL(inode) && EXT4_I(inode)->i_state & EXT4_STATE_JDATA) {
2828 /* 2825 /*
2829 * This is a REALLY heavyweight approach, but the use of 2826 * This is a REALLY heavyweight approach, but the use of
@@ -3622,7 +3619,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode,
3622 * block pointed to itself, it would have been detached when 3619 * block pointed to itself, it would have been detached when
3623 * the block was cleared. Check for this instead of OOPSing. 3620 * the block was cleared. Check for this instead of OOPSing.
3624 */ 3621 */
3625 if (bh2jh(this_bh)) 3622 if ((EXT4_JOURNAL(inode) == NULL) || bh2jh(this_bh))
3626 ext4_handle_dirty_metadata(handle, inode, this_bh); 3623 ext4_handle_dirty_metadata(handle, inode, this_bh);
3627 else 3624 else
3628 ext4_error(inode->i_sb, __func__, 3625 ext4_error(inode->i_sb, __func__,
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 918aec0c8a11..deba54f6cbed 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3025,7 +3025,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
3025 goto out_err; 3025 goto out_err;
3026 3026
3027 ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group, 3027 ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group,
3028 gdp->bg_free_blocks_count); 3028 ext4_free_blks_count(sb, gdp));
3029 3029
3030 err = ext4_journal_get_write_access(handle, gdp_bh); 3030 err = ext4_journal_get_write_access(handle, gdp_bh);
3031 if (err) 3031 if (err)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index fec0b4c2f5f1..ba702bd7910d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1368,7 +1368,7 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1368 struct fake_dirent *fde; 1368 struct fake_dirent *fde;
1369 1369
1370 blocksize = dir->i_sb->s_blocksize; 1370 blocksize = dir->i_sb->s_blocksize;
1371 dxtrace(printk(KERN_DEBUG "Creating index\n")); 1371 dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino));
1372 retval = ext4_journal_get_write_access(handle, bh); 1372 retval = ext4_journal_get_write_access(handle, bh);
1373 if (retval) { 1373 if (retval) {
1374 ext4_std_error(dir->i_sb, retval); 1374 ext4_std_error(dir->i_sb, retval);
@@ -1377,6 +1377,20 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1377 } 1377 }
1378 root = (struct dx_root *) bh->b_data; 1378 root = (struct dx_root *) bh->b_data;
1379 1379
1380 /* The 0th block becomes the root, move the dirents out */
1381 fde = &root->dotdot;
1382 de = (struct ext4_dir_entry_2 *)((char *)fde +
1383 ext4_rec_len_from_disk(fde->rec_len));
1384 if ((char *) de >= (((char *) root) + blocksize)) {
1385 ext4_error(dir->i_sb, __func__,
1386 "invalid rec_len for '..' in inode %lu",
1387 dir->i_ino);
1388 brelse(bh);
1389 return -EIO;
1390 }
1391 len = ((char *) root) + blocksize - (char *) de;
1392
1393 /* Allocate new block for the 0th block's dirents */
1380 bh2 = ext4_append(handle, dir, &block, &retval); 1394 bh2 = ext4_append(handle, dir, &block, &retval);
1381 if (!(bh2)) { 1395 if (!(bh2)) {
1382 brelse(bh); 1396 brelse(bh);
@@ -1385,11 +1399,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
1385 EXT4_I(dir)->i_flags |= EXT4_INDEX_FL; 1399 EXT4_I(dir)->i_flags |= EXT4_INDEX_FL;
1386 data1 = bh2->b_data; 1400 data1 = bh2->b_data;
1387 1401
1388 /* The 0th block becomes the root, move the dirents out */
1389 fde = &root->dotdot;
1390 de = (struct ext4_dir_entry_2 *)((char *)fde +
1391 ext4_rec_len_from_disk(fde->rec_len));
1392 len = ((char *) root) + blocksize - (char *) de;
1393 memcpy (data1, de, len); 1402 memcpy (data1, de, len);
1394 de = (struct ext4_dir_entry_2 *) data1; 1403 de = (struct ext4_dir_entry_2 *) data1;
1395 top = data1 + len; 1404 top = data1 + len;
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index c328be5d6885..c06886abd658 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -861,12 +861,13 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
861 gdp = (struct ext4_group_desc *)((char *)primary->b_data + 861 gdp = (struct ext4_group_desc *)((char *)primary->b_data +
862 gdb_off * EXT4_DESC_SIZE(sb)); 862 gdb_off * EXT4_DESC_SIZE(sb));
863 863
864 memset(gdp, 0, EXT4_DESC_SIZE(sb));
864 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ 865 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */
865 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ 866 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */
866 ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */ 867 ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */
867 ext4_free_blks_set(sb, gdp, input->free_blocks_count); 868 ext4_free_blks_set(sb, gdp, input->free_blocks_count);
868 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb)); 869 ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb));
869 gdp->bg_flags |= cpu_to_le16(EXT4_BG_INODE_ZEROED); 870 gdp->bg_flags = cpu_to_le16(EXT4_BG_INODE_ZEROED);
870 gdp->bg_checksum = ext4_group_desc_csum(sbi, input->group, gdp); 871 gdp->bg_checksum = ext4_group_desc_csum(sbi, input->group, gdp);
871 872
872 /* 873 /*
diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig
new file mode 100644
index 000000000000..d0a69ff25375
--- /dev/null
+++ b/fs/fat/Kconfig
@@ -0,0 +1,97 @@
1config FAT_FS
2 tristate
3 select NLS
4 help
5 If you want to use one of the FAT-based file systems (the MS-DOS and
6 VFAT (Windows 95) file systems), then you must say Y or M here
7 to include FAT support. You will then be able to mount partitions or
8 diskettes with FAT-based file systems and transparently access the
9 files on them, i.e. MSDOS files will look and behave just like all
10 other Unix files.
11
12 This FAT support is not a file system in itself, it only provides
13 the foundation for the other file systems. You will have to say Y or
14 M to at least one of "MSDOS fs support" or "VFAT fs support" in
15 order to make use of it.
16
17 Another way to read and write MSDOS floppies and hard drive
18 partitions from within Linux (but not transparently) is with the
19 mtools ("man mtools") program suite. You don't need to say Y here in
20 order to do that.
21
22 If you need to move large files on floppies between a DOS and a
23 Linux box, say Y here, mount the floppy under Linux with an MSDOS
24 file system and use GNU tar's M option. GNU tar is a program
25 available for Unix and DOS ("man tar" or "info tar").
26
27 The FAT support will enlarge your kernel by about 37 KB. If unsure,
28 say Y.
29
30 To compile this as a module, choose M here: the module will be called
31 fat. Note that if you compile the FAT support as a module, you
32 cannot compile any of the FAT-based file systems into the kernel
33 -- they will have to be modules as well.
34
35config MSDOS_FS
36 tristate "MSDOS fs support"
37 select FAT_FS
38 help
39 This allows you to mount MSDOS partitions of your hard drive (unless
40 they are compressed; to access compressed MSDOS partitions under
41 Linux, you can either use the DOS emulator DOSEMU, described in the
42 DOSEMU-HOWTO, available from
43 <http://www.tldp.org/docs.html#howto>, or try dmsdosfs in
44 <ftp://ibiblio.org/pub/Linux/system/filesystems/dosfs/>. If you
45 intend to use dosemu with a non-compressed MSDOS partition, say Y
46 here) and MSDOS floppies. This means that file access becomes
47 transparent, i.e. the MSDOS files look and behave just like all
48 other Unix files.
49
50 If you have Windows 95 or Windows NT installed on your MSDOS
51 partitions, you should use the VFAT file system (say Y to "VFAT fs
52 support" below), or you will not be able to see the long filenames
53 generated by Windows 95 / Windows NT.
54
55 This option will enlarge your kernel by about 7 KB. If unsure,
56 answer Y. This will only work if you said Y to "DOS FAT fs support"
57 as well. To compile this as a module, choose M here: the module will
58 be called msdos.
59
60config VFAT_FS
61 tristate "VFAT (Windows-95) fs support"
62 select FAT_FS
63 help
64 This option provides support for normal Windows file systems with
65 long filenames. That includes non-compressed FAT-based file systems
66 used by Windows 95, Windows 98, Windows NT 4.0, and the Unix
67 programs from the mtools package.
68
69 The VFAT support enlarges your kernel by about 10 KB and it only
70 works if you said Y to the "DOS FAT fs support" above. Please read
71 the file <file:Documentation/filesystems/vfat.txt> for details. If
72 unsure, say Y.
73
74 To compile this as a module, choose M here: the module will be called
75 vfat.
76
77config FAT_DEFAULT_CODEPAGE
78 int "Default codepage for FAT"
79 depends on MSDOS_FS || VFAT_FS
80 default 437
81 help
82 This option should be set to the codepage of your FAT filesystems.
83 It can be overridden with the "codepage" mount option.
84 See <file:Documentation/filesystems/vfat.txt> for more information.
85
86config FAT_DEFAULT_IOCHARSET
87 string "Default iocharset for FAT"
88 depends on VFAT_FS
89 default "iso8859-1"
90 help
91 Set this to the default input/output character set you'd
92 like FAT to use. It should probably match the character set
93 that most of your FAT filesystems use, and can be overridden
94 with the "iocharset" mount option for FAT filesystems.
95 Note that "utf8" is not recommended for FAT filesystems.
96 If unsure, you shouldn't set "utf8" here.
97 See <file:Documentation/filesystems/vfat.txt> for more information.
diff --git a/fs/freevxfs/Kconfig b/fs/freevxfs/Kconfig
new file mode 100644
index 000000000000..8dc1cd5c1efe
--- /dev/null
+++ b/fs/freevxfs/Kconfig
@@ -0,0 +1,16 @@
1config VXFS_FS
2 tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
3 depends on BLOCK
4 help
5 FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
6 file system format. VERITAS VxFS(TM) is the standard file system
7 of SCO UnixWare (and possibly others) and optionally available
8 for Sunsoft Solaris, HP-UX and many other operating systems.
9 Currently only readonly access is supported.
10
11 NOTE: the file system type as used by mount(1), mount(2) and
12 fstab(5) is 'vxfs' as it describes the file system format, not
13 the actual driver.
14
15 To compile this as a module, choose M here: the module will be
16 called freevxfs. If unsure, say N.
diff --git a/fs/fuse/Kconfig b/fs/fuse/Kconfig
new file mode 100644
index 000000000000..0cf160a94eda
--- /dev/null
+++ b/fs/fuse/Kconfig
@@ -0,0 +1,15 @@
1config FUSE_FS
2 tristate "FUSE (Filesystem in Userspace) support"
3 help
4 With FUSE it is possible to implement a fully functional filesystem
5 in a userspace program.
6
7 There's also companion library: libfuse. This library along with
8 utilities is available from the FUSE homepage:
9 <http://fuse.sourceforge.net/>
10
11 See <file:Documentation/filesystems/fuse.txt> for more information.
12 See <file:Documentation/Changes> for needed library/utility version.
13
14 If you want to develop a userspace FS, or if you want to use
15 a filesystem based on FUSE, answer Y or M.
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index e0c7ada08a1f..ba76b68c52ff 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -281,7 +281,8 @@ __releases(&fc->lock)
281 fc->blocked = 0; 281 fc->blocked = 0;
282 wake_up_all(&fc->blocked_waitq); 282 wake_up_all(&fc->blocked_waitq);
283 } 283 }
284 if (fc->num_background == FUSE_CONGESTION_THRESHOLD) { 284 if (fc->num_background == FUSE_CONGESTION_THRESHOLD &&
285 fc->connected) {
285 clear_bdi_congested(&fc->bdi, READ); 286 clear_bdi_congested(&fc->bdi, READ);
286 clear_bdi_congested(&fc->bdi, WRITE); 287 clear_bdi_congested(&fc->bdi, WRITE);
287 } 288 }
@@ -825,16 +826,21 @@ static int fuse_notify_poll(struct fuse_conn *fc, unsigned int size,
825 struct fuse_copy_state *cs) 826 struct fuse_copy_state *cs)
826{ 827{
827 struct fuse_notify_poll_wakeup_out outarg; 828 struct fuse_notify_poll_wakeup_out outarg;
828 int err; 829 int err = -EINVAL;
829 830
830 if (size != sizeof(outarg)) 831 if (size != sizeof(outarg))
831 return -EINVAL; 832 goto err;
832 833
833 err = fuse_copy_one(cs, &outarg, sizeof(outarg)); 834 err = fuse_copy_one(cs, &outarg, sizeof(outarg));
834 if (err) 835 if (err)
835 return err; 836 goto err;
836 837
838 fuse_copy_finish(cs);
837 return fuse_notify_poll_wakeup(fc, &outarg); 839 return fuse_notify_poll_wakeup(fc, &outarg);
840
841err:
842 fuse_copy_finish(cs);
843 return err;
838} 844}
839 845
840static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code, 846static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
@@ -845,6 +851,7 @@ static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
845 return fuse_notify_poll(fc, size, cs); 851 return fuse_notify_poll(fc, size, cs);
846 852
847 default: 853 default:
854 fuse_copy_finish(cs);
848 return -EINVAL; 855 return -EINVAL;
849 } 856 }
850} 857}
@@ -923,7 +930,6 @@ static ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov,
923 */ 930 */
924 if (!oh.unique) { 931 if (!oh.unique) {
925 err = fuse_notify(fc, oh.error, nbytes - sizeof(oh), &cs); 932 err = fuse_notify(fc, oh.error, nbytes - sizeof(oh), &cs);
926 fuse_copy_finish(&cs);
927 return err ? err : nbytes; 933 return err ? err : nbytes;
928 } 934 }
929 935
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e8162646a9b5..d9fdb7cec538 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc)
54 ff->reserved_req = fuse_request_alloc(); 54 ff->reserved_req = fuse_request_alloc();
55 if (!ff->reserved_req) { 55 if (!ff->reserved_req) {
56 kfree(ff); 56 kfree(ff);
57 ff = NULL; 57 return NULL;
58 } else { 58 } else {
59 INIT_LIST_HEAD(&ff->write_entry); 59 INIT_LIST_HEAD(&ff->write_entry);
60 atomic_set(&ff->count, 0); 60 atomic_set(&ff->count, 0);
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 47c96fdca1ac..459b73dd45e1 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -292,6 +292,7 @@ static void fuse_put_super(struct super_block *sb)
292 list_del(&fc->entry); 292 list_del(&fc->entry);
293 fuse_ctl_remove_conn(fc); 293 fuse_ctl_remove_conn(fc);
294 mutex_unlock(&fuse_mutex); 294 mutex_unlock(&fuse_mutex);
295 bdi_destroy(&fc->bdi);
295 fuse_conn_put(fc); 296 fuse_conn_put(fc);
296} 297}
297 298
@@ -532,7 +533,6 @@ void fuse_conn_put(struct fuse_conn *fc)
532 if (fc->destroy_req) 533 if (fc->destroy_req)
533 fuse_request_free(fc->destroy_req); 534 fuse_request_free(fc->destroy_req);
534 mutex_destroy(&fc->inst_mutex); 535 mutex_destroy(&fc->inst_mutex);
535 bdi_destroy(&fc->bdi);
536 fc->release(fc); 536 fc->release(fc);
537 } 537 }
538} 538}
@@ -805,16 +805,18 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
805 int err; 805 int err;
806 int is_bdev = sb->s_bdev != NULL; 806 int is_bdev = sb->s_bdev != NULL;
807 807
808 err = -EINVAL;
808 if (sb->s_flags & MS_MANDLOCK) 809 if (sb->s_flags & MS_MANDLOCK)
809 return -EINVAL; 810 goto err;
810 811
811 if (!parse_fuse_opt((char *) data, &d, is_bdev)) 812 if (!parse_fuse_opt((char *) data, &d, is_bdev))
812 return -EINVAL; 813 goto err;
813 814
814 if (is_bdev) { 815 if (is_bdev) {
815#ifdef CONFIG_BLOCK 816#ifdef CONFIG_BLOCK
817 err = -EINVAL;
816 if (!sb_set_blocksize(sb, d.blksize)) 818 if (!sb_set_blocksize(sb, d.blksize))
817 return -EINVAL; 819 goto err;
818#endif 820#endif
819 } else { 821 } else {
820 sb->s_blocksize = PAGE_CACHE_SIZE; 822 sb->s_blocksize = PAGE_CACHE_SIZE;
@@ -826,20 +828,22 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
826 sb->s_export_op = &fuse_export_operations; 828 sb->s_export_op = &fuse_export_operations;
827 829
828 file = fget(d.fd); 830 file = fget(d.fd);
831 err = -EINVAL;
829 if (!file) 832 if (!file)
830 return -EINVAL; 833 goto err;
831 834
832 if (file->f_op != &fuse_dev_operations) 835 if (file->f_op != &fuse_dev_operations)
833 return -EINVAL; 836 goto err_fput;
834 837
835 fc = kmalloc(sizeof(*fc), GFP_KERNEL); 838 fc = kmalloc(sizeof(*fc), GFP_KERNEL);
839 err = -ENOMEM;
836 if (!fc) 840 if (!fc)
837 return -ENOMEM; 841 goto err_fput;
838 842
839 err = fuse_conn_init(fc, sb); 843 err = fuse_conn_init(fc, sb);
840 if (err) { 844 if (err) {
841 kfree(fc); 845 kfree(fc);
842 return err; 846 goto err_fput;
843 } 847 }
844 848
845 fc->release = fuse_free_conn; 849 fc->release = fuse_free_conn;
@@ -854,12 +858,12 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
854 err = -ENOMEM; 858 err = -ENOMEM;
855 root = fuse_get_root_inode(sb, d.rootmode); 859 root = fuse_get_root_inode(sb, d.rootmode);
856 if (!root) 860 if (!root)
857 goto err; 861 goto err_put_conn;
858 862
859 root_dentry = d_alloc_root(root); 863 root_dentry = d_alloc_root(root);
860 if (!root_dentry) { 864 if (!root_dentry) {
861 iput(root); 865 iput(root);
862 goto err; 866 goto err_put_conn;
863 } 867 }
864 868
865 init_req = fuse_request_alloc(); 869 init_req = fuse_request_alloc();
@@ -903,9 +907,11 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
903 fuse_request_free(init_req); 907 fuse_request_free(init_req);
904 err_put_root: 908 err_put_root:
905 dput(root_dentry); 909 dput(root_dentry);
906 err: 910 err_put_conn:
907 fput(file);
908 fuse_conn_put(fc); 911 fuse_conn_put(fc);
912 err_fput:
913 fput(file);
914 err:
909 return err; 915 return err;
910} 916}
911 917
diff --git a/fs/hfs/Kconfig b/fs/hfs/Kconfig
new file mode 100644
index 000000000000..b77c5bc20f8a
--- /dev/null
+++ b/fs/hfs/Kconfig
@@ -0,0 +1,12 @@
1config HFS_FS
2 tristate "Apple Macintosh file system support (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 select NLS
5 help
6 If you say Y here, you will be able to mount Macintosh-formatted
7 floppy disks and hard drive partitions with full read-write access.
8 Please read <file:Documentation/filesystems/hfs.txt> to learn about
9 the available mount options.
10
11 To compile this file system support as a module, choose M here: the
12 module will be called hfs.
diff --git a/fs/hfsplus/Kconfig b/fs/hfsplus/Kconfig
new file mode 100644
index 000000000000..a63371815aab
--- /dev/null
+++ b/fs/hfsplus/Kconfig
@@ -0,0 +1,13 @@
1config HFSPLUS_FS
2 tristate "Apple Extended HFS file system support"
3 depends on BLOCK
4 select NLS
5 select NLS_UTF8
6 help
7 If you say Y here, you will be able to mount extended format
8 Macintosh-formatted hard drive partitions with full read-write access.
9
10 This file system is often called HFS+ and was introduced with
11 MacOS 8. It includes all Mac specific filesystem data such as
12 data forks and creator codes, but it also has several UNIX
13 style features such as file ownership and permissions.
diff --git a/fs/hpfs/Kconfig b/fs/hpfs/Kconfig
new file mode 100644
index 000000000000..56bd15c5bf6c
--- /dev/null
+++ b/fs/hpfs/Kconfig
@@ -0,0 +1,14 @@
1config HPFS_FS
2 tristate "OS/2 HPFS file system support"
3 depends on BLOCK
4 help
5 OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS
6 is the file system used for organizing files on OS/2 hard disk
7 partitions. Say Y if you want to be able to read files from and
8 write files to an OS/2 HPFS partition on your hard drive. OS/2
9 floppies however are in regular MSDOS format, so you don't need this
10 option in order to be able to read them. Read
11 <file:Documentation/filesystems/hpfs.txt>.
12
13 To compile this file system support as a module, choose M here: the
14 module will be called hpfs. If unsure, say N.
diff --git a/fs/isofs/Kconfig b/fs/isofs/Kconfig
new file mode 100644
index 000000000000..8ab9878e3671
--- /dev/null
+++ b/fs/isofs/Kconfig
@@ -0,0 +1,39 @@
1config ISO9660_FS
2 tristate "ISO 9660 CDROM file system support"
3 help
4 This is the standard file system used on CD-ROMs. It was previously
5 known as "High Sierra File System" and is called "hsfs" on other
6 Unix systems. The so-called Rock-Ridge extensions which allow for
7 long Unix filenames and symbolic links are also supported by this
8 driver. If you have a CD-ROM drive and want to do more with it than
9 just listen to audio CDs and watch its LEDs, say Y (and read
10 <file:Documentation/filesystems/isofs.txt> and the CD-ROM-HOWTO,
11 available from <http://www.tldp.org/docs.html#howto>), thereby
12 enlarging your kernel by about 27 KB; otherwise say N.
13
14 To compile this file system support as a module, choose M here: the
15 module will be called isofs.
16
17config JOLIET
18 bool "Microsoft Joliet CDROM extensions"
19 depends on ISO9660_FS
20 select NLS
21 help
22 Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
23 which allows for long filenames in unicode format (unicode is the
24 new 16 bit character code, successor to ASCII, which encodes the
25 characters of almost all languages of the world; see
26 <http://www.unicode.org/> for more information). Say Y here if you
27 want to be able to read Joliet CD-ROMs under Linux.
28
29config ZISOFS
30 bool "Transparent decompression extension"
31 depends on ISO9660_FS
32 select ZLIB_INFLATE
33 help
34 This is a Linux-specific extension to RockRidge which lets you store
35 data in compressed form on a CD-ROM and have it transparently
36 decompressed when the CD-ROM is accessed. See
37 <http://www.kernel.org/pub/linux/utils/fs/zisofs/> for the tools
38 necessary to create such a filesystem. Say Y here if you want to be
39 able to read such compressed CD-ROMs.
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 56675306ed81..eb343008eded 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -37,10 +37,10 @@
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38#include <linux/debugfs.h> 38#include <linux/debugfs.h>
39#include <linux/seq_file.h> 39#include <linux/seq_file.h>
40#include <linux/math64.h>
40 41
41#include <asm/uaccess.h> 42#include <asm/uaccess.h>
42#include <asm/page.h> 43#include <asm/page.h>
43#include <asm/div64.h>
44 44
45EXPORT_SYMBOL(jbd2_journal_start); 45EXPORT_SYMBOL(jbd2_journal_start);
46EXPORT_SYMBOL(jbd2_journal_restart); 46EXPORT_SYMBOL(jbd2_journal_restart);
@@ -846,8 +846,8 @@ static int jbd2_seq_info_show(struct seq_file *seq, void *v)
846 jiffies_to_msecs(s->stats->u.run.rs_flushing / s->stats->ts_tid)); 846 jiffies_to_msecs(s->stats->u.run.rs_flushing / s->stats->ts_tid));
847 seq_printf(seq, " %ums logging transaction\n", 847 seq_printf(seq, " %ums logging transaction\n",
848 jiffies_to_msecs(s->stats->u.run.rs_logging / s->stats->ts_tid)); 848 jiffies_to_msecs(s->stats->u.run.rs_logging / s->stats->ts_tid));
849 seq_printf(seq, " %luus average transaction commit time\n", 849 seq_printf(seq, " %lluus average transaction commit time\n",
850 do_div(s->journal->j_average_commit_time, 1000)); 850 div_u64(s->journal->j_average_commit_time, 1000));
851 seq_printf(seq, " %lu handles per transaction\n", 851 seq_printf(seq, " %lu handles per transaction\n",
852 s->stats->u.run.rs_handle_count / s->stats->ts_tid); 852 s->stats->u.run.rs_handle_count / s->stats->ts_tid);
853 seq_printf(seq, " %lu blocks per transaction\n", 853 seq_printf(seq, " %lu blocks per transaction\n",
diff --git a/fs/jfs/Kconfig b/fs/jfs/Kconfig
new file mode 100644
index 000000000000..9ff619a6f9cc
--- /dev/null
+++ b/fs/jfs/Kconfig
@@ -0,0 +1,49 @@
1config JFS_FS
2 tristate "JFS filesystem support"
3 select NLS
4 help
5 This is a port of IBM's Journaled Filesystem . More information is
6 available in the file <file:Documentation/filesystems/jfs.txt>.
7
8 If you do not intend to use the JFS filesystem, say N.
9
10config JFS_POSIX_ACL
11 bool "JFS POSIX Access Control Lists"
12 depends on JFS_FS
13 select FS_POSIX_ACL
14 help
15 Posix Access Control Lists (ACLs) support permissions for users and
16 groups beyond the owner/group/world scheme.
17
18 To learn more about Access Control Lists, visit the Posix ACLs for
19 Linux website <http://acl.bestbits.at/>.
20
21 If you don't know what Access Control Lists are, say N
22
23config JFS_SECURITY
24 bool "JFS Security Labels"
25 depends on JFS_FS
26 help
27 Security labels support alternative access control models
28 implemented by security modules like SELinux. This option
29 enables an extended attribute handler for file security
30 labels in the jfs filesystem.
31
32 If you are not using a security module that requires using
33 extended attributes for file security labels, say N.
34
35config JFS_DEBUG
36 bool "JFS debugging"
37 depends on JFS_FS
38 help
39 If you are experiencing any problems with the JFS filesystem, say
40 Y here. This will result in additional debugging messages to be
41 written to the system log. Under normal circumstances, this
42 results in very little overhead.
43
44config JFS_STATISTICS
45 bool "JFS statistics"
46 depends on JFS_FS
47 help
48 Enabling this option will cause statistics from the JFS file system
49 to be made available to the user in the /proc/fs/jfs/ directory.
diff --git a/fs/minix/Kconfig b/fs/minix/Kconfig
new file mode 100644
index 000000000000..0fd7ca994264
--- /dev/null
+++ b/fs/minix/Kconfig
@@ -0,0 +1,17 @@
1config MINIX_FS
2 tristate "Minix file system support"
3 depends on BLOCK
4 help
5 Minix is a simple operating system used in many classes about OS's.
6 The minix file system (method to organize files on a hard disk
7 partition or a floppy disk) was the original file system for Linux,
8 but has been superseded by the second extended file system ext2fs.
9 You don't want to use the minix file system on your hard disk
10 because of certain built-in restrictions, but it is sometimes found
11 on older Linux floppy disks. This option will enlarge your kernel
12 by about 28 KB. If unsure, say N.
13
14 To compile this file system support as a module, choose M here: the
15 module will be called minix. Note that the file system of your root
16 partition (the one containing the directory /) cannot be compiled as
17 a module.
diff --git a/fs/ncpfs/Kconfig b/fs/ncpfs/Kconfig
index 142808427b25..c931cf22a1f6 100644
--- a/fs/ncpfs/Kconfig
+++ b/fs/ncpfs/Kconfig
@@ -1,6 +1,27 @@
1# 1#
2# NCP Filesystem configuration 2# NCP Filesystem configuration
3# 3#
4config NCP_FS
5 tristate "NCP file system support (to mount NetWare volumes)"
6 depends on IPX!=n || INET
7 help
8 NCP (NetWare Core Protocol) is a protocol that runs over IPX and is
9 used by Novell NetWare clients to talk to file servers. It is to
10 IPX what NFS is to TCP/IP, if that helps. Saying Y here allows you
11 to mount NetWare file server volumes and to access them just like
12 any other Unix directory. For details, please read the file
13 <file:Documentation/filesystems/ncpfs.txt> in the kernel source and
14 the IPX-HOWTO from <http://www.tldp.org/docs.html#howto>.
15
16 You do not have to say Y here if you want your Linux box to act as a
17 file *server* for Novell NetWare clients.
18
19 General information about how to connect Linux, Windows machines and
20 Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
21
22 To compile this as a module, choose M here: the module will be called
23 ncpfs. Say N unless you are connected to a Novell network.
24
4config NCPFS_PACKET_SIGNING 25config NCPFS_PACKET_SIGNING
5 bool "Packet signatures" 26 bool "Packet signatures"
6 depends on NCP_FS 27 depends on NCP_FS
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
new file mode 100644
index 000000000000..36fe20d6eba2
--- /dev/null
+++ b/fs/nfs/Kconfig
@@ -0,0 +1,86 @@
1config NFS_FS
2 tristate "NFS client support"
3 depends on INET
4 select LOCKD
5 select SUNRPC
6 select NFS_ACL_SUPPORT if NFS_V3_ACL
7 help
8 Choose Y here if you want to access files residing on other
9 computers using Sun's Network File System protocol. To compile
10 this file system support as a module, choose M here: the module
11 will be called nfs.
12
13 To mount file systems exported by NFS servers, you also need to
14 install the user space mount.nfs command which can be found in
15 the Linux nfs-utils package, available from http://linux-nfs.org/.
16 Information about using the mount command is available in the
17 mount(8) man page. More detail about the Linux NFS client
18 implementation is available via the nfs(5) man page.
19
20 Below you can choose which versions of the NFS protocol are
21 available in the kernel to mount NFS servers. Support for NFS
22 version 2 (RFC 1094) is always available when NFS_FS is selected.
23
24 To configure a system which mounts its root file system via NFS
25 at boot time, say Y here, select "Kernel level IP
26 autoconfiguration" in the NETWORK menu, and select "Root file
27 system on NFS" below. You cannot compile this file system as a
28 module in this case.
29
30 If unsure, say N.
31
32config NFS_V3
33 bool "NFS client support for NFS version 3"
34 depends on NFS_FS
35 help
36 This option enables support for version 3 of the NFS protocol
37 (RFC 1813) in the kernel's NFS client.
38
39 If unsure, say Y.
40
41config NFS_V3_ACL
42 bool "NFS client support for the NFSv3 ACL protocol extension"
43 depends on NFS_V3
44 help
45 Some NFS servers support an auxiliary NFSv3 ACL protocol that
46 Sun added to Solaris but never became an official part of the
47 NFS version 3 protocol. This protocol extension allows
48 applications on NFS clients to manipulate POSIX Access Control
49 Lists on files residing on NFS servers. NFS servers enforce
50 ACLs on local files whether this protocol is available or not.
51
52 Choose Y here if your NFS server supports the Solaris NFSv3 ACL
53 protocol extension and you want your NFS client to allow
54 applications to access and modify ACLs on files on the server.
55
56 Most NFS servers don't support the Solaris NFSv3 ACL protocol
57 extension. You can choose N here or specify the "noacl" mount
58 option to prevent your NFS client from trying to use the NFSv3
59 ACL protocol.
60
61 If unsure, say N.
62
63config NFS_V4
64 bool "NFS client support for NFS version 4 (EXPERIMENTAL)"
65 depends on NFS_FS && EXPERIMENTAL
66 select RPCSEC_GSS_KRB5
67 help
68 This option enables support for version 4 of the NFS protocol
69 (RFC 3530) in the kernel's NFS client.
70
71 To mount NFS servers using NFSv4, you also need to install user
72 space programs which can be found in the Linux nfs-utils package,
73 available from http://linux-nfs.org/.
74
75 If unsure, say N.
76
77config ROOT_NFS
78 bool "Root file system on NFS"
79 depends on NFS_FS=y && IP_PNP
80 help
81 If you want your system to mount its root file system via NFS,
82 choose Y here. This is common practice for managing systems
83 without local permanent storage. For details, read
84 <file:Documentation/filesystems/nfsroot.txt>.
85
86 Most people say N here.
diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
new file mode 100644
index 000000000000..44d7d04dab95
--- /dev/null
+++ b/fs/nfsd/Kconfig
@@ -0,0 +1,80 @@
1config NFSD
2 tristate "NFS server support"
3 depends on INET
4 select LOCKD
5 select SUNRPC
6 select EXPORTFS
7 select NFS_ACL_SUPPORT if NFSD_V2_ACL
8 help
9 Choose Y here if you want to allow other computers to access
10 files residing on this system using Sun's Network File System
11 protocol. To compile the NFS server support as a module,
12 choose M here: the module will be called nfsd.
13
14 You may choose to use a user-space NFS server instead, in which
15 case you can choose N here.
16
17 To export local file systems using NFS, you also need to install
18 user space programs which can be found in the Linux nfs-utils
19 package, available from http://linux-nfs.org/. More detail about
20 the Linux NFS server implementation is available via the
21 exports(5) man page.
22
23 Below you can choose which versions of the NFS protocol are
24 available to clients mounting the NFS server on this system.
25 Support for NFS version 2 (RFC 1094) is always available when
26 CONFIG_NFSD is selected.
27
28 If unsure, say N.
29
30config NFSD_V2_ACL
31 bool
32 depends on NFSD
33
34config NFSD_V3
35 bool "NFS server support for NFS version 3"
36 depends on NFSD
37 help
38 This option enables support in your system's NFS server for
39 version 3 of the NFS protocol (RFC 1813).
40
41 If unsure, say Y.
42
43config NFSD_V3_ACL
44 bool "NFS server support for the NFSv3 ACL protocol extension"
45 depends on NFSD_V3
46 select NFSD_V2_ACL
47 help
48 Solaris NFS servers support an auxiliary NFSv3 ACL protocol that
49 never became an official part of the NFS version 3 protocol.
50 This protocol extension allows applications on NFS clients to
51 manipulate POSIX Access Control Lists on files residing on NFS
52 servers. NFS servers enforce POSIX ACLs on local files whether
53 this protocol is available or not.
54
55 This option enables support in your system's NFS server for the
56 NFSv3 ACL protocol extension allowing NFS clients to manipulate
57 POSIX ACLs on files exported by your system's NFS server. NFS
58 clients which support the Solaris NFSv3 ACL protocol can then
59 access and modify ACLs on your NFS server.
60
61 To store ACLs on your NFS server, you also need to enable ACL-
62 related CONFIG options for your local file systems of choice.
63
64 If unsure, say N.
65
66config NFSD_V4
67 bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
68 depends on NFSD && PROC_FS && EXPERIMENTAL
69 select NFSD_V3
70 select FS_POSIX_ACL
71 select RPCSEC_GSS_KRB5
72 help
73 This option enables support in your system's NFS server for
74 version 4 of the NFS protocol (RFC 3530).
75
76 To export files using NFSv4, you need to install additional user
77 space programs which can be found in the Linux nfs-utils package,
78 available from http://linux-nfs.org/.
79
80 If unsure, say N.
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c
index c903e04aa217..5573508f707f 100644
--- a/fs/nfsd/auth.c
+++ b/fs/nfsd/auth.c
@@ -49,6 +49,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
49 new->fsuid = exp->ex_anon_uid; 49 new->fsuid = exp->ex_anon_uid;
50 new->fsgid = exp->ex_anon_gid; 50 new->fsgid = exp->ex_anon_gid;
51 gi = groups_alloc(0); 51 gi = groups_alloc(0);
52 if (!gi)
53 goto oom;
52 } else if (flags & NFSEXP_ROOTSQUASH) { 54 } else if (flags & NFSEXP_ROOTSQUASH) {
53 if (!new->fsuid) 55 if (!new->fsuid)
54 new->fsuid = exp->ex_anon_uid; 56 new->fsuid = exp->ex_anon_uid;
@@ -85,6 +87,7 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
85 new->cap_effective = cap_raise_nfsd_set(new->cap_effective, 87 new->cap_effective = cap_raise_nfsd_set(new->cap_effective,
86 new->cap_permitted); 88 new->cap_permitted);
87 put_cred(override_creds(new)); 89 put_cred(override_creds(new));
90 put_cred(new);
88 return 0; 91 return 0;
89 92
90oom: 93oom:
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 88db7d3ec120..b6f60f48e94b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2871,7 +2871,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
2871 file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner; 2871 file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner;
2872 file_lock.fl_pid = current->tgid; 2872 file_lock.fl_pid = current->tgid;
2873 file_lock.fl_flags = FL_POSIX; 2873 file_lock.fl_flags = FL_POSIX;
2874 file_lock.fl_lmops = &nfsd_posix_mng_ops;
2875 2874
2876 file_lock.fl_start = lockt->lt_offset; 2875 file_lock.fl_start = lockt->lt_offset;
2877 file_lock.fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); 2876 file_lock.fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length);
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index d53a1838d6e8..bed766e435b5 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -427,10 +427,61 @@ static unsigned int inotify_poll(struct file *file, poll_table *wait)
427 return ret; 427 return ret;
428} 428}
429 429
430/*
431 * Get an inotify_kernel_event if one exists and is small
432 * enough to fit in "count". Return an error pointer if
433 * not large enough.
434 *
435 * Called with the device ev_mutex held.
436 */
437static struct inotify_kernel_event *get_one_event(struct inotify_device *dev,
438 size_t count)
439{
440 size_t event_size = sizeof(struct inotify_event);
441 struct inotify_kernel_event *kevent;
442
443 if (list_empty(&dev->events))
444 return NULL;
445
446 kevent = inotify_dev_get_event(dev);
447 if (kevent->name)
448 event_size += kevent->event.len;
449
450 if (event_size > count)
451 return ERR_PTR(-EINVAL);
452
453 remove_kevent(dev, kevent);
454 return kevent;
455}
456
457/*
458 * Copy an event to user space, returning how much we copied.
459 *
460 * We already checked that the event size is smaller than the
461 * buffer we had in "get_one_event()" above.
462 */
463static ssize_t copy_event_to_user(struct inotify_kernel_event *kevent,
464 char __user *buf)
465{
466 size_t event_size = sizeof(struct inotify_event);
467
468 if (copy_to_user(buf, &kevent->event, event_size))
469 return -EFAULT;
470
471 if (kevent->name) {
472 buf += event_size;
473
474 if (copy_to_user(buf, kevent->name, kevent->event.len))
475 return -EFAULT;
476
477 event_size += kevent->event.len;
478 }
479 return event_size;
480}
481
430static ssize_t inotify_read(struct file *file, char __user *buf, 482static ssize_t inotify_read(struct file *file, char __user *buf,
431 size_t count, loff_t *pos) 483 size_t count, loff_t *pos)
432{ 484{
433 size_t event_size = sizeof (struct inotify_event);
434 struct inotify_device *dev; 485 struct inotify_device *dev;
435 char __user *start; 486 char __user *start;
436 int ret; 487 int ret;
@@ -440,81 +491,43 @@ static ssize_t inotify_read(struct file *file, char __user *buf,
440 dev = file->private_data; 491 dev = file->private_data;
441 492
442 while (1) { 493 while (1) {
494 struct inotify_kernel_event *kevent;
443 495
444 prepare_to_wait(&dev->wq, &wait, TASK_INTERRUPTIBLE); 496 prepare_to_wait(&dev->wq, &wait, TASK_INTERRUPTIBLE);
445 497
446 mutex_lock(&dev->ev_mutex); 498 mutex_lock(&dev->ev_mutex);
447 if (!list_empty(&dev->events)) { 499 kevent = get_one_event(dev, count);
448 ret = 0;
449 break;
450 }
451 mutex_unlock(&dev->ev_mutex); 500 mutex_unlock(&dev->ev_mutex);
452 501
453 if (file->f_flags & O_NONBLOCK) { 502 if (kevent) {
454 ret = -EAGAIN; 503 ret = PTR_ERR(kevent);
455 break; 504 if (IS_ERR(kevent))
456 } 505 break;
457 506 ret = copy_event_to_user(kevent, buf);
458 if (signal_pending(current)) { 507 free_kevent(kevent);
459 ret = -EINTR; 508 if (ret < 0)
460 break; 509 break;
510 buf += ret;
511 count -= ret;
512 continue;
461 } 513 }
462 514
463 schedule(); 515 ret = -EAGAIN;
464 } 516 if (file->f_flags & O_NONBLOCK)
465
466 finish_wait(&dev->wq, &wait);
467 if (ret)
468 return ret;
469
470 while (1) {
471 struct inotify_kernel_event *kevent;
472
473 ret = buf - start;
474 if (list_empty(&dev->events))
475 break; 517 break;
476 518 ret = -EINTR;
477 kevent = inotify_dev_get_event(dev); 519 if (signal_pending(current))
478 if (event_size + kevent->event.len > count) {
479 if (ret == 0 && count > 0) {
480 /*
481 * could not get a single event because we
482 * didn't have enough buffer space.
483 */
484 ret = -EINVAL;
485 }
486 break; 520 break;
487 }
488 remove_kevent(dev, kevent);
489 521
490 /* 522 if (start != buf)
491 * Must perform the copy_to_user outside the mutex in order
492 * to avoid a lock order reversal with mmap_sem.
493 */
494 mutex_unlock(&dev->ev_mutex);
495
496 if (copy_to_user(buf, &kevent->event, event_size)) {
497 ret = -EFAULT;
498 break; 523 break;
499 }
500 buf += event_size;
501 count -= event_size;
502
503 if (kevent->name) {
504 if (copy_to_user(buf, kevent->name, kevent->event.len)){
505 ret = -EFAULT;
506 break;
507 }
508 buf += kevent->event.len;
509 count -= kevent->event.len;
510 }
511
512 free_kevent(kevent);
513 524
514 mutex_lock(&dev->ev_mutex); 525 schedule();
515 } 526 }
516 mutex_unlock(&dev->ev_mutex);
517 527
528 finish_wait(&dev->wq, &wait);
529 if (start != buf && ret != -EFAULT)
530 ret = buf - start;
518 return ret; 531 return ret;
519} 532}
520 533
diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig
new file mode 100644
index 000000000000..f5a868cc9152
--- /dev/null
+++ b/fs/ntfs/Kconfig
@@ -0,0 +1,78 @@
1config NTFS_FS
2 tristate "NTFS file system support"
3 select NLS
4 help
5 NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003.
6
7 Saying Y or M here enables read support. There is partial, but
8 safe, write support available. For write support you must also
9 say Y to "NTFS write support" below.
10
11 There are also a number of user-space tools available, called
12 ntfsprogs. These include ntfsundelete and ntfsresize, that work
13 without NTFS support enabled in the kernel.
14
15 This is a rewrite from scratch of Linux NTFS support and replaced
16 the old NTFS code starting with Linux 2.5.11. A backport to
17 the Linux 2.4 kernel series is separately available as a patch
18 from the project web site.
19
20 For more information see <file:Documentation/filesystems/ntfs.txt>
21 and <http://www.linux-ntfs.org/>.
22
23 To compile this file system support as a module, choose M here: the
24 module will be called ntfs.
25
26 If you are not using Windows NT, 2000, XP or 2003 in addition to
27 Linux on your computer it is safe to say N.
28
29config NTFS_DEBUG
30 bool "NTFS debugging support"
31 depends on NTFS_FS
32 help
33 If you are experiencing any problems with the NTFS file system, say
34 Y here. This will result in additional consistency checks to be
35 performed by the driver as well as additional debugging messages to
36 be written to the system log. Note that debugging messages are
37 disabled by default. To enable them, supply the option debug_msgs=1
38 at the kernel command line when booting the kernel or as an option
39 to insmod when loading the ntfs module. Once the driver is active,
40 you can enable debugging messages by doing (as root):
41 echo 1 > /proc/sys/fs/ntfs-debug
42 Replacing the "1" with "0" would disable debug messages.
43
44 If you leave debugging messages disabled, this results in little
45 overhead, but enabling debug messages results in very significant
46 slowdown of the system.
47
48 When reporting bugs, please try to have available a full dump of
49 debugging messages while the misbehaviour was occurring.
50
51config NTFS_RW
52 bool "NTFS write support"
53 depends on NTFS_FS
54 help
55 This enables the partial, but safe, write support in the NTFS driver.
56
57 The only supported operation is overwriting existing files, without
58 changing the file length. No file or directory creation, deletion or
59 renaming is possible. Note only non-resident files can be written to
60 so you may find that some very small files (<500 bytes or so) cannot
61 be written to.
62
63 While we cannot guarantee that it will not damage any data, we have
64 so far not received a single report where the driver would have
65 damaged someones data so we assume it is perfectly safe to use.
66
67 Note: While write support is safe in this version (a rewrite from
68 scratch of the NTFS support), it should be noted that the old NTFS
69 write support, included in Linux 2.5.10 and before (since 1997),
70 is not safe.
71
72 This is currently useful with TopologiLinux. TopologiLinux is run
73 on top of any DOS/Microsoft Windows system without partitioning your
74 hard disk. Unlike other Linux distributions TopologiLinux does not
75 need its own partition. For more information see
76 <http://topologi-linux.sourceforge.net/>
77
78 It is perfectly safe to say N here.
diff --git a/fs/ocfs2/Kconfig b/fs/ocfs2/Kconfig
new file mode 100644
index 000000000000..701b7a3a872e
--- /dev/null
+++ b/fs/ocfs2/Kconfig
@@ -0,0 +1,85 @@
1config OCFS2_FS
2 tristate "OCFS2 file system support"
3 depends on NET && SYSFS
4 select CONFIGFS_FS
5 select JBD2
6 select CRC32
7 select QUOTA
8 select QUOTA_TREE
9 help
10 OCFS2 is a general purpose extent based shared disk cluster file
11 system with many similarities to ext3. It supports 64 bit inode
12 numbers, and has automatically extending metadata groups which may
13 also make it attractive for non-clustered use.
14
15 You'll want to install the ocfs2-tools package in order to at least
16 get "mount.ocfs2".
17
18 Project web page: http://oss.oracle.com/projects/ocfs2
19 Tools web page: http://oss.oracle.com/projects/ocfs2-tools
20 OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
21
22 For more information on OCFS2, see the file
23 <file:Documentation/filesystems/ocfs2.txt>.
24
25config OCFS2_FS_O2CB
26 tristate "O2CB Kernelspace Clustering"
27 depends on OCFS2_FS
28 default y
29 help
30 OCFS2 includes a simple kernelspace clustering package, the OCFS2
31 Cluster Base. It only requires a very small userspace component
32 to configure it. This comes with the standard ocfs2-tools package.
33 O2CB is limited to maintaining a cluster for OCFS2 file systems.
34 It cannot manage any other cluster applications.
35
36 It is always safe to say Y here, as the clustering method is
37 run-time selectable.
38
39config OCFS2_FS_USERSPACE_CLUSTER
40 tristate "OCFS2 Userspace Clustering"
41 depends on OCFS2_FS && DLM
42 default y
43 help
44 This option will allow OCFS2 to use userspace clustering services
45 in conjunction with the DLM in fs/dlm. If you are using a
46 userspace cluster manager, say Y here.
47
48 It is safe to say Y, as the clustering method is run-time
49 selectable.
50
51config OCFS2_FS_STATS
52 bool "OCFS2 statistics"
53 depends on OCFS2_FS
54 default y
55 help
56 This option allows some fs statistics to be captured. Enabling
57 this option may increase the memory consumption.
58
59config OCFS2_DEBUG_MASKLOG
60 bool "OCFS2 logging support"
61 depends on OCFS2_FS
62 default y
63 help
64 The ocfs2 filesystem has an extensive logging system. The system
65 allows selection of events to log via files in /sys/o2cb/logmask/.
66 This option will enlarge your kernel, but it allows debugging of
67 ocfs2 filesystem issues.
68
69config OCFS2_DEBUG_FS
70 bool "OCFS2 expensive checks"
71 depends on OCFS2_FS
72 default n
73 help
74 This option will enable expensive consistency checks. Enable
75 this option for debugging only as it is likely to decrease
76 performance of the filesystem.
77
78config OCFS2_FS_POSIX_ACL
79 bool "OCFS2 POSIX Access Control Lists"
80 depends on OCFS2_FS
81 select FS_POSIX_ACL
82 default n
83 help
84 Posix Access Control Lists (ACLs) support permissions for users and
85 groups beyond the owner/group/world scheme.
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index 6aff8f2d3e49..f4efa89baee5 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -810,171 +810,6 @@ out:
810 return status; 810 return status;
811} 811}
812 812
813/* This is difficult. We have to lock quota inode and start transaction
814 * in this function but we don't want to take the penalty of exlusive
815 * quota file lock when we are just going to use cached structures. So
816 * we just take read lock check whether we have dquot cached and if so,
817 * we don't have to take the write lock... */
818static int ocfs2_dquot_initialize(struct inode *inode, int type)
819{
820 handle_t *handle = NULL;
821 int status = 0;
822 struct super_block *sb = inode->i_sb;
823 struct ocfs2_mem_dqinfo *oinfo;
824 int exclusive = 0;
825 int cnt;
826 qid_t id;
827
828 mlog_entry_void();
829
830 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
831 if (type != -1 && cnt != type)
832 continue;
833 if (!sb_has_quota_active(sb, cnt))
834 continue;
835 oinfo = sb_dqinfo(sb, cnt)->dqi_priv;
836 status = ocfs2_lock_global_qf(oinfo, 0);
837 if (status < 0)
838 goto out;
839 /* This is just a performance optimization not a reliable test.
840 * Since we hold an inode lock, noone can actually release
841 * the structure until we are finished with initialization. */
842 if (inode->i_dquot[cnt] != NODQUOT) {
843 ocfs2_unlock_global_qf(oinfo, 0);
844 continue;
845 }
846 /* When we have inode lock, we know that no dquot_release() can
847 * run and thus we can safely check whether we need to
848 * read+modify global file to get quota information or whether
849 * our node already has it. */
850 if (cnt == USRQUOTA)
851 id = inode->i_uid;
852 else if (cnt == GRPQUOTA)
853 id = inode->i_gid;
854 else
855 BUG();
856 /* Obtain exclusion from quota off... */
857 down_write(&sb_dqopt(sb)->dqptr_sem);
858 exclusive = !dquot_is_cached(sb, id, cnt);
859 up_write(&sb_dqopt(sb)->dqptr_sem);
860 if (exclusive) {
861 status = ocfs2_lock_global_qf(oinfo, 1);
862 if (status < 0) {
863 exclusive = 0;
864 mlog_errno(status);
865 goto out_ilock;
866 }
867 handle = ocfs2_start_trans(OCFS2_SB(sb),
868 ocfs2_calc_qinit_credits(sb, cnt));
869 if (IS_ERR(handle)) {
870 status = PTR_ERR(handle);
871 mlog_errno(status);
872 goto out_ilock;
873 }
874 }
875 dquot_initialize(inode, cnt);
876 if (exclusive) {
877 ocfs2_commit_trans(OCFS2_SB(sb), handle);
878 ocfs2_unlock_global_qf(oinfo, 1);
879 }
880 ocfs2_unlock_global_qf(oinfo, 0);
881 }
882 mlog_exit(0);
883 return 0;
884out_ilock:
885 if (exclusive)
886 ocfs2_unlock_global_qf(oinfo, 1);
887 ocfs2_unlock_global_qf(oinfo, 0);
888out:
889 mlog_exit(status);
890 return status;
891}
892
893static int ocfs2_dquot_drop_slow(struct inode *inode)
894{
895 int status = 0;
896 int cnt;
897 int got_lock[MAXQUOTAS] = {0, 0};
898 handle_t *handle;
899 struct super_block *sb = inode->i_sb;
900 struct ocfs2_mem_dqinfo *oinfo;
901
902 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
903 if (!sb_has_quota_active(sb, cnt))
904 continue;
905 oinfo = sb_dqinfo(sb, cnt)->dqi_priv;
906 status = ocfs2_lock_global_qf(oinfo, 1);
907 if (status < 0)
908 goto out;
909 got_lock[cnt] = 1;
910 }
911 handle = ocfs2_start_trans(OCFS2_SB(sb),
912 ocfs2_calc_qinit_credits(sb, USRQUOTA) +
913 ocfs2_calc_qinit_credits(sb, GRPQUOTA));
914 if (IS_ERR(handle)) {
915 status = PTR_ERR(handle);
916 mlog_errno(status);
917 goto out;
918 }
919 dquot_drop(inode);
920 ocfs2_commit_trans(OCFS2_SB(sb), handle);
921out:
922 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
923 if (got_lock[cnt]) {
924 oinfo = sb_dqinfo(sb, cnt)->dqi_priv;
925 ocfs2_unlock_global_qf(oinfo, 1);
926 }
927 return status;
928}
929
930/* See the comment before ocfs2_dquot_initialize. */
931static int ocfs2_dquot_drop(struct inode *inode)
932{
933 int status = 0;
934 struct super_block *sb = inode->i_sb;
935 struct ocfs2_mem_dqinfo *oinfo;
936 int exclusive = 0;
937 int cnt;
938 int got_lock[MAXQUOTAS] = {0, 0};
939
940 mlog_entry_void();
941 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
942 if (!sb_has_quota_active(sb, cnt))
943 continue;
944 oinfo = sb_dqinfo(sb, cnt)->dqi_priv;
945 status = ocfs2_lock_global_qf(oinfo, 0);
946 if (status < 0)
947 goto out;
948 got_lock[cnt] = 1;
949 }
950 /* Lock against anyone releasing references so that when when we check
951 * we know we are not going to be last ones to release dquot */
952 down_write(&sb_dqopt(sb)->dqptr_sem);
953 /* Urgh, this is a terrible hack :( */
954 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
955 if (inode->i_dquot[cnt] != NODQUOT &&
956 atomic_read(&inode->i_dquot[cnt]->dq_count) > 1) {
957 exclusive = 1;
958 break;
959 }
960 }
961 if (!exclusive)
962 dquot_drop_locked(inode);
963 up_write(&sb_dqopt(sb)->dqptr_sem);
964out:
965 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
966 if (got_lock[cnt]) {
967 oinfo = sb_dqinfo(sb, cnt)->dqi_priv;
968 ocfs2_unlock_global_qf(oinfo, 0);
969 }
970 /* In case we bailed out because we had to do expensive locking
971 * do it now... */
972 if (exclusive)
973 status = ocfs2_dquot_drop_slow(inode);
974 mlog_exit(status);
975 return status;
976}
977
978static struct dquot *ocfs2_alloc_dquot(struct super_block *sb, int type) 813static struct dquot *ocfs2_alloc_dquot(struct super_block *sb, int type)
979{ 814{
980 struct ocfs2_dquot *dquot = 815 struct ocfs2_dquot *dquot =
@@ -991,8 +826,8 @@ static void ocfs2_destroy_dquot(struct dquot *dquot)
991} 826}
992 827
993struct dquot_operations ocfs2_quota_operations = { 828struct dquot_operations ocfs2_quota_operations = {
994 .initialize = ocfs2_dquot_initialize, 829 .initialize = dquot_initialize,
995 .drop = ocfs2_dquot_drop, 830 .drop = dquot_drop,
996 .alloc_space = dquot_alloc_space, 831 .alloc_space = dquot_alloc_space,
997 .alloc_inode = dquot_alloc_inode, 832 .alloc_inode = dquot_alloc_inode,
998 .free_space = dquot_free_space, 833 .free_space = dquot_free_space,
diff --git a/fs/omfs/Kconfig b/fs/omfs/Kconfig
new file mode 100644
index 000000000000..b1b9a0aba6fd
--- /dev/null
+++ b/fs/omfs/Kconfig
@@ -0,0 +1,13 @@
1config OMFS_FS
2 tristate "SonicBlue Optimized MPEG File System support"
3 depends on BLOCK
4 select CRC_ITU_T
5 help
6 This is the proprietary file system used by the Rio Karma music
7 player and ReplayTV DVR. Despite the name, this filesystem is not
8 more efficient than a standard FS for MPEG files, in fact likely
9 the opposite is true. Say Y if you have either of these devices
10 and wish to mount its disk.
11
12 To compile this file system support as a module, choose M here: the
13 module will be called omfs. If unsure, say N.
diff --git a/fs/qnx4/Kconfig b/fs/qnx4/Kconfig
new file mode 100644
index 000000000000..be8e0e1445b6
--- /dev/null
+++ b/fs/qnx4/Kconfig
@@ -0,0 +1,25 @@
1config QNX4FS_FS
2 tristate "QNX4 file system support (read only)"
3 depends on BLOCK
4 help
5 This is the file system used by the real-time operating systems
6 QNX 4 and QNX 6 (the latter is also called QNX RTP).
7 Further information is available at <http://www.qnx.com/>.
8 Say Y if you intend to mount QNX hard disks or floppies.
9 Unless you say Y to "QNX4FS read-write support" below, you will
10 only be able to read these file systems.
11
12 To compile this file system support as a module, choose M here: the
13 module will be called qnx4.
14
15 If you don't know whether you need it, then you don't need it:
16 answer N.
17
18config QNX4FS_RW
19 bool "QNX4FS write support (DANGEROUS)"
20 depends on QNX4FS_FS && EXPERIMENTAL && BROKEN
21 help
22 Say Y if you want to test write support for QNX4 file systems.
23
24 It's currently broken, so for now:
25 answer N.
diff --git a/fs/reiserfs/Kconfig b/fs/reiserfs/Kconfig
new file mode 100644
index 000000000000..949b8c6addc8
--- /dev/null
+++ b/fs/reiserfs/Kconfig
@@ -0,0 +1,85 @@
1config REISERFS_FS
2 tristate "Reiserfs support"
3 help
4 Stores not just filenames but the files themselves in a balanced
5 tree. Uses journalling.
6
7 Balanced trees are more efficient than traditional file system
8 architectural foundations.
9
10 In general, ReiserFS is as fast as ext2, but is very efficient with
11 large directories and small files. Additional patches are needed
12 for NFS and quotas, please see <http://www.namesys.com/> for links.
13
14 It is more easily extended to have features currently found in
15 database and keyword search systems than block allocation based file
16 systems are. The next version will be so extended, and will support
17 plugins consistent with our motto ``It takes more than a license to
18 make source code open.''
19
20 Read <http://www.namesys.com/> to learn more about reiserfs.
21
22 Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com.
23
24 If you like it, you can pay us to add new features to it that you
25 need, buy a support contract, or pay us to port it to another OS.
26
27config REISERFS_CHECK
28 bool "Enable reiserfs debug mode"
29 depends on REISERFS_FS
30 help
31 If you set this to Y, then ReiserFS will perform every check it can
32 possibly imagine of its internal consistency throughout its
33 operation. It will also go substantially slower. More than once we
34 have forgotten that this was on, and then gone despondent over the
35 latest benchmarks.:-) Use of this option allows our team to go all
36 out in checking for consistency when debugging without fear of its
37 effect on end users. If you are on the verge of sending in a bug
38 report, say Y and you might get a useful error message. Almost
39 everyone should say N.
40
41config REISERFS_PROC_INFO
42 bool "Stats in /proc/fs/reiserfs"
43 depends on REISERFS_FS && PROC_FS
44 help
45 Create under /proc/fs/reiserfs a hierarchy of files, displaying
46 various ReiserFS statistics and internal data at the expense of
47 making your kernel or module slightly larger (+8 KB). This also
48 increases the amount of kernel memory required for each mount.
49 Almost everyone but ReiserFS developers and people fine-tuning
50 reiserfs or tracing problems should say N.
51
52config REISERFS_FS_XATTR
53 bool "ReiserFS extended attributes"
54 depends on REISERFS_FS
55 help
56 Extended attributes are name:value pairs associated with inodes by
57 the kernel or by users (see the attr(5) manual page, or visit
58 <http://acl.bestbits.at/> for details).
59
60 If unsure, say N.
61
62config REISERFS_FS_POSIX_ACL
63 bool "ReiserFS POSIX Access Control Lists"
64 depends on REISERFS_FS_XATTR
65 select FS_POSIX_ACL
66 help
67 Posix Access Control Lists (ACLs) support permissions for users and
68 groups beyond the owner/group/world scheme.
69
70 To learn more about Access Control Lists, visit the Posix ACLs for
71 Linux website <http://acl.bestbits.at/>.
72
73 If you don't know what Access Control Lists are, say N
74
75config REISERFS_FS_SECURITY
76 bool "ReiserFS Security Labels"
77 depends on REISERFS_FS_XATTR
78 help
79 Security labels support alternative access control models
80 implemented by security modules like SELinux. This option
81 enables an extended attribute handler for file security
82 labels in the ReiserFS filesystem.
83
84 If you are not using a security module that requires using
85 extended attributes for file security labels, say N.
diff --git a/fs/romfs/Kconfig b/fs/romfs/Kconfig
new file mode 100644
index 000000000000..1a17020f9faf
--- /dev/null
+++ b/fs/romfs/Kconfig
@@ -0,0 +1,16 @@
1config ROMFS_FS
2 tristate "ROM file system support"
3 depends on BLOCK
4 ---help---
5 This is a very small read-only file system mainly intended for
6 initial ram disks of installation disks, but it could be used for
7 other read-only media as well. Read
8 <file:Documentation/filesystems/romfs.txt> for details.
9
10 To compile this file system support as a module, choose M here: the
11 module will be called romfs. Note that the file system of your
12 root partition (the one containing the directory /) cannot be a
13 module.
14
15 If you don't know whether you need it, then you don't need it:
16 answer N.
diff --git a/fs/smbfs/Kconfig b/fs/smbfs/Kconfig
new file mode 100644
index 000000000000..e668127c8b2e
--- /dev/null
+++ b/fs/smbfs/Kconfig
@@ -0,0 +1,55 @@
1config SMB_FS
2 tristate "SMB file system support (OBSOLETE, please use CIFS)"
3 depends on INET
4 select NLS
5 help
6 SMB (Server Message Block) is the protocol Windows for Workgroups
7 (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share
8 files and printers over local networks. Saying Y here allows you to
9 mount their file systems (often called "shares" in this context) and
10 access them just like any other Unix directory. Currently, this
11 works only if the Windows machines use TCP/IP as the underlying
12 transport protocol, and not NetBEUI. For details, read
13 <file:Documentation/filesystems/smbfs.txt> and the SMB-HOWTO,
14 available from <http://www.tldp.org/docs.html#howto>.
15
16 Note: if you just want your box to act as an SMB *server* and make
17 files and printing services available to Windows clients (which need
18 to have a TCP/IP stack), you don't need to say Y here; you can use
19 the program SAMBA (available from <ftp://ftp.samba.org/pub/samba/>)
20 for that.
21
22 General information about how to connect Linux, Windows machines and
23 Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
24
25 To compile the SMB support as a module, choose M here:
26 the module will be called smbfs. Most people say N, however.
27
28config SMB_NLS_DEFAULT
29 bool "Use a default NLS"
30 depends on SMB_FS
31 help
32 Enabling this will make smbfs use nls translations by default. You
33 need to specify the local charset (CONFIG_NLS_DEFAULT) in the nls
34 settings and you need to give the default nls for the SMB server as
35 CONFIG_SMB_NLS_REMOTE.
36
37 The nls settings can be changed at mount time, if your smbmount
38 supports that, using the codepage and iocharset parameters.
39
40 smbmount from samba 2.2.0 or later supports this.
41
42config SMB_NLS_REMOTE
43 string "Default Remote NLS Option"
44 depends on SMB_NLS_DEFAULT
45 default "cp437"
46 help
47 This setting allows you to specify a default value for which
48 codepage the server uses. If this field is left blank no
49 translations will be done by default. The local codepage/charset
50 default to CONFIG_NLS_DEFAULT.
51
52 The nls settings can be changed at mount time, if your smbmount
53 supports that, using the codepage and iocharset parameters.
54
55 smbmount from samba 2.2.0 or later supports this.
diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig
new file mode 100644
index 000000000000..25a00d19d686
--- /dev/null
+++ b/fs/squashfs/Kconfig
@@ -0,0 +1,51 @@
1config SQUASHFS
2 tristate "SquashFS 4.0 - Squashed file system support"
3 depends on BLOCK
4 select ZLIB_INFLATE
5 help
6 Saying Y here includes support for SquashFS 4.0 (a Compressed
7 Read-Only File System). Squashfs is a highly compressed read-only
8 filesystem for Linux. It uses zlib compression to compress both
9 files, inodes and directories. Inodes in the system are very small
10 and all blocks are packed to minimise data overhead. Block sizes
11 greater than 4K are supported up to a maximum of 1 Mbytes (default
12 block size 128K). SquashFS 4.0 supports 64 bit filesystems and files
13 (larger than 4GB), full uid/gid information, hard links and
14 timestamps.
15
16 Squashfs is intended for general read-only filesystem use, for
17 archival use (i.e. in cases where a .tar.gz file may be used), and in
18 embedded systems where low overhead is needed. Further information
19 and tools are available from http://squashfs.sourceforge.net.
20
21 If you want to compile this as a module ( = code which can be
22 inserted in and removed from the running kernel whenever you want),
23 say M here and read <file:Documentation/modules.txt>. The module
24 will be called squashfs. Note that the root file system (the one
25 containing the directory /) cannot be compiled as a module.
26
27 If unsure, say N.
28
29config SQUASHFS_EMBEDDED
30
31 bool "Additional option for memory-constrained systems"
32 depends on SQUASHFS
33 default n
34 help
35 Saying Y here allows you to specify cache size.
36
37 If unsure, say N.
38
39config SQUASHFS_FRAGMENT_CACHE_SIZE
40 int "Number of fragments cached" if SQUASHFS_EMBEDDED
41 depends on SQUASHFS
42 default "3"
43 help
44 By default SquashFS caches the last 3 fragments read from
45 the filesystem. Increasing this amount may mean SquashFS
46 has to re-read fragments less often from disk, at the expense
47 of extra system memory. Decreasing this amount will mean
48 SquashFS uses less memory at the expense of extra reads from disk.
49
50 Note there must be at least one cached fragment. Anything
51 much more than three will probably not make much difference.
diff --git a/fs/sysfs/Kconfig b/fs/sysfs/Kconfig
new file mode 100644
index 000000000000..f4b67588b9d6
--- /dev/null
+++ b/fs/sysfs/Kconfig
@@ -0,0 +1,23 @@
1config SYSFS
2 bool "sysfs file system support" if EMBEDDED
3 default y
4 help
5 The sysfs filesystem is a virtual filesystem that the kernel uses to
6 export internal kernel objects, their attributes, and their
7 relationships to one another.
8
9 Users can use sysfs to ascertain useful information about the running
10 kernel, such as the devices the kernel has discovered on each bus and
11 which driver each is bound to. sysfs can also be used to tune devices
12 and other kernel subsystems.
13
14 Some system agents rely on the information in sysfs to operate.
15 /sbin/hotplug uses device and object attributes in sysfs to assist in
16 delegating policy decisions, like persistently naming devices.
17
18 sysfs is currently used by the block subsystem to mount the root
19 partition. If sysfs is disabled you must specify the boot device on
20 the kernel boot command line via its major and minor numbers. For
21 example, "root=03:01" for /dev/hda1.
22
23 Designers of embedded systems may wish to say N here to conserve space.
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 66f6e58a7e4b..f2c478c3424e 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -63,6 +63,9 @@ read(struct file *file, char __user *userbuf, size_t bytes, loff_t *off)
63 int count = min_t(size_t, bytes, PAGE_SIZE); 63 int count = min_t(size_t, bytes, PAGE_SIZE);
64 char *temp; 64 char *temp;
65 65
66 if (!bytes)
67 return 0;
68
66 if (size) { 69 if (size) {
67 if (offs > size) 70 if (offs > size)
68 return 0; 71 return 0;
@@ -131,6 +134,9 @@ static ssize_t write(struct file *file, const char __user *userbuf,
131 int count = min_t(size_t, bytes, PAGE_SIZE); 134 int count = min_t(size_t, bytes, PAGE_SIZE);
132 char *temp; 135 char *temp;
133 136
137 if (!bytes)
138 return 0;
139
134 if (size) { 140 if (size) {
135 if (offs > size) 141 if (offs > size)
136 return 0; 142 return 0;
diff --git a/fs/sysv/Kconfig b/fs/sysv/Kconfig
new file mode 100644
index 000000000000..33aeb4b75db1
--- /dev/null
+++ b/fs/sysv/Kconfig
@@ -0,0 +1,36 @@
1config SYSV_FS
2 tristate "System V/Xenix/V7/Coherent file system support"
3 depends on BLOCK
4 help
5 SCO, Xenix and Coherent are commercial Unix systems for Intel
6 machines, and Version 7 was used on the DEC PDP-11. Saying Y
7 here would allow you to read from their floppies and hard disk
8 partitions.
9
10 If you have floppies or hard disk partitions like that, it is likely
11 that they contain binaries from those other Unix systems; in order
12 to run these binaries, you will want to install linux-abi which is
13 a set of kernel modules that lets you run SCO, Xenix, Wyse,
14 UnixWare, Dell Unix and System V programs under Linux. It is
15 available via FTP (user: ftp) from
16 <ftp://ftp.openlinux.org/pub/people/hch/linux-abi/>).
17 NOTE: that will work only for binaries from Intel-based systems;
18 PDP ones will have to wait until somebody ports Linux to -11 ;-)
19
20 If you only intend to mount files from some other Unix over the
21 network using NFS, you don't need the System V file system support
22 (but you need NFS file system support obviously).
23
24 Note that this option is generally not needed for floppies, since a
25 good portable way to transport files and directories between unixes
26 (and even other operating systems) is given by the tar program ("man
27 tar" or preferably "info tar"). Note also that this option has
28 nothing whatsoever to do with the option "System V IPC". Read about
29 the System V file system in
30 <file:Documentation/filesystems/sysv-fs.txt>.
31 Saying Y here will enlarge your kernel by about 27 KB.
32
33 To compile this as a module, choose M here: the module will be called
34 sysv.
35
36 If you haven't heard about all of this before, it's safe to say N.
diff --git a/fs/udf/Kconfig b/fs/udf/Kconfig
new file mode 100644
index 000000000000..0e0e99bd6bce
--- /dev/null
+++ b/fs/udf/Kconfig
@@ -0,0 +1,18 @@
1config UDF_FS
2 tristate "UDF file system support"
3 select CRC_ITU_T
4 help
5 This is the new file system used on some CD-ROMs and DVDs. Say Y if
6 you intend to mount DVD discs or CDRW's written in packet mode, or
7 if written to by other UDF utilities, such as DirectCD.
8 Please read <file:Documentation/filesystems/udf.txt>.
9
10 To compile this file system support as a module, choose M here: the
11 module will be called udf.
12
13 If unsure, say N.
14
15config UDF_NLS
16 bool
17 default y
18 depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y)
diff --git a/fs/ufs/Kconfig b/fs/ufs/Kconfig
new file mode 100644
index 000000000000..e4f10a40768a
--- /dev/null
+++ b/fs/ufs/Kconfig
@@ -0,0 +1,43 @@
1config UFS_FS
2 tristate "UFS file system support (read only)"
3 depends on BLOCK
4 help
5 BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
6 OpenBSD and NeXTstep) use a file system called UFS. Some System V
7 Unixes can create and mount hard disk partitions and diskettes using
8 this file system as well. Saying Y here will allow you to read from
9 these partitions; if you also want to write to them, say Y to the
10 experimental "UFS file system write support", below. Please read the
11 file <file:Documentation/filesystems/ufs.txt> for more information.
12
13 The recently released UFS2 variant (used in FreeBSD 5.x) is
14 READ-ONLY supported.
15
16 Note that this option is generally not needed for floppies, since a
17 good portable way to transport files and directories between unixes
18 (and even other operating systems) is given by the tar program ("man
19 tar" or preferably "info tar").
20
21 When accessing NeXTstep files, you may need to convert them from the
22 NeXT character set to the Latin1 character set; use the program
23 recode ("info recode") for this purpose.
24
25 To compile the UFS file system support as a module, choose M here: the
26 module will be called ufs.
27
28 If you haven't heard about all of this before, it's safe to say N.
29
30config UFS_FS_WRITE
31 bool "UFS file system write support (DANGEROUS)"
32 depends on UFS_FS && EXPERIMENTAL
33 help
34 Say Y here if you want to try writing to UFS partitions. This is
35 experimental, so you should back up your UFS partitions beforehand.
36
37config UFS_DEBUG
38 bool "UFS debugging"
39 depends on UFS_FS
40 help
41 If you are experiencing any problems with the UFS filesystem, say
42 Y here. This will result in _many_ additional debugging messages to be
43 written to the system log.