From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA3792E764D for ; Wed, 26 Aug 2026 21:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787780524; cv=none; b=QSgih3BlzeHBljjcshwpnEMe3BhRv9zVbAXaBcWkfTTFlQnxM/rYL9ud3G9uk0sFrbPe5t/xPbc9MlglL9MlUbnr+tfIR0kzbhx2lZJMJq5QANuNvJ/8HAILbY6QB3SKlFoChf+pCvUIw50nhZkkRKqu86lv1E92mCOGqsrHTPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787780524; c=relaxed/simple; bh=qdbl4tS4znqtOBvivmpB37EDpPTAMeJAibHhx8BIKJY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SrYsY+iP9sz7gOBl9pcPFJBQO9BAklswTud1lWOlG5A8XDroxYgFEcHIZFD+uDVAXBxlon0aIdFNfHL7ixu2i6oVsYGb8IGQjogbAHk78D8yOuFgTAw5XSCQthR0AWGlctjg+8xL4v6VGx+JIqMNkXmenWH2+dodUYADS9crDpo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MKpbw7Kb; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MKpbw7Kb" Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-ca7c1176317so1319841a12.1 for ; Wed, 26 Aug 2026 14:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787780522; x=1788385322; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=5Zk7VlugDyGzxLjlwXgl2ZR+4w7uWEBNa3fcCWQx67Y=; b=MKpbw7KbpHU9jMnlazA3rX1HqdJuvI+yDtSIQ9vkd3uSTy4Wv1QUjKyiLlo7rqgr+U nSZcQ2o3UlImOPhrn6e7CY6DK707eSveRtXbe3GdTO4wri9gbQYvzOxelGP0vZEfszDR OYMNFOUmfxtsZAGMmA9JMHL8TEB4M8A2Mr5Gai8E4UwvTh6mWiMB2iYISNgf1ylDgQXG mTRtl3tiW/9q7UVrVDm+EjGk9vj9x+g3DuU7zyZDgxXl0+QTcLLDSwVRlC49tHF1bl+1 KaVJvmyJUtDRiWYQJyTytJfoKbDW9UkfudNxCIPHE6vl9dxK5xdcRANsh+yOu1p8i7Ax 1TzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787780522; x=1788385322; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5Zk7VlugDyGzxLjlwXgl2ZR+4w7uWEBNa3fcCWQx67Y=; b=VfrfpJ9kYH/d6UcSw+wA84QKJTcitEu8XweZZ4WKezYWY5MZKvE9kwdH5ZwG677ueD /3sJDPZKAlqZpW6rh60PSZbuWd6qNli5N/GMUmwazc60VfP1C7EaImDHShFAJRsX9d2n cElUSiJjJYL8jD1yl6VzOp62Re5Ss8f5F0PvIUrWANbUUEOhd5faJWdSDiWq7sZrs3ze 4GvF4pCdLCVJ5jWBNVUgntxuBzHGt3JQ9ClWoY2p26J+d/+YwV+PAYTeBQNiihTL/IrK 00xEHQ5JAbuHY8lAgR1FEBAiau8n1tPphwVfyV9dwd3kL2A8Xi1mGxwK0EM7+23/AL7X BFAw== X-Gm-Message-State: AFuF++lY01w+62tvda6z237s6x0VSD5UTj0zVdEhw31FkL8tz8eVTJFP hMZo85rc190Ls07X+ZaGWxTSRwAHzkXIYsbXDBn7/yxGwNbi7c2/CTuJ X-Gm-Gg: AR+sD13Dmi74zbx8TYmFPxpCGpr88z3Du3pTmq+NQ6XAOPabbVKyLqdqrojqz6C1jMk hWD0LkEOMZ87whSaBCkCTQu94BdTw5JHfIt4dV0PufRKe86vTAAbk2RIXCPQHOMfyTI0siQh75p WAGQXa21ovF9io+4ccj1AyQ6JFy0XvfqZdX1iGjr7AmCjikR+irCHH4NVF/hw0uqGEf62by86IP vitXrdH3NT31LuqdU8zcOA/E/A7/G//kaysKjlisjDhjJeIkQiKf7cxWe9X8+TNni0oi2hYHIY7 r1wgUMjDKKV5laxqZowRlL1paoJ0JyePr4T2TbwY+35sUp13l/pGve0T2X6rBRjujBxEibADCq4 f0/+5wGphMR8AcxMtgCKpbBqJNHJvF4e2nq8iYifq+3TZOVzhM3ueRjr0yZIAIxl+/CkEmtUQbR 8UcADNcqUXXbWQL/RYVrePpVbJANGnZ3TTQoE= X-Received: by 2002:a17:90b:2e83:b0:38e:bfe:81e9 with SMTP id 98e67ed59e1d1-3966d160e93mr21873375a91.1.1787780522159; Wed, 26 Aug 2026 14:42:02 -0700 (PDT) Received: from nineveh.sos.local ([131.191.24.68]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-396689f1419sm5628673a91.9.2026.08.26.14.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 14:42:01 -0700 (PDT) From: Jeremy Bingham To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, brauner@kernel.org, jkoolstra@xs4all.nl, jack@suse.cz, djwong@kernel.org, viro@zeniv.linux.org.uk, hch@infradead.org, Jeremy Bingham Subject: [PATCH v4 0/3] minix: convert to iomap Date: Wed, 26 Aug 2026 14:41:54 -0700 Message-ID: X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is version 4 of the minix iomap conversion patch series. Versions 1 and 2 had issues uncovered by syzbot. Version 3 fixed those and addressed some critiques given by Darrick J. Wong, while in turn having issues pointed out by Christoph Hellwig and Darrick J. Wong including having direct I/O in the patch series and proper testing. This version addresses those criticisms. The rationale for converting minix to use iomap instead of buffer heads is pretty simple: it both provides a very basic example of a filesystem using iomap, and it makes it easier to keep the minix filesystem in the kernel in the future. It is a rarely used bit of computer history, but it's one that's significant to Linux's early history. Plus, filesystems are a hard subject to approach. Having a very simple filesystem in the mainline kernel tree as an example for aspiring kernel filesystem hackers would be good to help them learn. Per Christoph Hellwig's remarks in the previous version of this patch series, the direct I/O support has been removed. The iomap_symlink_write function has also been reworked to be more useful for symlinks. The original implementation of that function was proposed by Darrick J. Wong as an alternative to the custom buffer head implementation symlink function I had previously that sidestepped iomap for symlinks entirely. One thing reviewers may find in here that seems very odd is the way that iomap.c is included in itree_v1.c and itree_v2.c. This is in common with how itree_common.c is included in those files and minix has been like this at least as far back as the git history goes, and probably back into the 90s. Not including iomap.c in itree_v1.c and itree_v2.c is technically possible, but ended up being a massive headache to make iomap.c stand by itself while itree_common.c is included in itree_v1.c and itree_v2.c. Re-architecting minix to not require these separate itree files with different versions of basic functions depending on the version of the filesystem in question is possible, but definitely out of scope for this patch series. If there is interest I could pick up a patch series I made a little while back, dust it off, and give it another go, but it's a pretty big change for a rarely touched filesystem. I will defer to the collective wiser heads on that. It is not possible to run xfstests against the minix filesystems with a vanilla xfstests-dev repository because mkfs.minix and fsck.minix do not support the proper options. There were some changes required in 'common/rc' to sidestep that issue, which fortunately did not require any changes to mkfs.minix or fsck.minix. Once the tests were able to run, there are also many tests that fail miserably because of inherent limitations in all versions of the minix filesystems. Since these failures aren't "bugs" as such, I then updated xfstests to skip the tests that would never pass so I could focus on actual potential failures and regressions. Across all versions of the minix filesystems, there are 81 tests skipped. Sixty-eight of them are unique to the minix V1 filesystem, while an additional 13 are common to all versions. The exact breakdown of skipped tests will be given at the end of this cover letter. I have created a git repository forked from the main xfstests-dev repository to share these changes for running minix tests. The minix branch can be found at https://github.com/ctdk/xfstests-dev/tree/minix. Leaving the skipped tests out, the iomap patch does not introduce any new failures compared to the baseline in the master linux branch. The iomap patches do fix a test that fails on v1 and v3 (but not v2): generic/472, which tests swapfiles. After the patch, v1 and v3 will properly report that swapfiles are not supported and the test is skipped. Other than that, everything is the same and there are no regressions. This patch series has also been verified to build between each patch being applied. Additionally, the minix module continues to function between each patch. ====== The breakdown of the skipped xfstests: 13 tests skipped for all minix versions: 003, 075, 112, 127, 169, 249, 338, 347, 363, 563, 616, 676, 759 These failures relate to atime/ctime semantics, fallocate not being supported, copy_file_range not being supported, sendfile not being supported, FS_IOC_GETXATTR not being supported, not supporting dm-thin cleanup properly, not supporting cgroup2 writeback accounting, not handling I/O errors while unmounting, and not supporting filenames long enough to be able to run the test. These tests test features that no version of minix supports. 68 skipped only for minix v1. Of those, 52 are skipped because the 64MB minix v1 filesystem fills up while the test is running: 013, 035, 074, 080, 087, 089, 100, 126, 131, 215, 245, 246, 248, 257, 309, 310, 313, 346, 394, 409, 410, 411, 430, 431, 432, 433, 434, 438, 443, 464, 471, 564, 565, 585, 589, 632, 633, 637, 638, 639, 650, 696, 712, 713, 715, 718, 719, 723, 724, 725, 732, 736, 741, 742, 754, 763 2 are skipped because minix v1 does not support fallocate at all. 749, 758 4 fail because fallocate is unsupported and the 64MB filesystem limit. 340, 344, 345, 354 Another 6 tests fail for their own reasons: 124: An aligned vector rw pattern test. Fails with output mismatch. 132: Another aligned vector rw test. Fails because the v1 fs is too small for large writes. 192: An atime persistence test. Fails because v1 atime/ctime is wonky. 428: DAX mmap test. Minix does not support DAX. 706: A seek sanity check. Fails for v1. 707: Testing directory modification race condition during rename. The v1 directory link limit is too small to run the test. ====== Jeremy Bingham (3): iomap: add iomap_symlink_write minix: add iomap functions and definitions minix: finish wiring in iomap functions fs/iomap/buffered-io.c | 34 +++++++++++ fs/minix/file.c | 30 +++++++++- fs/minix/inode.c | 85 ++++++++++++++++++++++++---- fs/minix/iomap.c | 122 ++++++++++++++++++++++++++++++++++++++++ fs/minix/itree_common.c | 10 +++- fs/minix/itree_v1.c | 25 +++++++- fs/minix/itree_v2.c | 17 +++++- fs/minix/minix.h | 23 +++++++- fs/minix/namei.c | 7 ++- include/linux/iomap.h | 3 + 10 files changed, 336 insertions(+), 20 deletions(-) create mode 100644 fs/minix/iomap.c -- 2.47.3