Re: [PATCH v2] ext2: Remove deprecated DAX support
From: Jan Kara
Date: Mon May 25 2026 - 12:31:13 EST
On Sun 24-05-26 11:08:53, Ashwin Gundarapu wrote:
>
> 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@xxxxxxxxxxx>
> ---
> v2: Removed unused sbi variable and fixed indentation as reported
> by kernel test robot.
Thanks for the patch. Some style nits below.
> 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
> +
Stray empty line here.
> 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
> +
... and here.
> 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,
Please indent this with tab the same way as other methods.
> @@ -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;
Indented with spaces instead of tabs.
> @@ -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);
Indented with spaces instead of tabs.
> if (error)
> return error;
>
...
> + case Opt_xip:
> + ext2_msg_fc(fc, KERN_ERR, "DAX support has been removed. Please use ext4 instead.");
> + return -EINVAL;
Indented with spaces instead of tabs.
> @@ -992,16 +974,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);
> - }
> - }
> +
> +
Stray empty lines.
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR