From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (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 378112D876A for ; Thu, 25 Jun 2026 21:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782424092; cv=none; b=YivQhe1/gTXXOCcnIuTpo+PHuT2OW1l/YokhcaT/0ZhGeeAKvEWwPrdy7nXXI0Yk1zB6DciFWl8xkvXITkl5NjKKyDb1Ws3WWQYe6FezI86N2vOdXA4in2FcKg+Y2JJvLY7ghOpMROgHM9wawkb7vw4Mo18pZQmMm8yyga7ABK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782424092; c=relaxed/simple; bh=OPNccpRHSYSBLidTqRYfSBcEOWR/G93sxzXp4gvivy4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i+MV3/jhAatiJhwzy5fRV0wIwjMypd1LPvE6NK1oNn3lqwxGiEr01mc416g+06qhqN+4VlgdHniUjZyk4Xrq8DJAxcHCTrEL2bosSbiqrfHGPUgW0QJIKawxfJlajYowSbFzCnU0o9A74gLpr2NSaXUl+qIjxIRoFX04MHuVds4= 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=mXbqHa0S; arc=none smtp.client-ip=209.85.215.169 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="mXbqHa0S" Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-c8857a27041so133758a12.1 for ; Thu, 25 Jun 2026 14:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782424090; x=1783028890; 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; bh=3ASYoiMDL7EOic1DM8a3ID9PrBKttY8w+hXsFtVlG58=; b=mXbqHa0SPewHv1ECO83nqjCbbhES1ZV/Zqm9KkcEWFD9O9bSP4IwjrmxV/HZLWg7Nq wyZrWPTbMdFAgq7jg9uUHegQdu/BXtOKT3Ar+hccq303jLahijdnxmXBhcKuDfFL+kx+ O6OKDIoUh1AQn8itiVSCZ94LVPYcbM0vCXA7Uv1965E/eoiHS6KLVGCVB3fa6YgQnZls 9dbJRt/tOarcngKgCOrxCgxWZ6eoeABfiuZ98LIRBVXxjCCNcqld7b15rKdcHFXcHamE xJMuJXLCYisrOX7jYvMtKXQojFQq0idod56BnmTF+IBWqYC06j+iiq7w+jwYNHGF0xFW erSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782424090; x=1783028890; 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; bh=3ASYoiMDL7EOic1DM8a3ID9PrBKttY8w+hXsFtVlG58=; b=tNp5EekMLKMNeCe9LPGK6hLhgpjdzUpVbppqruJyiOT/AVLueflAZEhjF3npw9IYkb DKfrKqB9pYRXSfp2EqVBhf+hkBntObV9vftqqAuXkXSNT38zlf710tmrv4fzBPJ8EuNA DaH0d8UiYnceHqRBQS+q04kXIbZKxmSCp35sDo71f2tBOOoYJQfgcc1pbvGMbgK0mskg zwI8bF58mAfydC+XMiOFWhHtl0iInRaYvay2onWw/cbiUz6tQlPb1DLidGKjyUSCueib y78mLL1KYwpdhASa/3xvyE1B8Sb667HoicJQEg13Px89gmzDAwqEChBIBofrW+BeyJcx Y6cg== X-Gm-Message-State: AOJu0YwAp9GhNknUrhTCf0j9HzJJjqK+d7J7xrPic31V4OmPvwlYY1mi Z8VUpd2Ey8guv7M+ga0lM5U4PTzcpc7b3jXJww27bdS/GDPYjSlDJoxC X-Gm-Gg: AfdE7cki6db/kNIou1GT+k1i6f5gNuSA+WwLiWKeLitUAnSdrQ733zYZgUMAQ2zhbJB zMYNiJ+Ov9p4FN/SIa1BbspclvTq7mpj0JtTm7euuN2FlRFjK79yIUytgk9OzjRJ0N5UTeWR9/L VhqUBgWBxAJqGnBkVKPCG6Zf6NfQqPCTCSAzwUZVGnEMg5SnOzdSHZIQDiopABnH8Dz2uIAYb+N 7WK2EqWVXRG0LnnLB1/KgcCEkbU8oO4me02/yd5G9SjXgjAGgT2UPwPC2hky7rlI5aZE7njtMLN 97hiq7xur0FbyDmiIaXSMjv6UdxXnKpMQ7PiH9H/MGPY4wOkKv8x+YkT1E3f4dUcpwofEIkQFhc ILBxN5MtEu0qac5spprdvceg2e7J3cO0LCjIxQ5kQ8A5raidwfkEya2YfA9RC0sY= X-Received: by 2002:a05:6a20:a110:b0:3b9:5efb:cb2b with SMTP id adf61e73a8af0-3bd4b2d0759mr4684350637.44.1782424090338; Thu, 25 Jun 2026 14:48:10 -0700 (PDT) Received: from nineveh.sos.local ([131.191.24.68]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-845a413c39fsm6192134b3a.55.2026.06.25.14.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 14:48:09 -0700 (PDT) From: Jeremy Bingham To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, brauner@kernel.org, jkoolstra@xs4all.nl, Jeremy Bingham Subject: [PATCH 0/3] minix: convert to iomap and add direct I/O Date: Thu, 25 Jun 2026 14:48:02 -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 series converts the minix filesystem from the buffer_head-based I/O path to the iomap API, and adds direct I/O support in the process. The conversion is straightforward: minix's indirect block tree mapping logic (from itree_common.c) is reworked into an iomap_begin/iomap_end implementation. The iomap_end callback is a no-op since minix has no extents or transactions to finalize. Patch 1 adds the iomap infrastructure: the new iomap.c file, wrapper functions and iomap_ops structs in itree_v1.c and itree_v2.c, and the relevant declarations in minix.h. The iomap.c file is #include'd into itree_v1.c and itree_v2.c rather than compiled as a standalone translation unit. This is because the minix filesystem versions (V1 vs V2/V3) have different block_t sizes (16-bit vs 32-bit) and different indirect tree depths. This follows the existing pattern in minix where itree_common.c is included into both itree_v1.c and itree_v2.c. Each version provides a thin wrapper and a corresponding iomap_ops struct. Patch 2 converts the regular file address space operations to iomap: read_folio, readahead, writepages (with a writeback callback), bmap, and folio lifecycle helpers. Directory inodes continue to use buffer_head-based operations via a new minix_dir_aops, since directory handling still relies on buffer head chunks for prepare/write_begin. Patch 3 converts the file_operations: replacing the generic read/write iterators with iomap-aware versions, adding direct I/O read/write paths using iomap_dio_rw, and setting FMODE_CAN_ODIRECT in the open handler. The minix iomap implementation was adapted from the out-of-tree xiafs iomap conversion. The xiafs module itself borrowed heavily from the modernized minix kernel module. The exfat iomap changes were an additional reference for both conversions. This has been compile-tested and put through basic runtime testing: creating files, creating directories, writing and reading files, removing files and directories, and files and directory structures persisting after unmounting and remounting all work for all versions of the minix filesystem. Signed-off-by: Jeremy Bingham Jeremy Bingham (3): minix: add iomap infrastructure minix: convert address space operations to iomap minix: convert file operations to iomap and add direct I/O fs/minix/file.c | 153 ++++++++++++++++++++++++++++++++++++++++++-- fs/minix/inode.c | 83 ++++++++++++++++++++++-- fs/minix/iomap.c | 114 +++++++++++++++++++++++++++++++++ fs/minix/itree_v1.c | 25 +++++++- fs/minix/itree_v2.c | 17 ++++- fs/minix/minix.h | 22 ++++++- 6 files changed, 398 insertions(+), 16 deletions(-) create mode 100644 fs/minix/iomap.c -- 2.47.3