All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Brian Mak <bmak@nvidia.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] tse_swap: Fill swapfile with zeroes on ntfs3
Date: Mon, 23 Nov 2026 13:16:15 +0100	[thread overview]
Message-ID: <awQuj0rKcuvA5ro9@yuki.lan> (raw)
In-Reply-To: <20261121003653.179935-3-bmak@nvidia.com>

Hi!
> On ntfs3, fallocate() allocates clusters but does not change the valid
> data length.
> 
> ntfs3 has no ->swap_activate(), so swapon() maps the file with
> generic_swapfile_activate() and ->bmap(). Since ntfs3 was converted to
> iomap in v7.0, ntfs_bmap() calls iomap_bmap(), which only returns a
> block number for IOMAP_MAPPED extents, while ntfs3 reports the range
> beyond the valid data length as IOMAP_UNWRITTEN. swapon() therefore
> rejects the file, and swapon01-03 and swapoff01-02 fail on ntfs3 with:

We had similar bug introduced in exfat code and it was fixed in kernel:

commit 03a43677ca91e3997355a13b1da6e47329b025e1
Author: Jan Polensky <japo@linux.ibm.com>
Date:   Tue Jun 9 18:21:49 2026 +0900

    exfat: add swap_activate support

    Commit 07d67f3e9083 ("exfat: add iomap buffered I/O support")
    converted exfat buffered I/O to iomap, but did not add a
    .swap_activate handler to the address_space_operations.

Hence I assume this is a kernel bug.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2026-11-23 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  0:36 [LTP] [PATCH 0/2] ntfs3: Add magic and fix swapfile creation Brian Mak via ltp
2026-11-21  0:36 ` [LTP] [PATCH 1/2] lib: Add ntfs3 magic Brian Mak via ltp
2026-11-23 12:27   ` Cyril Hrubis
2026-11-21  0:36 ` [LTP] [PATCH 2/2] tse_swap: Fill swapfile with zeroes on ntfs3 Brian Mak via ltp
2026-11-23 12:16   ` Cyril Hrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awQuj0rKcuvA5ro9@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=bmak@nvidia.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.