diff options
author | David Howells <dhowells@redhat.com> | 2006-09-30 14:45:40 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-09-30 14:52:31 -0400 |
commit | 9361401eb7619c033e2394e4f9f6d410d6719ac7 (patch) | |
tree | 04b94a71f2366988c17740d1c16cfbdec41d5d2e /fs/Kconfig | |
parent | d366e40a1cabd453be6e2609caa7e12f9ca17b1f (diff) |
[PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer. Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.
This patch does the following:
(*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
support.
(*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
an item that uses the block layer. This includes:
(*) Block I/O tracing.
(*) Disk partition code.
(*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
(*) The SCSI layer. As far as I can tell, even SCSI chardevs use the
block layer to do scheduling. Some drivers that use SCSI facilities -
such as USB storage - end up disabled indirectly from this.
(*) Various block-based device drivers, such as IDE and the old CDROM
drivers.
(*) MTD blockdev handling and FTL.
(*) JFFS - which uses set_bdev_super(), something it could avoid doing by
taking a leaf out of JFFS2's book.
(*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is,
however, still used in places, and so is still available.
(*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
parts of linux/fs.h.
(*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
(*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
(*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
is not enabled.
(*) fs/no-block.c is created to hold out-of-line stubs and things that are
required when CONFIG_BLOCK is not set:
(*) Default blockdev file operations (to give error ENODEV on opening).
(*) Makes some /proc changes:
(*) /proc/devices does not list any blockdevs.
(*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
(*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
(*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
given command other than Q_SYNC or if a special device is specified.
(*) In init/do_mounts.c, no reference is made to the blockdev routines if
CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2.
(*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
error ENOSYS by way of cond_syscall if so).
(*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
CONFIG_BLOCK is not set, since they can't then happen.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/Kconfig')
-rw-r--r-- | fs/Kconfig | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index 4fd9efac29ab..1453d2d164f7 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | menu "File systems" | 5 | menu "File systems" |
6 | 6 | ||
7 | if BLOCK | ||
8 | |||
7 | config EXT2_FS | 9 | config EXT2_FS |
8 | tristate "Second extended fs support" | 10 | tristate "Second extended fs support" |
9 | help | 11 | help |
@@ -399,6 +401,8 @@ config ROMFS_FS | |||
399 | If you don't know whether you need it, then you don't need it: | 401 | If you don't know whether you need it, then you don't need it: |
400 | answer N. | 402 | answer N. |
401 | 403 | ||
404 | endif | ||
405 | |||
402 | config INOTIFY | 406 | config INOTIFY |
403 | bool "Inotify file change notification support" | 407 | bool "Inotify file change notification support" |
404 | default y | 408 | default y |
@@ -530,6 +534,7 @@ config FUSE_FS | |||
530 | If you want to develop a userspace FS, or if you want to use | 534 | If you want to develop a userspace FS, or if you want to use |
531 | a filesystem based on FUSE, answer Y or M. | 535 | a filesystem based on FUSE, answer Y or M. |
532 | 536 | ||
537 | if BLOCK | ||
533 | menu "CD-ROM/DVD Filesystems" | 538 | menu "CD-ROM/DVD Filesystems" |
534 | 539 | ||
535 | config ISO9660_FS | 540 | config ISO9660_FS |
@@ -597,7 +602,9 @@ config UDF_NLS | |||
597 | depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y) | 602 | depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y) |
598 | 603 | ||
599 | endmenu | 604 | endmenu |
605 | endif | ||
600 | 606 | ||
607 | if BLOCK | ||
601 | menu "DOS/FAT/NT Filesystems" | 608 | menu "DOS/FAT/NT Filesystems" |
602 | 609 | ||
603 | config FAT_FS | 610 | config FAT_FS |
@@ -782,6 +789,7 @@ config NTFS_RW | |||
782 | It is perfectly safe to say N here. | 789 | It is perfectly safe to say N here. |
783 | 790 | ||
784 | endmenu | 791 | endmenu |
792 | endif | ||
785 | 793 | ||
786 | menu "Pseudo filesystems" | 794 | menu "Pseudo filesystems" |
787 | 795 | ||
@@ -939,7 +947,7 @@ menu "Miscellaneous filesystems" | |||
939 | 947 | ||
940 | config ADFS_FS | 948 | config ADFS_FS |
941 | tristate "ADFS file system support (EXPERIMENTAL)" | 949 | tristate "ADFS file system support (EXPERIMENTAL)" |
942 | depends on EXPERIMENTAL | 950 | depends on BLOCK && EXPERIMENTAL |
943 | help | 951 | help |
944 | The Acorn Disc Filing System is the standard file system of the | 952 | The Acorn Disc Filing System is the standard file system of the |
945 | RiscOS operating system which runs on Acorn's ARM-based Risc PC | 953 | RiscOS operating system which runs on Acorn's ARM-based Risc PC |
@@ -967,7 +975,7 @@ config ADFS_FS_RW | |||
967 | 975 | ||
968 | config AFFS_FS | 976 | config AFFS_FS |
969 | tristate "Amiga FFS file system support (EXPERIMENTAL)" | 977 | tristate "Amiga FFS file system support (EXPERIMENTAL)" |
970 | depends on EXPERIMENTAL | 978 | depends on BLOCK && EXPERIMENTAL |
971 | help | 979 | help |
972 | The Fast File System (FFS) is the common file system used on hard | 980 | The Fast File System (FFS) is the common file system used on hard |
973 | disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20). Say Y | 981 | disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20). Say Y |
@@ -989,7 +997,7 @@ config AFFS_FS | |||
989 | 997 | ||
990 | config HFS_FS | 998 | config HFS_FS |
991 | tristate "Apple Macintosh file system support (EXPERIMENTAL)" | 999 | tristate "Apple Macintosh file system support (EXPERIMENTAL)" |
992 | depends on EXPERIMENTAL | 1000 | depends on BLOCK && EXPERIMENTAL |
993 | select NLS | 1001 | select NLS |
994 | help | 1002 | help |
995 | If you say Y here, you will be able to mount Macintosh-formatted | 1003 | If you say Y here, you will be able to mount Macintosh-formatted |
@@ -1002,6 +1010,7 @@ config HFS_FS | |||
1002 | 1010 | ||
1003 | config HFSPLUS_FS | 1011 | config HFSPLUS_FS |
1004 | tristate "Apple Extended HFS file system support" | 1012 | tristate "Apple Extended HFS file system support" |
1013 | depends on BLOCK | ||
1005 | select NLS | 1014 | select NLS |
1006 | select NLS_UTF8 | 1015 | select NLS_UTF8 |
1007 | help | 1016 | help |
@@ -1015,7 +1024,7 @@ config HFSPLUS_FS | |||
1015 | 1024 | ||
1016 | config BEFS_FS | 1025 | config BEFS_FS |
1017 | tristate "BeOS file system (BeFS) support (read only) (EXPERIMENTAL)" | 1026 | tristate "BeOS file system (BeFS) support (read only) (EXPERIMENTAL)" |
1018 | depends on EXPERIMENTAL | 1027 | depends on BLOCK && EXPERIMENTAL |
1019 | select NLS | 1028 | select NLS |
1020 | help | 1029 | help |
1021 | The BeOS File System (BeFS) is the native file system of Be, Inc's | 1030 | The BeOS File System (BeFS) is the native file system of Be, Inc's |
@@ -1042,7 +1051,7 @@ config BEFS_DEBUG | |||
1042 | 1051 | ||
1043 | config BFS_FS | 1052 | config BFS_FS |
1044 | tristate "BFS file system support (EXPERIMENTAL)" | 1053 | tristate "BFS file system support (EXPERIMENTAL)" |
1045 | depends on EXPERIMENTAL | 1054 | depends on BLOCK && EXPERIMENTAL |
1046 | help | 1055 | help |
1047 | Boot File System (BFS) is a file system used under SCO UnixWare to | 1056 | Boot File System (BFS) is a file system used under SCO UnixWare to |
1048 | allow the bootloader access to the kernel image and other important | 1057 | allow the bootloader access to the kernel image and other important |
@@ -1064,7 +1073,7 @@ config BFS_FS | |||
1064 | 1073 | ||
1065 | config EFS_FS | 1074 | config EFS_FS |
1066 | tristate "EFS file system support (read only) (EXPERIMENTAL)" | 1075 | tristate "EFS file system support (read only) (EXPERIMENTAL)" |
1067 | depends on EXPERIMENTAL | 1076 | depends on BLOCK && EXPERIMENTAL |
1068 | help | 1077 | help |
1069 | EFS is an older file system used for non-ISO9660 CD-ROMs and hard | 1078 | EFS is an older file system used for non-ISO9660 CD-ROMs and hard |
1070 | disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer | 1079 | disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer |
@@ -1079,7 +1088,7 @@ config EFS_FS | |||
1079 | 1088 | ||
1080 | config JFFS_FS | 1089 | config JFFS_FS |
1081 | tristate "Journalling Flash File System (JFFS) support" | 1090 | tristate "Journalling Flash File System (JFFS) support" |
1082 | depends on MTD | 1091 | depends on MTD && BLOCK |
1083 | help | 1092 | help |
1084 | JFFS is the Journaling Flash File System developed by Axis | 1093 | JFFS is the Journaling Flash File System developed by Axis |
1085 | Communications in Sweden, aimed at providing a crash/powerdown-safe | 1094 | Communications in Sweden, aimed at providing a crash/powerdown-safe |
@@ -1264,6 +1273,7 @@ endchoice | |||
1264 | 1273 | ||
1265 | config CRAMFS | 1274 | config CRAMFS |
1266 | tristate "Compressed ROM file system support (cramfs)" | 1275 | tristate "Compressed ROM file system support (cramfs)" |
1276 | depends on BLOCK | ||
1267 | select ZLIB_INFLATE | 1277 | select ZLIB_INFLATE |
1268 | help | 1278 | help |
1269 | Saying Y here includes support for CramFs (Compressed ROM File | 1279 | Saying Y here includes support for CramFs (Compressed ROM File |
@@ -1283,6 +1293,7 @@ config CRAMFS | |||
1283 | 1293 | ||
1284 | config VXFS_FS | 1294 | config VXFS_FS |
1285 | tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)" | 1295 | tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)" |
1296 | depends on BLOCK | ||
1286 | help | 1297 | help |
1287 | FreeVxFS is a file system driver that support the VERITAS VxFS(TM) | 1298 | FreeVxFS is a file system driver that support the VERITAS VxFS(TM) |
1288 | file system format. VERITAS VxFS(TM) is the standard file system | 1299 | file system format. VERITAS VxFS(TM) is the standard file system |
@@ -1300,6 +1311,7 @@ config VXFS_FS | |||
1300 | 1311 | ||
1301 | config HPFS_FS | 1312 | config HPFS_FS |
1302 | tristate "OS/2 HPFS file system support" | 1313 | tristate "OS/2 HPFS file system support" |
1314 | depends on BLOCK | ||
1303 | help | 1315 | help |
1304 | OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS | 1316 | OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS |
1305 | is the file system used for organizing files on OS/2 hard disk | 1317 | is the file system used for organizing files on OS/2 hard disk |
@@ -1316,6 +1328,7 @@ config HPFS_FS | |||
1316 | 1328 | ||
1317 | config QNX4FS_FS | 1329 | config QNX4FS_FS |
1318 | tristate "QNX4 file system support (read only)" | 1330 | tristate "QNX4 file system support (read only)" |
1331 | depends on BLOCK | ||
1319 | help | 1332 | help |
1320 | This is the file system used by the real-time operating systems | 1333 | This is the file system used by the real-time operating systems |
1321 | QNX 4 and QNX 6 (the latter is also called QNX RTP). | 1334 | QNX 4 and QNX 6 (the latter is also called QNX RTP). |
@@ -1343,6 +1356,7 @@ config QNX4FS_RW | |||
1343 | 1356 | ||
1344 | config SYSV_FS | 1357 | config SYSV_FS |
1345 | tristate "System V/Xenix/V7/Coherent file system support" | 1358 | tristate "System V/Xenix/V7/Coherent file system support" |
1359 | depends on BLOCK | ||
1346 | help | 1360 | help |
1347 | SCO, Xenix and Coherent are commercial Unix systems for Intel | 1361 | SCO, Xenix and Coherent are commercial Unix systems for Intel |
1348 | machines, and Version 7 was used on the DEC PDP-11. Saying Y | 1362 | machines, and Version 7 was used on the DEC PDP-11. Saying Y |
@@ -1381,6 +1395,7 @@ config SYSV_FS | |||
1381 | 1395 | ||
1382 | config UFS_FS | 1396 | config UFS_FS |
1383 | tristate "UFS file system support (read only)" | 1397 | tristate "UFS file system support (read only)" |
1398 | depends on BLOCK | ||
1384 | help | 1399 | help |
1385 | BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD, | 1400 | BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD, |
1386 | OpenBSD and NeXTstep) use a file system called UFS. Some System V | 1401 | OpenBSD and NeXTstep) use a file system called UFS. Some System V |
@@ -1959,11 +1974,13 @@ config GENERIC_ACL | |||
1959 | 1974 | ||
1960 | endmenu | 1975 | endmenu |
1961 | 1976 | ||
1977 | if BLOCK | ||
1962 | menu "Partition Types" | 1978 | menu "Partition Types" |
1963 | 1979 | ||
1964 | source "fs/partitions/Kconfig" | 1980 | source "fs/partitions/Kconfig" |
1965 | 1981 | ||
1966 | endmenu | 1982 | endmenu |
1983 | endif | ||
1967 | 1984 | ||
1968 | source "fs/nls/Kconfig" | 1985 | source "fs/nls/Kconfig" |
1969 | 1986 | ||