Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 630CC468C26 for ; Wed, 29 Jul 2026 19:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785353446; cv=none; b=ckJVkyEfbQSU90kuSBmKClxQpB8x8zzesMiOP+6iPwqBUsopMLawydR0sCynz1/xQ7aBJ1NNKyIbhcEuHr4TD3rFQmYBUgY0n0lgh/Leb+tgO2tBHjOmNy6i5xZzQwZCmYkz1Xx3v4UbYqXO8tzD6hdiwxkCHSq/BcAs5hMBC2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785353446; c=relaxed/simple; bh=Uw7C4e5uBhT8vXzKYITTNDOJUa2oJzwBgsvCUtyl1dM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s/w4wN/qpc8NatSN+v7l7hUqjwnJbCvMP6OtqW+TFBwUsIJesVKiyIHEddQ+tG/5tWju8A7AYfrf79WjWYArbM7kB2c2QIzh7t4ZjIVSV/WNLeLyMeujb4SuHJZZAf9EztrA4zl08chzKIpVf34iT54MduFps00soGzzh7GkwcM= 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=CB+iZfNb; arc=none smtp.client-ip=209.85.214.182 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="CB+iZfNb" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2cc61541f8cso788055ad.0 for ; Wed, 29 Jul 2026 12:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785353437; x=1785958237; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=StgZMYvucPudjQFyQxx/n6i1IzSm0NIyISLaDyFfQ88=; b=CB+iZfNb8n1QXOPMjAuwEz8vRdsdStTKjEWzSqsEr6sNZMDsC1sIC2EQG/SBgyxx4H qdi0T2Aprc+q96d47OZMbAU+/N3OSvbF3kkOvI+Qv1gOT3wgMJERREMsky3UXNBMdtHc zc5U1XB/my0sSkx8ESD8CNdZF0/twawTjTOI3Mv7sekgMda0THc3vr3WbKkueFB9nrxj FAWn2RiP/RxuTqln0s2U3EUm7qgrSsAQQg2Si6xByNBN+jRy5dFdhPwR49LGYlEhhxUA 7NqD+CbCSmO0ZFlRhhhpVQ3NWXzbzXOz1T3z+/P25/6NVqqxmZRulyqi8HK8bwiu0OHw Xqig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785353437; x=1785958237; h=content-transfer-encoding:mime-version:references:in-reply-to :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=StgZMYvucPudjQFyQxx/n6i1IzSm0NIyISLaDyFfQ88=; b=JUg0VXOyziplqyMTTudlKu9vwIusQV7S9Ecqpmzf/3VWYW4fJR/x5Eqobs7oAnQW9l T0eLNXD0GjKeQ1o8iGEm23zKd+4H0/LDNWb8W5cdpG3yZHn17l9e0m2/Z/iMWxjGRswD Em4PeWYbe8E+VM0t33/tkRIShxNd6nBIA0Oieo+i14GJbP1zqurZbnDN3Vx/nXN24b/N aYgHDd6L9ZgghBMP6YIwqr0OeC00CVJAFaU99crVyYMcC67sMqCunbaXWWmngB/LIb54 gZC/wSAe3Ih+p0BlFcsjvg2oXkq0q5LpbhxwNwrmPfEMJQLUlEi8sapExIFhPr8p+dqG 9/9w== X-Forwarded-Encrypted: i=1; AHgh+RoRGDaVGv6etQgJCt56OmXvxZFg8sA9xtl0p19e/POBBTXo2p16pNVj+v2BfZUh6pe1jawJBej2FaZvgFk7@vger.kernel.org X-Gm-Message-State: AOJu0Yx+QKFFfljhB4+xMwXNzWiEbF4R95TfPXpKhK/23Y8aFGl1MmCF du9uyiQ6mLV5rPMaYtJ5PNmAnnaxjPF8j7Q7r0eMdxIxMjy+CutK5zQq X-Gm-Gg: AR+sD11lex7Up3PUo9KyghGHxIctRtp/Q9HTzMCkMjiNS8FJ9FGzUl4PSwdatGZyDGD IR4zpHYjc6eCBBo2vYuUdUOeVoYIzp9eyoWnEC5BVH2s+RKR3waraqhbdwaaKRgsOUWmBJ2oPn9 MeF8bBHlks/wUoaDtd7i0hvSCzKtzTpHXQrsDBSk0O5o2IzQiO0a/KzrH21HLWtQH5WMhBytNqC zQc7srf8hy6SeRx4CuoKjZKSiWu6LmOHOM8DKCyu0m68X0XIPoNgdN4FLEk1Kw4oNOM1/3xnbRP hAxjgQ7ap2id/K0Ihof3bsDflCMP7W3FLvxD0kaykhh8kHa1mqN3/QHndpzi/IBECEaF/34qyWt 0FnzyLXUC2E44bpb2aOyW4RmQl2FSxEdDSsjDMoxRL3WarKFSVcXUh7zYCv6lgeVgY06l/QAFOV aKQgQUpxKeEvr59kfQDF/GtfnbenWu1+6Y6YR7E8T0tkZJM+qx4/9o7N3SD3T6bhZBRCxK/sH4/ +4l8AAirRdF8fBF2JCLi6KqAYS0KW1agbqwwjs= X-Received: by 2002:a17:902:fa10:b0:2cf:b9f9:18bb with SMTP id d9443c01a7336-2d0266889b1mr22693885ad.4.1785353437030; Wed, 29 Jul 2026 12:30:37 -0700 (PDT) Received: from localhost ([2a03:2880:ff:7::]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d024b114a5sm14066635ad.21.2026.07.29.12.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2026 12:30:35 -0700 (PDT) From: Joanne Koong To: Christian Brauner , hch@lst.de, "Darrick J . Wong" , linux-fsdevel@vger.kernel.org Cc: changfengnan@bytedance.com, kbusch@kernel.org, Matthew Wilcox , Jan Kara , Jonathan Corbet , David Sterba , Gao Xiang , Namjae Jeon , Theodore Ts'o , Jaegeuk Kim , Miklos Szeredi , Andreas Gruenbacher , Mikulas Patocka , Hyunchul Lee , Konstantin Komarov , Carlos Maiolino , Damien Le Moal , libaokun@linux.alibaba.com, bfoster@redhat.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH v5 20/22] iomap: remove ->iomap_begin()/->iomap_end() legacy path Date: Wed, 29 Jul 2026 12:27:35 -0700 Message-ID: <20260729192737.3190206-21-joannelkoong@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260729192737.3190206-1-joannelkoong@gmail.com> References: <20260729192737.3190206-1-joannelkoong@gmail.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With all in-tree filesystems implementing ->iomap_next(), drop the ->iomap_begin()/->iomap_end() path. Reviewed-by: Fengnan Chang Reviewed-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Joanne Koong --- fs/iomap/iter.c | 6 +----- include/linux/iomap.h | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fs/iomap/iter.c b/fs/iomap/iter.c index c445a38b6285..e8a988107530 100644 --- a/fs/iomap/iter.c +++ b/fs/iomap/iter.c @@ -118,11 +118,7 @@ int iomap_iter(struct iomap_iter *iter, const struct iomap_ops *ops) trace_iomap_iter(iter, ops, _RET_IP_); - if (ops->iomap_next) - ret = ops->iomap_next(iter, &iter->iomap, &iter->srcmap); - else - ret = iomap_iter_next(iter, &iter->iomap, &iter->srcmap, - ops->iomap_begin, ops->iomap_end); + ret = ops->iomap_next(iter, &iter->iomap, &iter->srcmap); iter->status = 0; if (ret > 0) diff --git a/include/linux/iomap.h b/include/linux/iomap.h index d203d9fe0f89..0bc1beb47a09 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -195,7 +195,7 @@ struct iomap_write_ops { }; /* - * Flags for iomap_begin / iomap_end. No flag implies a read. + * Flags for iomap_next. No flag implies a read. */ #define IOMAP_WRITE (1 << 0) /* writing, must allocate blocks */ #define IOMAP_ZERO (1 << 1) /* zeroing operation, may skip holes */ @@ -240,8 +240,6 @@ typedef int (*iomap_iter_next_fn)(const struct iomap_iter *iter, struct iomap *iomap, struct iomap *srcmap); struct iomap_ops { - iomap_iter_begin_fn iomap_begin; - iomap_iter_end_fn iomap_end; iomap_iter_next_fn iomap_next; }; @@ -256,7 +254,7 @@ struct iomap_ops { * incremental iter advance. * @status: Status of the most recent iteration. Zero on success or a negative * errno on error. - * @flags: Zero or more of the iomap_begin flags above. + * @flags: Zero or more of the iomap_next flags above. * @iomap: Map describing the I/O iteration * @srcmap: Source map for COW operations */ -- 2.52.0