mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Polensky <japo@linux.ibm.com>
To: Namjae Jeon <linkinjeon@kernel.org>, linux-fsdevel@vger.kernel.org
Cc: Sungjong Seo <sj1557.seo@samsung.com>,
	Yuezhang Mo <yuezhang.mo@sony.com>,
	Christoph Hellwig <hch@lst.de>,
	"Darrick J . Wong" <djwong@kernel.org>,
	linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
	japo@linux.ibm.com (Jan Polensky)
Subject: [REGRESSION] exfat: swapon(2) fails with EINVAL after iomap conversion
Date: Wed,  3 Jun 2026 13:02:12 +0200	[thread overview]
Message-ID: <20260603110212.3020276-1-japo@linux.ibm.com> (raw)

Hi,

we are seeing a regression on linux-next after commit

  614f71ca1bdfaa2f25a6f147fe22f3ad031f8e2b
  ("exfat: add iomap buffered I/O support")

With this change, swapon(2) on an exfat swapfile fails with EINVAL.

Observed fallout in LTP:
  swapoff01
  swapoff02
  swapon01
  swapon02
  swapon03

Example failure:

  tst_test.c:1980: TINFO: === Testing on exfat ===
  tst_test.c:1291: TINFO: Formatting /dev/loop0 with exfat opts='' extra opts=''
  tst_test.c:1303: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaKmkGVo/mntpoint fstyp=exfat flags=0
  tse_swap.c:196: TINFO: create a swapfile size of 1 megabytes (MB)
  tst_ioctl.c:26: TINFO: FIBMAP ioctl is supported
  tse_swap.c:228: TFAIL: swapon() on exfat failed: EINVAL (22)

and from swapon02:

  swapon02.c:56: TWARN: swapon(alreadyused) failed: EINVAL (22)
  swapon02.c:73: TFAIL: swapon(2) fail with File already used expected EBUSY: EINVAL (22)

The iomap conversion changes exfat_aops to iomap based callbacks, but does not add a
.swap_activate handler. The VFS documentation says that ->swap_activate() should call
add_swap_extent(), or the helper iomap_swapfile_activate().

So this looks like an exfat swap activation regression triggered by the iomap buffered I/O conversion.

#regzbot introduced: 614f71ca1bdfaa2f25a6f147fe22f3ad031f8e2b
#regzbot monitor: https://lore.kernel.org/all/PUZPR04MB63168E8C2FB92B80F9F6476581002@PUZPR04MB6316.apcprd04.prod.outlook.com/

Thanks
Jan

             reply	other threads:[~2026-06-03 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 11:02 Jan Polensky [this message]
2026-06-03 11:10 ` Namjae Jeon
2026-06-03 13:19   ` [PATCH] exfat: add swap_activate support Jan Polensky
2026-06-03 14:34     ` Namjae Jeon
2026-06-08 15:32       ` Jan Polensky
2026-06-09  9:29         ` Namjae Jeon

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=20260603110212.3020276-1-japo@linux.ibm.com \
    --to=japo@linux.ibm.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=sj1557.seo@samsung.com \
    --cc=yuezhang.mo@sony.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®