Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1112315lqd; Thu, 25 Apr 2024 06:29:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJyRH9horv/Mxi7HYTjA97msvbqYFWVWiewPscaj8fyhY77/9tudSg2HvKdI2yR4+9Prs5j2MvY2omMhb5qSZ/Q8p2vGz96i9NxW21Sg== X-Google-Smtp-Source: AGHT+IGJX3h+vfeMbJIoI1ROTtPtAofKmVtkk3aawZugc2CJ1f3RbXRZl8rfQ9NOIOgnVvMewihz X-Received: by 2002:a05:6e02:138d:b0:36a:352c:44d6 with SMTP id d13-20020a056e02138d00b0036a352c44d6mr5658747ilo.13.1714051789620; Thu, 25 Apr 2024 06:29:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714051789; cv=pass; d=google.com; s=arc-20160816; b=dP1Swf8MYU651u0nZwS1N+w4zepeiJFWmd1JypbIW4ShmCiulmkkEByZn1k6GjfS2h WM20p4ZbSk75zQ7PdOdPPPSmXgG6U+vi8rDuqpwhy/1mkDZ+l00K25gX3QOahaVcUwuD 2PnCRcj4LKyCdCAjbDJ8pqCNMGuQogg/5mHLdX1QgbN0FVPyzE4OFkIBGFDBRKmCewcZ fvtBUHiNxffNepkeRXzJBvCqmmZOYci/RKk7qua4JdGlxRc91zyx8j1envtvz+A4oX6f gI7gX61k5XPyzJ0itVHC3lZoATjtwc3m97Q0j8Ns+6ZDPd2ps3H/xVBBCEuAy6GRfCRc /P1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=UCgihl5wDkiRpuPvuLFf7PaBJvQfp9jeIXSIObyAuh8=; fh=7C+qi+dOufHzoR58xTqbye+mO102h4e0k2gZr2bItzo=; b=cmGb+BOdE8fqhDK6hdJyuV04zBK4p/YMj0v2d4nC0vlgS14mXkA8mxntCstUyFaL4X TcvAs7S4xEuznSdgV/Estyedrsfy5PFLb5IElVLkGwVdRb/74SIhn5E54jsdQxSyqm+x ypjD30nsXX4MUhxcPhb83ty3JuOZpoDwUFMGtIrwDdFlz5MvdXLcxiRKSkAlD9wcoZor wvjt1xtoiA3F9rDZljmYYFkK7cujmmY1Xhq2ZpA66hnk0uW4rC4e1t4tTsV+SZfAmXIh IQMiu1PzwxDwKr9pdE7Z05tY2ji4J7naVGUBTB4R7g7SUQaSLWpZ3maNC+gYictSwZTl U+8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iVzfIR7j; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-ext4+bounces-2180-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g20-20020a631114000000b005f751c16a59si13586363pgl.657.2024.04.25.06.29.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 06:29:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2180-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iVzfIR7j; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-ext4+bounces-2180-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E21DB284620 for ; Thu, 25 Apr 2024 13:29:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FC5B149DEF; Thu, 25 Apr 2024 13:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iVzfIR7j" X-Original-To: linux-ext4@vger.kernel.org Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 654E8149C5E; Thu, 25 Apr 2024 13:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714051747; cv=none; b=dxE0LItxz0XS0mZl02e2NPR6F6EbVOV8GqYv97lFOW3OhD1v/P7FUmpNH2JIK0b+9Lr0x9euYPDrUqZFp9INXvh52O275X6vDNw5CPzpFj4zad4629eqLqKDljQT2CXM4GTuIcS9OL2bwOC2Z2bOHu0WrCZmOb+ZrQSMboad3bE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714051747; c=relaxed/simple; bh=uiHICPxxlQncNpNDMTYxWAUZ0mlWGqTwB6pyor2Rmyo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h92WfA0xq9LT7M2diX6CMvOml34hNlzIo8tQcRK/Q0QLjjjV2Qs9VfbjmvHv/jhVBxre4Tnp3pYcoRYbA5z7Y33O69ORdHl6GodWiiwECZV07p3HivvwwxyxJv7EslqMIt1mMGLr/qizbn0ODQodbd48wfcxGjekfdS8qjjE8ac= 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=iVzfIR7j; arc=none smtp.client-ip=209.85.210.175 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 Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6ed01c63657so940995b3a.2; Thu, 25 Apr 2024 06:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714051745; x=1714656545; 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=UCgihl5wDkiRpuPvuLFf7PaBJvQfp9jeIXSIObyAuh8=; b=iVzfIR7j4Ef29CQolddtpjXKLursKmPsJPboy6yquJs8yO8+ibRhSMFKQ98KNE8P1c G5QLOcHici46Jgr8RzQscU3xE/n3pv4KmInHa0ItCMu3sMMi5Wo75aHMit82dnXr12ch 9zD5V4a/w/43hpyigmprUUsqOlJqBxjDrczlVhrsPLj0AU6olWnjUc4wmdUSAF6jIVB5 lluU3gmclsfDlw2rUyTKorcXygQhOPq3ntbzReDBZPai7QIW+jTHQ9Stlu3uKcH2Lzp2 z+x81x/r++5bv4BGpvSrc/Mgb/5pn/755908eg+4O6lPc2DxzZjGaHugkSqUsjqooY/r D6qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714051745; x=1714656545; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UCgihl5wDkiRpuPvuLFf7PaBJvQfp9jeIXSIObyAuh8=; b=heM92IXjJpzqQP90ExnQl8/jRYV0G0JQwBDoxTxhSWsvWPr2nhF/suOL/uVyrMCJ8J dIjVbREOTPgL/HPp3Y7QetqWdzl1MX5Kc7iVe6UPvtVyPP34R+/Z+1TRaTl8R7EPEurK 4QzpOSifIiZOk+0lpfJHxGjh4mpUGBvo3MUUyiiXJ78cvRDDg4XDLiRMMsclM1K0tafU HlbLM/RSH1xf06DzxAbDunxYc2KGfgExA889Y9QMdAXnBV0+Itaf0YPv7vVor9r82UPQ ih2ykQx69f1MvEwc/AghEshCofSn2418yGO02mMkS+ddqGPml51kOg8AxNbgBa/08cRB Xz7w== X-Forwarded-Encrypted: i=1; AJvYcCXGzHv7PdPLFgh1Q3ZsSbrixiG7eKeb/PgmML+ks71zt+1gCBLvOY/KryhppQaULFVlKKDMWgJiNO5Y52AGJn3OiY+t9b9XDTA4 X-Gm-Message-State: AOJu0YxaKJ3jzEA94ToTE4/UVr16rJuT0rWtKoJXI1bBCWByWliUfM1D yuWkeSQRe+JP9yPAEc7P4BQf0bTy1Ykf6ILr9kAaNlaBc6KmEDJYuIGi+JYe X-Received: by 2002:a05:6a00:4b48:b0:6ea:7981:d40b with SMTP id kr8-20020a056a004b4800b006ea7981d40bmr5759153pfb.16.1714051744711; Thu, 25 Apr 2024 06:29:04 -0700 (PDT) Received: from dw-tp.in.ibm.com ([129.41.58.7]) by smtp.gmail.com with ESMTPSA id s15-20020a62e70f000000b006f260fb17e5sm9764518pfh.141.2024.04.25.06.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 06:29:03 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, Matthew Wilcox , "Darrick J . Wong" , Ojaswin Mujoo , Ritesh Harjani , Jan Kara Subject: [RFCv3 0/7] ext2 iomap changes and iomap improvements Date: Thu, 25 Apr 2024 18:58:44 +0530 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello all, Here is a RFCv3 which implements ext2 iomap changes and I have also included some iomap improvements along with implementing BH_Boundary fix within iomap. Posting this more as an update (before conference/call) to the current work since it has survived few runs of xfstests - Patch 1-4 implements ext2 regular file buffered I/O to use iomap APIs. Patch 5 & 6 are iomap improvements which me and Ojaswin noticed during code reviews. Patch 7 optimizes the data access patterns for filesystems with indirect block mappings. Thanks to Matthew Wilcox for pointing the problem and providing a rough solution to BH_Boundary problem within iomap (which this patch is based on). Please note that I would still like to work on following aspects before thinking of merging any of these - 1. Look into how dir handling for ext2 should be handled. Since ext2 uses page cache for that, can we directly use iomap? Do we need any other iomap ops for implementing dir handling? Basically either a PoC or some theoretical understanding of how we should handle dir for ext2. 2. Integrate Patch 4 within Patch-2. Kept it separate for review. 3. Test patch 5 & 6 separately before thinking of getting those merged. The changes look ok to me and I would like those to be reviewed. But I hope to get more testing done on those patches individually, because those are not dependent on this series. 4. Patch 7 is an early RFC to get an idea on whether it is taking the right direction or not. If this looks ok, then I can polish the series, carefully review at any missed corner cases (hopefully I have covered all), work on other points in this todo list and do more testing before posting another version. 5. Write few fstests to excercise the paths more for the overall series. Ritesh Harjani (IBM) (7): ext2: Remove comment related to journal handle ext2: Convert ext2 regular file buffered I/O to use iomap ext2: Enable large folio support ext2: Implement seq counter for validating cached iomap iomap: Fix iomap_adjust_read_range for plen calculation iomap: Optimize iomap_read_folio iomap: Optimize data access patterns for filesystems with indirect mappings fs/ext2/balloc.c | 1 + fs/ext2/ext2.h | 6 ++ fs/ext2/file.c | 20 +++++- fs/ext2/inode.c | 126 +++++++++++++++++++++++++++++++++++--- fs/ext2/super.c | 2 +- fs/iomap/buffered-io.c | 135 ++++++++++++++++++++++++++++++++--------- 6 files changed, 248 insertions(+), 42 deletions(-) -- 2.44.0