From: syzbot <syzbot@syzkaller.appspotmail.com>
To: syzbot@lists.linux.dev
Cc: syzbot <syzbot+ci97bc680341b3b928@syzkaller.appspotmail.com>,
jbingham@gmail.com
Subject: Forwarded: [syzbot ci] Re: minix: convert to iomap and add direct I/O
Date: Fri, 26 Jun 2026 13:21:24 -0700 [thread overview]
Message-ID: <6a3edf44.80e5668d.5d0ef.000b.GAE@google.com> (raw)
In-Reply-To: <20260626202118.2464544-1-jbingham@gmail.com>
For archival purposes, forwarding an incoming command email to
syzbot@lists.linux.dev.
***
Subject: [syzbot ci] Re: minix: convert to iomap and add direct I/O
Author: jbingham@gmail.com
Apparently I did this wrong the first time. I misunderstood and sent one
patch covering all the changes differing from master, rather than just
patching the changes to fix the errors syzbot found.
#syz test
---
fs/minix/file.c | 4 ++--
fs/minix/inode.c | 11 ++++++-----
fs/minix/itree_common.c | 11 ++++++++++-
fs/minix/minix.h | 3 +++
4 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/fs/minix/file.c b/fs/minix/file.c
index 1f4217115401..b07c853fa43a 100644
--- a/fs/minix/file.c
+++ b/fs/minix/file.c
@@ -175,8 +175,8 @@ const struct file_operations minix_file_operations = {
.splice_write = iter_file_splice_write,
};
-static int minix_setattr(struct mnt_idmap *idmap,
- struct dentry *dentry, struct iattr *attr)
+int minix_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
+ struct iattr *attr)
{
struct inode *inode = d_inode(dentry);
int error;
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index cd12e59ce9b9..8a79ff82a656 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -444,10 +444,10 @@ static ssize_t minix_writeback_range(struct iomap_writepage_ctx *wpc,
if (pos < wpc->iomap.offset ||
pos >= wpc->iomap.offset + wpc->iomap.length) {
if (INODE_VERSION(wpc->inode) == MINIX_V1)
- error = V1_minix_iomap_begin(wpc->inode, pos, len, 0,
+ error = V1_minix_iomap_begin(wpc->inode, pos, len, IOMAP_WRITE,
&wpc->iomap, NULL);
else
- error = V2_minix_iomap_begin(wpc->inode, pos, len, 0,
+ error = V2_minix_iomap_begin(wpc->inode, pos, len, IOMAP_WRITE,
&wpc->iomap, NULL);
if (error)
return error;
@@ -490,7 +490,7 @@ static int minix_writepages(struct address_space *mapping,
static int minix_read_folio(struct file *file, struct folio *folio)
{
- const struct iomap_ops *ops = minix_iomap_ops_ver(file->f_inode);
+ const struct iomap_ops *ops = minix_iomap_ops_ver(folio->mapping->host);
iomap_bio_read_folio(folio, ops);
return 0;
@@ -504,7 +504,7 @@ static int minix_block_read_folio(struct file *file, struct folio *folio)
static void minix_readahead(struct readahead_control *rac)
{
- const struct iomap_ops *ops = minix_iomap_ops_ver(rac->file->f_inode);
+ const struct iomap_ops *ops = minix_iomap_ops_ver(rac->mapping->host);
iomap_bio_readahead(rac, ops);
}
@@ -545,7 +545,7 @@ static sector_t minix_bmap(struct address_space *mapping, sector_t block)
return iomap_bmap(mapping, block, ops);
}
-static const struct address_space_operations minix_aops = {
+const struct address_space_operations minix_aops = {
.dirty_folio = iomap_dirty_folio,
.invalidate_folio = iomap_invalidate_folio,
.read_folio = minix_read_folio,
@@ -575,6 +575,7 @@ static const struct address_space_operations minix_dir_aops = {
static const struct inode_operations minix_symlink_inode_operations = {
.get_link = page_get_link,
.getattr = minix_getattr,
+ .setattr = minix_setattr,
};
void minix_set_inode(struct inode *inode, dev_t rdev)
diff --git a/fs/minix/itree_common.c b/fs/minix/itree_common.c
index c3cd2c75af9c..5a8b73a7beda 100644
--- a/fs/minix/itree_common.c
+++ b/fs/minix/itree_common.c
@@ -311,7 +311,16 @@ static inline void truncate (struct inode * inode)
long iblock;
iblock = (inode->i_size + sb->s_blocksize -1) >> sb->s_blocksize_bits;
- block_truncate_page(inode->i_mapping, inode->i_size, get_block);
+
+ /* Depending on what address space operations are being used by the
+ * inode being truncated, we need to either call iomap_truncate_page or
+ * block_truncate_page.
+ */
+ if (inode->i_mapping->a_ops == &minix_aops)
+ iomap_truncate_page(inode, inode->i_size, NULL,
+ minix_iomap_ops_ver(inode), NULL, NULL);
+ else
+ block_truncate_page(inode->i_mapping, inode->i_size, get_block);
n = block_to_path(inode, iblock, offsets);
if (!n)
diff --git a/fs/minix/minix.h b/fs/minix/minix.h
index face74100346..270e4e0620a1 100644
--- a/fs/minix/minix.h
+++ b/fs/minix/minix.h
@@ -58,6 +58,8 @@ void minix_free_block(struct inode *inode, unsigned long block);
unsigned long minix_count_free_blocks(struct super_block *sb);
int minix_getattr(struct mnt_idmap *, const struct path *,
struct kstat *, u32, unsigned);
+int minix_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
+ struct iattr *attr);
int minix_prepare_chunk(struct folio *folio, loff_t pos, unsigned len);
struct mapping_metadata_bhs *minix_get_metadata_bhs(struct inode *inode);
int minix_fsync(struct file *file, loff_t start, loff_t end, int datasync);
@@ -88,6 +90,7 @@ extern int V2_minix_iomap_begin(struct inode *inode, loff_t offset,
loff_t length, unsigned int flags, struct iomap *iomap,
struct iomap *srcmap);
+extern const struct address_space_operations minix_aops;
extern const struct inode_operations minix_file_inode_operations;
extern const struct inode_operations minix_dir_inode_operations;
extern const struct file_operations minix_file_operations;
--
2.47.3
next prev parent reply other threads:[~2026-06-26 20:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 21:48 [PATCH 0/3] minix: convert to iomap and add direct I/O Jeremy Bingham
2026-06-25 21:48 ` [PATCH 1/3] minix: add iomap infrastructure Jeremy Bingham
2026-06-25 21:48 ` [PATCH 2/3] minix: convert address space operations to iomap Jeremy Bingham
2026-06-25 21:48 ` [PATCH 3/3] minix: convert file operations to iomap and add direct I/O Jeremy Bingham
2026-06-26 7:07 ` [syzbot ci] Re: minix: convert " syzbot ci
2026-06-26 19:25 ` Jeremy Bingham
2026-06-26 19:25 ` Forwarded: " syzbot
2026-06-26 20:00 ` syzbot ci
2026-06-26 20:21 ` Jeremy Bingham
2026-06-26 20:21 ` syzbot [this message]
2026-06-26 20:50 ` syzbot ci
2026-06-26 20:21 ` Forwarded: " syzbot
2026-06-26 20:54 ` syzbot ci
2026-06-26 20:21 ` Forwarded: " syzbot
2026-06-26 21:00 ` syzbot ci
2026-06-26 19:26 ` Forwarded: " syzbot
2026-06-26 20:18 ` syzbot ci
2026-06-26 19:26 ` Forwarded: " syzbot
2026-06-26 20:13 ` syzbot ci
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=6a3edf44.80e5668d.5d0ef.000b.GAE@google.com \
--to=syzbot@syzkaller.appspotmail.com \
--cc=jbingham@gmail.com \
--cc=syzbot+ci97bc680341b3b928@syzkaller.appspotmail.com \
--cc=syzbot@lists.linux.dev \
/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.