Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3104554rwe; Sun, 16 Apr 2023 11:48:26 -0700 (PDT) X-Google-Smtp-Source: AKy350YI9rZcaHaax+CjZIrxQ03SxBBYrsWkkTbyvDaxa42fPsLBG0yUqNybpSEcfMbnDMyUjt6X X-Received: by 2002:a05:6a00:180e:b0:637:aea0:b23d with SMTP id y14-20020a056a00180e00b00637aea0b23dmr18664151pfa.10.1681670905976; Sun, 16 Apr 2023 11:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681670905; cv=none; d=google.com; s=arc-20160816; b=a+yACXf7PMLL3G/Wu/GqaZ8sfZbcigRCWl08t4my2kvLlhrChdyPVD6Mw2uYVyhSLB o4T75qM5n0JAE1A/GhnyuOMQIwVxFu57+Sct+yDST1zZTLpVfZ+zGAlcJHGAVzuXhSc2 LMdS2FFxndghzzOKAziWUZ+vMyPqvPszgqRIRrEWdSP3Y1ax+Z8VCBO7JfqSjohOd5RB h4GuCOhlEr8fLS4WgEGB8+2IHTIfjKsociq+5p8VFt+gHTOCdx/fgCjKnX3sZqNd+zop HibNorpKCa0YK25Rs2Hl4KcSche35wwu7JhldgZy5lv0kCrnfD4hW3E3sChTyxJMQUSN Suew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rGh0bl/iiJSxy7fHnW3+jIlzjVgyckmk8BLBlFYvTkY=; b=Y7cSMmp0NZ+e/h5G8JmDgFB+hFjoQMTyxjzGbkTyR3Dc58+2Crce4QYyp+ISB3Fe0B m7PRLJOJSKBgCaqCywOdwwNqkkOLfnG/YXlaGqJuH7Fq0XPwEXugMIFJaTQMKrpCU0kz IT8mDpfqM+kukijDQS/E7+/RpvH3M2kU7sTCZn7FvpohRhQTxMJu2gWMn082TVZygTO1 SSyES2YM78/VzRUo86ojxAsboVJIrHNo8cQIonYDocaXVg8+bYEhYAQtjhehJwr96gU6 /D2Go+O7zniuvs58AZuBbsT+i+imGdfWbnOieD8T4UeaFQNNZthqaQzN1bjYMts89ezU Jw/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pS5+8rLi; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020aa794b3000000b0063b7bbeb33esi4253704pfl.137.2023.04.16.11.48.11; Sun, 16 Apr 2023 11:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pS5+8rLi; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjDPScI (ORCPT + 99 others); Sun, 16 Apr 2023 14:32:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjDPScI (ORCPT ); Sun, 16 Apr 2023 14:32:08 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3666B1FE3 for ; Sun, 16 Apr 2023 11:32:07 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-517baf1bc87so1664649a12.0 for ; Sun, 16 Apr 2023 11:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681669926; x=1684261926; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rGh0bl/iiJSxy7fHnW3+jIlzjVgyckmk8BLBlFYvTkY=; b=pS5+8rLiWyKIMN+luqPLxN8jBBhaf4UeVDWqYONloKt+a7mcY9ZET6EK/7+kaK7yxW T1P/04l9RqzqQeYBZJCc7f1Iw/s02D9vSCiIope5Os6kKuTo3MpAEJ2579CKGfErb/wV StNN/GRY0VcgJRPjAPyOh+qo//ZctzHWARYK6IOJbDfMf5mPgiAxWjbjknaOLTpCjDYm yuO1AgP5qx2KqxK3n4/CoYIzsXsaG+CISCTz4vvbllfiGuLN/DtrfNtTl8GFXGdVUboV KaEe0t3REszhN6HcjaSOgtcwZSPNHHIfgEAQF9sO21QLw0qy9e9Mtqo2Qdy1gtA/8XyW 8Dbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681669926; x=1684261926; 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=rGh0bl/iiJSxy7fHnW3+jIlzjVgyckmk8BLBlFYvTkY=; b=U9HTLZwsPftw0lPB5/3o9JltlJiefn8yv9uvWDe7k7VKITd8dCAz4IYHudw2zXr6GX 2kc3C/4R4Dr+6PBLTUKHMz9ZeD8jp+052SAQWluV6ToCnMqpbAiAaqDcvi/+j1fyXK5K fk+/gSpxmujyktROZ1eKeY53evkkvRGwd1fEkU6CNRnSu9yiRx7+z9Pr42DH9rVv1Oge 8nUVyO6/nXhb0dzt5mVUx8iBHapdF0U1tTtwr7ssKEEMCllehWlm4kYx1p6gDqyBO/Cg jbnfgJo7GAC376n0G48cNMju/lbtHoxb5hc+MvIVUAIAD9qf3Bvh1UQwOUQ1dt3oJnxD UvbA== X-Gm-Message-State: AAQBX9co2ZW/SVrAwy5hiG4PJKS0VjvdFd1Xgrfe4Y5IfI+r7fjw45yN 8ig+ouy00Lt0pNedIfb1ZeY= X-Received: by 2002:a05:6a00:148d:b0:63b:64a6:571 with SMTP id v13-20020a056a00148d00b0063b64a60571mr14612532pfu.29.1681669926460; Sun, 16 Apr 2023 11:32:06 -0700 (PDT) Received: from rh-tp.. ([2406:7400:63:2dd2:8818:e6e1:3a73:368c]) by smtp.gmail.com with ESMTPSA id y10-20020aa7804a000000b00639fc7124c2sm6397480pfm.148.2023.04.16.11.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 11:32:06 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: Matthew Wilcox Cc: linux-ext4@vger.kernel.org, Jan Kara , Ojaswin Mujoo , Disha Goel , "Ritesh Harjani (IBM)" Subject: [RFCv1 0/4] ext4: misc left over folio changes Date: Mon, 17 Apr 2023 00:01:49 +0530 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hello Matthew, Could you please review this series. I found this during code review and I think these can/should go in as well along with other folio changes queued up for 6.4 (after some testing). Also had a query w.r.t your change [1]. I couldn't understand this change diff from [1]. Given if we are making the conversion to folio, then shouldn't we do len = size - folio_pos(pos), instead of len = size & ~PAGE_MASK Could you please tell if the current change in [1] is kept deliberately? At other places you did make len as size - folio_pos(pos) which removes the PAGE_SIZE assumption. -static int mpage_submit_page(struct mpage_da_data *mpd, struct page *page) +static int mpage_submit_folio(struct mpage_da_data *mpd, struct folio *folio) { - int len; + size_t len; <...> size = i_size_read(mpd->inode); - if (page->index == size >> PAGE_SHIFT && + len = folio_size(folio); + if (folio_pos(folio) + len > size && !ext4_verity_in_progress(mpd->inode)) len = size & ~PAGE_MASK; - else - len = PAGE_SIZE; - err = ext4_bio_write_page(&mpd->io_submit, page, len); + err = ext4_bio_write_page(&mpd->io_submit, &folio->page, len); if (!err) mpd->wbc->nr_to_write--; [1]: https://lore.kernel.org/linux-ext4/20230324180129.1220691-7-willy@infradead.org/ Note: I haven't yet tested this series completely. I mainly first wanted to get some initial inputs from Matthew on this one before I do any serious fstests testing of the changes. If the changes are in the right direction, I shall do some testing before sending next revision. Ritesh Harjani (IBM) (4): ext4: kill unused function ext4_journalled_write_inline_data ext4: Change remaining tracepoints to use folio ext4: Make mpage_journal_page_buffers use folio ext4: Make ext4_write_inline_data_end() use folio fs/ext4/ext4.h | 10 ++----- fs/ext4/inline.c | 27 +----------------- fs/ext4/inode.c | 57 +++++++++++++++++++------------------ include/trace/events/ext4.h | 26 ++++++++--------- 4 files changed, 46 insertions(+), 74 deletions(-) -- 2.39.2