* [PATCH v4] ext2: Remove deprecated DAX support
@ 2026-05-24 15:35 Ashwin Gundarapu
2026-05-28 4:16 ` kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: Ashwin Gundarapu @ 2026-05-24 15:35 UTC (permalink / raw)
To: jack; +Cc: linux-ext4, linux-kernel
DAX support in ext2 was deprecated in commit d5a2693f93e4
("ext2: Deprecate DAX") with a removal deadline of end of 2025.
Remove all DAX code from ext2 as scheduled.
This removes the DAX mount option, IOMAP DAX support, DAX file
operations, DAX address_space_operations, and the DAX fault handler.
Signed-off-by: Ashwin Gundarapu <linuxuser509@zohomail.in>
---
v4: Changed Opt_xip and Opt_dax from -EINVAL to warning with break
to avoid mount failures. Removed dead XIP/DAX show_options code.
v3: Restored Opt_dax for graceful mount error message. Fixed remaining
space-to-tab indentation. Kept EXT2_MOUNT_XIP for compilation.
v2: Removed unused sbi variable and fixed indentation as reported
by kernel test robot.
---
fs/ext2/ext2.h | 5 +-
fs/ext2/file.c | 118 ++----------------------------------------------
fs/ext2/inode.c | 61 ++-----------------------
fs/ext2/super.c | 47 ++++---------------
4 files changed, 18 insertions(+), 213 deletions(-)
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index 3eb1f342645c..3a26308ec841 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -114,8 +114,6 @@ struct ext2_sb_info {
*/
spinlock_t s_lock;
struct mb_cache *s_ea_block_cache;
- struct dax_device *s_daxdev;
- u64 s_dax_part_off;
};
static inline spinlock_t *
@@ -373,11 +371,10 @@ struct ext2_inode {
#define EXT2_MOUNT_NO_UID32 0x000200 /* Disable 32-bit UIDs */
#define EXT2_MOUNT_XATTR_USER 0x004000 /* Extended user attributes */
#define EXT2_MOUNT_POSIX_ACL 0x008000 /* POSIX Access Control Lists */
-#define EXT2_MOUNT_XIP 0x010000 /* Obsolete, use DAX */
+#define EXT2_MOUNT_XIP 0x010000 /* Obsolete*/
#define EXT2_MOUNT_USRQUOTA 0x020000 /* user quota */
#define EXT2_MOUNT_GRPQUOTA 0x040000 /* group quota */
#define EXT2_MOUNT_RESERVATION 0x080000 /* Preallocation */
-#define EXT2_MOUNT_DAX 0x100000 /* Direct Access */
#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index d9b1eb34694a..0fd9208af062 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -21,7 +21,6 @@
#include <linux/time.h>
#include <linux/pagemap.h>
-#include <linux/dax.h>
#include <linux/filelock.h>
#include <linux/quotaops.h>
#include <linux/iomap.h>
@@ -32,111 +31,6 @@
#include "acl.h"
#include "trace.h"
-#ifdef CONFIG_FS_DAX
-static ssize_t ext2_dax_read_iter(struct kiocb *iocb, struct iov_iter *to)
-{
- struct inode *inode = iocb->ki_filp->f_mapping->host;
- ssize_t ret;
-
- if (!iov_iter_count(to))
- return 0; /* skip atime */
-
- inode_lock_shared(inode);
- ret = dax_iomap_rw(iocb, to, &ext2_iomap_ops);
- inode_unlock_shared(inode);
-
- file_accessed(iocb->ki_filp);
- return ret;
-}
-
-static ssize_t ext2_dax_write_iter(struct kiocb *iocb, struct iov_iter *from)
-{
- struct file *file = iocb->ki_filp;
- struct inode *inode = file->f_mapping->host;
- ssize_t ret;
-
- inode_lock(inode);
- ret = generic_write_checks(iocb, from);
- if (ret <= 0)
- goto out_unlock;
- ret = file_remove_privs(file);
- if (ret)
- goto out_unlock;
- ret = file_update_time(file);
- if (ret)
- goto out_unlock;
-
- ret = dax_iomap_rw(iocb, from, &ext2_iomap_ops);
- if (ret > 0 && iocb->ki_pos > i_size_read(inode)) {
- i_size_write(inode, iocb->ki_pos);
- mark_inode_dirty(inode);
- }
-
-out_unlock:
- inode_unlock(inode);
- if (ret > 0)
- ret = generic_write_sync(iocb, ret);
- return ret;
-}
-
-/*
- * The lock ordering for ext2 DAX fault paths is:
- *
- * mmap_lock (MM)
- * sb_start_pagefault (vfs, freeze)
- * address_space->invalidate_lock
- * address_space->i_mmap_rwsem or page_lock (mutually exclusive in DAX)
- * ext2_inode_info->truncate_mutex
- *
- * The default page_lock and i_size verification done by non-DAX fault paths
- * is sufficient because ext2 doesn't support hole punching.
- */
-static vm_fault_t ext2_dax_fault(struct vm_fault *vmf)
-{
- struct inode *inode = file_inode(vmf->vma->vm_file);
- vm_fault_t ret;
- bool write = (vmf->flags & FAULT_FLAG_WRITE) &&
- (vmf->vma->vm_flags & VM_SHARED);
-
- if (write) {
- sb_start_pagefault(inode->i_sb);
- file_update_time(vmf->vma->vm_file);
- }
- filemap_invalidate_lock_shared(inode->i_mapping);
-
- ret = dax_iomap_fault(vmf, 0, NULL, NULL, &ext2_iomap_ops);
-
- filemap_invalidate_unlock_shared(inode->i_mapping);
- if (write)
- sb_end_pagefault(inode->i_sb);
- return ret;
-}
-
-static const struct vm_operations_struct ext2_dax_vm_ops = {
- .fault = ext2_dax_fault,
- /*
- * .huge_fault is not supported for DAX because allocation in ext2
- * cannot be reliably aligned to huge page sizes and so pmd faults
- * will always fail and fail back to regular faults.
- */
- .page_mkwrite = ext2_dax_fault,
- .pfn_mkwrite = ext2_dax_fault,
-};
-
-static int ext2_file_mmap_prepare(struct vm_area_desc *desc)
-{
- struct file *file = desc->file;
-
- if (!IS_DAX(file_inode(file)))
- return generic_file_mmap_prepare(desc);
-
- file_accessed(file);
- desc->vm_ops = &ext2_dax_vm_ops;
- return 0;
-}
-#else
-#define ext2_file_mmap_prepare generic_file_mmap_prepare
-#endif
/*
* Called when filp is released. This happens when all file descriptors
@@ -285,10 +179,7 @@ static ssize_t ext2_dio_write_iter(struct kiocb *iocb, struct iov_iter *from)
static ssize_t ext2_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{
-#ifdef CONFIG_FS_DAX
- if (IS_DAX(iocb->ki_filp->f_mapping->host))
- return ext2_dax_read_iter(iocb, to);
-#endif
+
if (iocb->ki_flags & IOCB_DIRECT)
return ext2_dio_read_iter(iocb, to);
@@ -297,10 +188,7 @@ static ssize_t ext2_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
static ssize_t ext2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{
-#ifdef CONFIG_FS_DAX
- if (IS_DAX(iocb->ki_filp->f_mapping->host))
- return ext2_dax_write_iter(iocb, from);
-#endif
+
if (iocb->ki_flags & IOCB_DIRECT)
return ext2_dio_write_iter(iocb, from);
@@ -321,7 +209,7 @@ const struct file_operations ext2_file_operations = {
#ifdef CONFIG_COMPAT
.compat_ioctl = ext2_compat_ioctl,
#endif
- .mmap_prepare = ext2_file_mmap_prepare,
+ .mmap_prepare = generic_file_mmap_prepare,
.open = ext2_file_open,
.release = ext2_release_file,
.fsync = ext2_fsync,
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 74aca5eb572d..e2aa6152fa1f 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -26,7 +26,6 @@
#include <linux/time.h>
#include <linux/highuid.h>
#include <linux/pagemap.h>
-#include <linux/dax.h>
#include <linux/blkdev.h>
#include <linux/quotaops.h>
#include <linux/writeback.h>
@@ -741,27 +740,6 @@ static int ext2_get_blocks(struct inode *inode,
goto cleanup;
}
- if (IS_DAX(inode)) {
- /*
- * We must unmap blocks before zeroing so that writeback cannot
- * overwrite zeros with stale data from block device page cache.
- */
- clean_bdev_aliases(inode->i_sb->s_bdev,
- le32_to_cpu(chain[depth-1].key),
- count);
- /*
- * block must be initialised before we put it in the tree
- * so that it's not found by another thread before it's
- * initialised
- */
- err = sb_issue_zeroout(inode->i_sb,
- le32_to_cpu(chain[depth-1].key), count,
- GFP_KERNEL);
- if (err) {
- mutex_unlock(&ei->truncate_mutex);
- goto cleanup;
- }
- }
*new = true;
ext2_splice_branch(inode, iblock, partial, indirect_blks, count);
@@ -811,7 +789,6 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
unsigned int blkbits = inode->i_blkbits;
unsigned long first_block = offset >> blkbits;
unsigned long max_blocks = (length + (1 << blkbits) - 1) >> blkbits;
- struct ext2_sb_info *sbi = EXT2_SB(inode->i_sb);
bool new = false, boundary = false;
u32 bno;
int ret;
@@ -841,10 +818,7 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
iomap->flags = 0;
iomap->offset = (u64)first_block << blkbits;
- if (flags & IOMAP_DAX)
- iomap->dax_dev = sbi->s_daxdev;
- else
- iomap->bdev = inode->i_sb->s_bdev;
+ iomap->bdev = inode->i_sb->s_bdev;
if (ret == 0) {
/*
@@ -859,8 +833,6 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
} else {
iomap->type = IOMAP_MAPPED;
iomap->addr = (u64)bno << blkbits;
- if (flags & IOMAP_DAX)
- iomap->addr += sbi->s_dax_part_off;
iomap->length = (u64)ret << blkbits;
iomap->flags |= IOMAP_F_MERGED;
}
@@ -962,13 +934,6 @@ ext2_writepages(struct address_space *mapping, struct writeback_control *wbc)
return mpage_writepages(mapping, wbc, ext2_get_block);
}
-static int
-ext2_dax_writepages(struct address_space *mapping, struct writeback_control *wbc)
-{
- struct ext2_sb_info *sbi = EXT2_SB(mapping->host->i_sb);
-
- return dax_writeback_mapping_range(mapping, sbi->s_daxdev, wbc);
-}
const struct address_space_operations ext2_aops = {
.dirty_folio = block_dirty_folio,
@@ -984,10 +949,6 @@ const struct address_space_operations ext2_aops = {
.error_remove_folio = generic_error_remove_folio,
};
-static const struct address_space_operations ext2_dax_aops = {
- .writepages = ext2_dax_writepages,
- .dirty_folio = noop_dirty_folio,
-};
/*
* Probably it should be a library function... search for first non-zero word
@@ -1186,9 +1147,6 @@ static void __ext2_truncate_blocks(struct inode *inode, loff_t offset)
blocksize = inode->i_sb->s_blocksize;
iblock = (offset + blocksize-1) >> EXT2_BLOCK_SIZE_BITS(inode->i_sb);
-#ifdef CONFIG_FS_DAX
- WARN_ON(!rwsem_is_locked(&inode->i_mapping->invalidate_lock));
-#endif
n = ext2_block_to_path(inode, iblock, offsets, NULL);
if (n == 0)
@@ -1290,12 +1248,8 @@ static int ext2_setsize(struct inode *inode, loff_t newsize)
inode_dio_wait(inode);
- if (IS_DAX(inode))
- error = dax_truncate_page(inode, newsize, NULL,
- &ext2_iomap_ops);
- else
- error = block_truncate_page(inode->i_mapping,
- newsize, ext2_get_block);
+ error = block_truncate_page(inode->i_mapping,
+ newsize, ext2_get_block);
if (error)
return error;
@@ -1363,7 +1317,7 @@ void ext2_set_inode_flags(struct inode *inode)
unsigned int flags = EXT2_I(inode)->i_flags;
inode->i_flags &= ~(S_SYNC | S_APPEND | S_IMMUTABLE | S_NOATIME |
- S_DIRSYNC | S_DAX);
+ S_DIRSYNC);
if (flags & EXT2_SYNC_FL)
inode->i_flags |= S_SYNC;
if (flags & EXT2_APPEND_FL)
@@ -1374,18 +1328,13 @@ void ext2_set_inode_flags(struct inode *inode)
inode->i_flags |= S_NOATIME;
if (flags & EXT2_DIRSYNC_FL)
inode->i_flags |= S_DIRSYNC;
- if (test_opt(inode->i_sb, DAX) && S_ISREG(inode->i_mode))
- inode->i_flags |= S_DAX;
}
void ext2_set_file_ops(struct inode *inode)
{
inode->i_op = &ext2_file_inode_operations;
inode->i_fop = &ext2_file_operations;
- if (IS_DAX(inode))
- inode->i_mapping->a_ops = &ext2_dax_aops;
- else
- inode->i_mapping->a_ops = &ext2_aops;
+ inode->i_mapping->a_ops = &ext2_aops;
}
struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 19f76d8cb473..39f67f1d63cc 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -34,7 +34,6 @@
#include <linux/log2.h>
#include <linux/quotaops.h>
#include <linux/uaccess.h>
-#include <linux/dax.h>
#include <linux/iversion.h>
#include "ext2.h"
#include "xattr.h"
@@ -198,7 +197,6 @@ static void ext2_put_super (struct super_block * sb)
brelse (sbi->s_sbh);
sb->s_fs_info = NULL;
kfree(sbi->s_blockgroup_lock);
- fs_put_dax(sbi->s_daxdev, NULL);
kfree(sbi);
}
@@ -329,11 +327,7 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
if (test_opt(sb, GRPQUOTA))
seq_puts(seq, ",grpquota");
- if (test_opt(sb, XIP))
- seq_puts(seq, ",xip");
- if (test_opt(sb, DAX))
- seq_puts(seq, ",dax");
if (!test_opt(sb, RESERVATION))
seq_puts(seq, ",noreservation");
@@ -595,20 +589,12 @@ static int ext2_parse_param(struct fs_context *fc, struct fs_parameter *param)
ext2_msg_fc(fc, KERN_INFO, "(no)acl options not supported");
break;
#endif
- case Opt_xip:
- ext2_msg_fc(fc, KERN_INFO, "use dax instead of xip");
- ctx_set_mount_opt(ctx, EXT2_MOUNT_XIP);
- fallthrough;
- case Opt_dax:
-#ifdef CONFIG_FS_DAX
- ext2_msg_fc(fc, KERN_WARNING,
- "DAX enabled. Warning: DAX support in ext2 driver is deprecated"
- " and will be removed at the end of 2025. Please use ext4 driver instead.");
- ctx_set_mount_opt(ctx, EXT2_MOUNT_DAX);
-#else
- ext2_msg_fc(fc, KERN_INFO, "dax option not supported");
-#endif
- break;
+ case Opt_xip:
+ ext2_msg_fc(fc, KERN_WARNING, "DAX support has been removed. xip option ignored.");
+ break;
+ case Opt_dax:
+ ext2_msg_fc(fc, KERN_WARNING, "DAX support has been removed. dax option ignored.");
+ break;
#if defined(CONFIG_QUOTA)
case Opt_quota:
@@ -906,8 +892,6 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc)
}
sb->s_fs_info = sbi;
sbi->s_sb_block = sb_block;
- sbi->s_daxdev = fs_dax_get_by_bdev(sb->s_bdev, &sbi->s_dax_part_off,
- NULL, NULL);
spin_lock_init(&sbi->s_lock);
ret = -EINVAL;
@@ -992,16 +976,8 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc)
}
blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);
- if (test_opt(sb, DAX)) {
- if (!sbi->s_daxdev) {
- ext2_msg(sb, KERN_ERR,
- "DAX unsupported by block device. Turning off DAX.");
- clear_opt(sbi->s_mount_opt, DAX);
- } else if (blocksize != PAGE_SIZE) {
- ext2_msg(sb, KERN_ERR, "unsupported blocksize for DAX\n");
- clear_opt(sbi->s_mount_opt, DAX);
- }
- }
+
+
/* If the blocksize doesn't match, re-read the thing.. */
if (sb->s_blocksize != blocksize) {
@@ -1252,7 +1228,6 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc)
failed_mount:
brelse(bh);
failed_sbi:
- fs_put_dax(sbi->s_daxdev, NULL);
sb->s_fs_info = NULL;
kfree(sbi->s_blockgroup_lock);
kfree(sbi);
@@ -1379,11 +1354,7 @@ static int ext2_reconfigure(struct fs_context *fc)
spin_lock(&sbi->s_lock);
es = sbi->s_es;
- if ((sbi->s_mount_opt ^ new_opts.s_mount_opt) & EXT2_MOUNT_DAX) {
- ext2_msg(sb, KERN_WARNING, "warning: refusing change of "
- "dax flag with busy inodes while remounting");
- new_opts.s_mount_opt ^= EXT2_MOUNT_DAX;
- }
+
if ((bool)(flags & SB_RDONLY) == sb_rdonly(sb))
goto out_set;
if (flags & SB_RDONLY) {
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v4] ext2: Remove deprecated DAX support
2026-05-24 15:35 [PATCH v4] ext2: Remove deprecated DAX support Ashwin Gundarapu
@ 2026-05-28 4:16 ` kernel test robot
2026-05-28 8:26 ` Ashwin Gundarapu
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2026-05-28 4:16 UTC (permalink / raw)
To: Ashwin Gundarapu, jack; +Cc: oe-kbuild-all, linux-ext4, linux-kernel
Hi Ashwin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jack-fs/for_next]
[also build test WARNING on linus/master v7.1-rc5 next-20260527]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ashwin-Gundarapu/ext2-Remove-deprecated-DAX-support/20260524-233631
base: https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git for_next
patch link: https://lore.kernel.org/r/19e5aa07c9b.3a2e576d130187.5289857983023045470%40zohomail.in
patch subject: [PATCH v4] ext2: Remove deprecated DAX support
config: arm-randconfig-r071-20260528 (https://download.01.org/0day-ci/archive/20260528/202605281203.e91xvDyr-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
smatch: v0.5.0-9185-gbcc58b9c
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605281203.e91xvDyr-lkp@intel.com/
smatch warnings:
fs/ext2/inode.c:1251 ext2_setsize() warn: inconsistent indenting
vim +1251 fs/ext2/inode.c
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1236
2c27c65ed0696f0 Christoph Hellwig 2010-06-04 1237 static int ext2_setsize(struct inode *inode, loff_t newsize)
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1238 {
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1239 int error;
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1240
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1241 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1242 S_ISLNK(inode->i_mode)))
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1243 return -EINVAL;
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1244 if (ext2_inode_is_fast_symlink(inode))
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1245 return -EINVAL;
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1246 if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1247 return -EPERM;
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1248
562c72aa57c36b1 Christoph Hellwig 2011-06-24 1249 inode_dio_wait(inode);
562c72aa57c36b1 Christoph Hellwig 2011-06-24 1250
737f2e93b9724a3 Nicholas Piggin 2010-05-27 @1251 error = block_truncate_page(inode->i_mapping,
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1252 newsize, ext2_get_block);
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1253 if (error)
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1254 return error;
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1255
70f3bad8c3154ba Jan Kara 2021-04-12 1256 filemap_invalidate_lock(inode->i_mapping);
2c27c65ed0696f0 Christoph Hellwig 2010-06-04 1257 truncate_setsize(inode, newsize);
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1258 __ext2_truncate_blocks(inode, newsize);
70f3bad8c3154ba Jan Kara 2021-04-12 1259 filemap_invalidate_unlock(inode->i_mapping);
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1260
5cdc59fce617a2e Jeff Layton 2023-10-04 1261 inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
^1da177e4c3f415 Linus Torvalds 2005-04-16 1262 if (inode_needs_sync(inode)) {
b0439bbc29f0201 Jan Kara 2026-03-26 1263 mmb_sync(&EXT2_I(inode)->i_metadata_bhs);
c37650161a53c01 Christoph Hellwig 2010-10-06 1264 sync_inode_metadata(inode, 1);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1265 } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1266 mark_inode_dirty(inode);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1267 }
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1268
737f2e93b9724a3 Nicholas Piggin 2010-05-27 1269 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1270 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1271
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v4] ext2: Remove deprecated DAX support
2026-05-28 4:16 ` kernel test robot
@ 2026-05-28 8:26 ` Ashwin Gundarapu
2026-06-01 9:29 ` Jan Kara
0 siblings, 1 reply; 4+ messages in thread
From: Ashwin Gundarapu @ 2026-05-28 8:26 UTC (permalink / raw)
To: kernel test robot; +Cc: jack, oe-kbuild-all, linux-ext4, linux-kernel
This indentation warning is from pre-existing code (originally written in 2010) that my patch did not touch. I prefer to keep this patch focused solely on removing deprecated DAX support. A separate cleanup patch can be submitted later if desired.
Regards,
Ashwin Gundarapu
From: kernel test robot <lkp@intel.com>
To: "Ashwin Gundarapu"<linuxuser509@zohomail.in>, "jack"<jack@suse.com>
Cc: <oe-kbuild-all@lists.linux.dev>, "linux-ext4"<linux-ext4@vger.kernel.org>, "linux-kernel"<linux-kernel@vger.kernel.org>
Date: Thu, 28 May 2026 09:46:32 +0530
Subject: Re: [PATCH v4] ext2: Remove deprecated DAX support
> Hi Ashwin,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on jack-fs/for_next]
> [also build test WARNING on linus/master v7.1-rc5 next-20260527]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Ashwin-Gundarapu/ext2-Remove-deprecated-DAX-support/20260524-233631
> base: https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git for_next
> patch link: https://lore.kernel.org/r/19e5aa07c9b.3a2e576d130187.5289857983023045470%40zohomail.in
> patch subject: [PATCH v4] ext2: Remove deprecated DAX support
> config: arm-randconfig-r071-20260528 (https://download.01.org/0day-ci/archive/20260528/202605281203.e91xvDyr-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> smatch: v0.5.0-9185-gbcc58b9c
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605281203.e91xvDyr-lkp@intel.com/
>
> smatch warnings:
> fs/ext2/inode.c:1251 ext2_setsize() warn: inconsistent indenting
>
> vim +1251 fs/ext2/inode.c
>
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1236
> 2c27c65ed0696f0 Christoph Hellwig 2010-06-04 1237 static int ext2_setsize(struct inode *inode, loff_t newsize)
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1238 {
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1239 int error;
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1240
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1241 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1242 S_ISLNK(inode->i_mode)))
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1243 return -EINVAL;
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1244 if (ext2_inode_is_fast_symlink(inode))
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1245 return -EINVAL;
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1246 if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1247 return -EPERM;
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1248
> 562c72aa57c36b1 Christoph Hellwig 2011-06-24 1249 inode_dio_wait(inode);
> 562c72aa57c36b1 Christoph Hellwig 2011-06-24 1250
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 @1251 error = block_truncate_page(inode->i_mapping,
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1252 newsize, ext2_get_block);
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1253 if (error)
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1254 return error;
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1255
> 70f3bad8c3154ba Jan Kara 2021-04-12 1256 filemap_invalidate_lock(inode->i_mapping);
> 2c27c65ed0696f0 Christoph Hellwig 2010-06-04 1257 truncate_setsize(inode, newsize);
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1258 __ext2_truncate_blocks(inode, newsize);
> 70f3bad8c3154ba Jan Kara 2021-04-12 1259 filemap_invalidate_unlock(inode->i_mapping);
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1260
> 5cdc59fce617a2e Jeff Layton 2023-10-04 1261 inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 1262 if (inode_needs_sync(inode)) {
> b0439bbc29f0201 Jan Kara 2026-03-26 1263 mmb_sync(&EXT2_I(inode)->i_metadata_bhs);
> c37650161a53c01 Christoph Hellwig 2010-10-06 1264 sync_inode_metadata(inode, 1);
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 1265 } else {
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 1266 mark_inode_dirty(inode);
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 1267 }
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1268
> 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1269 return 0;
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 1270 }
> ^1da177e4c3f415 Linus Torvalds 2005-04-16 1271
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v4] ext2: Remove deprecated DAX support
2026-05-28 8:26 ` Ashwin Gundarapu
@ 2026-06-01 9:29 ` Jan Kara
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2026-06-01 9:29 UTC (permalink / raw)
To: Ashwin Gundarapu
Cc: kernel test robot, jack, oe-kbuild-all, linux-ext4, linux-kernel
On Thu 28-05-26 13:56:14, Ashwin Gundarapu wrote:
> This indentation warning is from pre-existing code (originally written in
> 2010) that my patch did not touch. I prefer to keep this patch focused
> solely on removing deprecated DAX support. A separate cleanup patch can
> be submitted later if desired.
Actually no, your patch indeed introduced several indentation problems (by
removing some conditions but not reindenting internal blocks). Also there
were some spurious empty lines added. No need to resend, I've fixed that up
on commit. Thanks for the patch.
Honza
> Regards,
> Ashwin Gundarapu
>
> From: kernel test robot <lkp@intel.com>
> To: "Ashwin Gundarapu"<linuxuser509@zohomail.in>, "jack"<jack@suse.com>
> Cc: <oe-kbuild-all@lists.linux.dev>, "linux-ext4"<linux-ext4@vger.kernel.org>, "linux-kernel"<linux-kernel@vger.kernel.org>
> Date: Thu, 28 May 2026 09:46:32 +0530
> Subject: Re: [PATCH v4] ext2: Remove deprecated DAX support
>
> > Hi Ashwin,
> >
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on jack-fs/for_next]
> > [also build test WARNING on linus/master v7.1-rc5 next-20260527]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >
> > url: https://github.com/intel-lab-lkp/linux/commits/Ashwin-Gundarapu/ext2-Remove-deprecated-DAX-support/20260524-233631
> > base: https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git for_next
> > patch link: https://lore.kernel.org/r/19e5aa07c9b.3a2e576d130187.5289857983023045470%40zohomail.in
> > patch subject: [PATCH v4] ext2: Remove deprecated DAX support
> > config: arm-randconfig-r071-20260528 (https://download.01.org/0day-ci/archive/20260528/202605281203.e91xvDyr-lkp@intel.com/config)
> > compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> > smatch: v0.5.0-9185-gbcc58b9c
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202605281203.e91xvDyr-lkp@intel.com/
> >
> > smatch warnings:
> > fs/ext2/inode.c:1251 ext2_setsize() warn: inconsistent indenting
> >
> > vim +1251 fs/ext2/inode.c
> >
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1236
> > 2c27c65ed0696f0 Christoph Hellwig 2010-06-04 1237 static int ext2_setsize(struct inode *inode, loff_t newsize)
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1238 {
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1239 int error;
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1240
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1241 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1242 S_ISLNK(inode->i_mode)))
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1243 return -EINVAL;
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1244 if (ext2_inode_is_fast_symlink(inode))
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1245 return -EINVAL;
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1246 if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1247 return -EPERM;
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1248
> > 562c72aa57c36b1 Christoph Hellwig 2011-06-24 1249 inode_dio_wait(inode);
> > 562c72aa57c36b1 Christoph Hellwig 2011-06-24 1250
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 @1251 error = block_truncate_page(inode->i_mapping,
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1252 newsize, ext2_get_block);
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1253 if (error)
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1254 return error;
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1255
> > 70f3bad8c3154ba Jan Kara 2021-04-12 1256 filemap_invalidate_lock(inode->i_mapping);
> > 2c27c65ed0696f0 Christoph Hellwig 2010-06-04 1257 truncate_setsize(inode, newsize);
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1258 __ext2_truncate_blocks(inode, newsize);
> > 70f3bad8c3154ba Jan Kara 2021-04-12 1259 filemap_invalidate_unlock(inode->i_mapping);
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1260
> > 5cdc59fce617a2e Jeff Layton 2023-10-04 1261 inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1262 if (inode_needs_sync(inode)) {
> > b0439bbc29f0201 Jan Kara 2026-03-26 1263 mmb_sync(&EXT2_I(inode)->i_metadata_bhs);
> > c37650161a53c01 Christoph Hellwig 2010-10-06 1264 sync_inode_metadata(inode, 1);
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1265 } else {
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1266 mark_inode_dirty(inode);
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1267 }
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1268
> > 737f2e93b9724a3 Nicholas Piggin 2010-05-27 1269 return 0;
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1270 }
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1271
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
> >
> >
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-01 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-24 15:35 [PATCH v4] ext2: Remove deprecated DAX support Ashwin Gundarapu
2026-05-28 4:16 ` kernel test robot
2026-05-28 8:26 ` Ashwin Gundarapu
2026-06-01 9:29 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox