Skip to content

Commit 6cd176a

Browse files
Matthew Wilcoxtorvalds
authored andcommitted
vfs,ext2: remove CONFIG_EXT2_FS_XIP and rename CONFIG_FS_XIP to CONFIG_FS_DAX
The fewer Kconfig options we have the better. Use the generic CONFIG_FS_DAX to enable XIP support in ext2 as well as in the core. Signed-off-by: Matthew Wilcox <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Boaz Harrosh <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Jan Kara <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Theodore Ts'o <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0764238 commit 6cd176a

File tree

8 files changed

+21
-26
lines changed

8 files changed

+21
-26
lines changed

fs/Kconfig

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ if BLOCK
1313
source "fs/ext2/Kconfig"
1414
source "fs/ext3/Kconfig"
1515
source "fs/ext4/Kconfig"
16-
17-
config FS_XIP
18-
# execute in place
19-
bool
20-
depends on EXT2_FS_XIP
21-
default y
22-
2316
source "fs/jbd/Kconfig"
2417
source "fs/jbd2/Kconfig"
2518

@@ -40,6 +33,20 @@ source "fs/ocfs2/Kconfig"
4033
source "fs/btrfs/Kconfig"
4134
source "fs/nilfs2/Kconfig"
4235

36+
config FS_DAX
37+
bool "Direct Access (DAX) support"
38+
depends on MMU
39+
help
40+
Direct Access (DAX) can be used on memory-backed block devices.
41+
If the block device supports DAX and the filesystem supports DAX,
42+
then you can avoid using the pagecache to buffer I/Os. Turning
43+
on this option will compile in support for DAX; you will need to
44+
mount the filesystem using the -o dax option.
45+
46+
If you do not have a block device that is capable of using this,
47+
or if unsure, say N. Saying Y will increase the size of the kernel
48+
by about 5kB.
49+
4350
endif # BLOCK
4451

4552
# Posix ACL utility routines

fs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ obj-$(CONFIG_SIGNALFD) += signalfd.o
2828
obj-$(CONFIG_TIMERFD) += timerfd.o
2929
obj-$(CONFIG_EVENTFD) += eventfd.o
3030
obj-$(CONFIG_AIO) += aio.o
31-
obj-$(CONFIG_FS_XIP) += dax.o
31+
obj-$(CONFIG_FS_DAX) += dax.o
3232
obj-$(CONFIG_FILE_LOCKING) += locks.o
3333
obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o
3434
obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o

fs/ext2/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,3 @@ config EXT2_FS_SECURITY
4242

4343
If you are not using a security module that requires using
4444
extended attributes for file security labels, say N.
45-
46-
config EXT2_FS_XIP
47-
bool "Ext2 execute in place support"
48-
depends on EXT2_FS && MMU
49-
help
50-
Execute in place can be used on memory-backed block devices. If you
51-
enable this option, you can select to mount block devices which are
52-
capable of this feature without using the page cache.
53-
54-
If you do not use a block device that is capable of using this,
55-
or if unsure, say N.

fs/ext2/ext2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ struct ext2_inode {
380380
#define EXT2_MOUNT_NO_UID32 0x000200 /* Disable 32-bit UIDs */
381381
#define EXT2_MOUNT_XATTR_USER 0x004000 /* Extended user attributes */
382382
#define EXT2_MOUNT_POSIX_ACL 0x008000 /* POSIX Access Control Lists */
383-
#ifdef CONFIG_FS_XIP
383+
#ifdef CONFIG_FS_DAX
384384
#define EXT2_MOUNT_XIP 0x010000 /* Execute in place */
385385
#else
386386
#define EXT2_MOUNT_XIP 0

fs/ext2/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "xattr.h"
2626
#include "acl.h"
2727

28-
#ifdef CONFIG_EXT2_FS_XIP
28+
#ifdef CONFIG_FS_DAX
2929
static int ext2_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
3030
{
3131
return dax_fault(vma, vmf, ext2_get_block);
@@ -108,7 +108,7 @@ const struct file_operations ext2_file_operations = {
108108
.splice_write = iter_file_splice_write,
109109
};
110110

111-
#ifdef CONFIG_EXT2_FS_XIP
111+
#ifdef CONFIG_FS_DAX
112112
const struct file_operations ext2_xip_file_operations = {
113113
.llseek = generic_file_llseek,
114114
.read = new_sync_read,

fs/ext2/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
291291
seq_puts(seq, ",grpquota");
292292
#endif
293293

294-
#if defined(CONFIG_EXT2_FS_XIP)
294+
#ifdef CONFIG_FS_DAX
295295
if (sbi->s_mount_opt & EXT2_MOUNT_XIP)
296296
seq_puts(seq, ",xip");
297297
#endif
@@ -558,7 +558,7 @@ static int parse_options(char *options, struct super_block *sb)
558558
break;
559559
#endif
560560
case Opt_xip:
561-
#ifdef CONFIG_EXT2_FS_XIP
561+
#ifdef CONFIG_FS_DAX
562562
set_opt (sbi->s_mount_opt, XIP);
563563
#else
564564
ext2_msg(sb, KERN_INFO, "xip option not supported");

include/linux/fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ struct super_operations {
16761676
#define S_IMA 1024 /* Inode has an associated IMA struct */
16771677
#define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */
16781678
#define S_NOSEC 4096 /* no suid or xattr security attributes */
1679-
#ifdef CONFIG_FS_XIP
1679+
#ifdef CONFIG_FS_DAX
16801680
#define S_DAX 8192 /* Direct Access, avoiding the page cache */
16811681
#else
16821682
#define S_DAX 0 /* Make all the DAX code disappear */

scripts/diffconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ If no config files are specified, .config and .config.old are used.
2828
Example usage:
2929
$ diffconfig .config config-with-some-changes
3030
-EXT2_FS_XATTR n
31-
-EXT2_FS_XIP n
3231
CRAMFS n -> y
3332
EXT2_FS y -> n
3433
LOG_BUF_SHIFT 14 -> 16

0 commit comments

Comments
 (0)