Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp110140rwd; Mon, 12 Jun 2023 10:45:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76xaG5vlfkWBrv7EUIg/oSxAyWLWhAtiTDcYR9K6cOqKLnPn36wl+6/YOqnEngP0/2UV+m X-Received: by 2002:a17:906:ee87:b0:961:a67:296 with SMTP id wt7-20020a170906ee8700b009610a670296mr8522698ejb.11.1686591941858; Mon, 12 Jun 2023 10:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686591941; cv=none; d=google.com; s=arc-20160816; b=pdDE6gH7C9PfQuZlsML2OvqxtGvuKtNnDiXlTzeJUtRSrGeQhs6jAvNg0c0Y6uS/24 sKIQxGwZ4V8wfxofw+BdY3TePIrRO1j+AlumnjEymVvmYdzDGYKjl0Ti6bgWZCetQluF vEFahJ59yIbgwTuid9DNmApr1hxOGOoqNy4GozO+7jLl+4+7qnJPlBo1G46nccpbYZc2 VT76jiONrN+7hFWRdtQYbNQF3o2CaPY/y8hm8y9/2N00X3RbXUZl2xhGyVeU6oC8yoNj oxVXI9uaHP7mYmZM2nEtdbq+A0XyHAKMx7NV01nrivK54h2HKvA5CHcAMzmQUczYKP4X Untw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YkJgq+xZxuWnpaPqTqevVGw+VbQ7xAInoSR0rdPbq9M=; b=RQm1PIVi4WqXEOy+XBvzNaVxe2nXwU0BbPy56Oi6BgOFdk+V62MzP4uLRTyOUP5fth a36jdd6h8yAmc44Qx3yj4v8UdnmhSiSTeF878JxmJqOFYEl4dXUm3FwYXqceRCSuTE3b W4W8j0iV2q6965GnuVDsEWBl/PVsZlO0W6cTV2Dbaz+g2NPamFVQ07UQzethd/Z3kMc9 5EYjFNaSZDIxY7ovaDlFxuo5ZH/9NwazHxRwE9vnuWPU9dZxxkFzfDwjtKF3FizZEhxu MHh+6bOC5pQom0FxwWEHl/nATqmwVOeD74xQGOcUmdDCRjGtXYdl3W9I+9cU4/uIUZMP jUzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SpXYDrpl; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m11-20020a1709062b8b00b00965df5fedeesi2591086ejg.672.2023.06.12.10.45.10; Mon, 12 Jun 2023 10:45:41 -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=@infradead.org header.s=casper.20170209 header.b=SpXYDrpl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbjFLRnM (ORCPT + 99 others); Mon, 12 Jun 2023 13:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237014AbjFLRnJ (ORCPT ); Mon, 12 Jun 2023 13:43:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40D7EA1; Mon, 12 Jun 2023 10:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YkJgq+xZxuWnpaPqTqevVGw+VbQ7xAInoSR0rdPbq9M=; b=SpXYDrplkt01uzFSPTkFXaSI0o /wtEgAKa1nSvr49S/q+j09isdTMsV1rZ0ktITh3FPJeccQ1380KvL/hJkvjRK8p7sDiW7Qagrnrc3 lr5rlkervXJ2G/Frsg+ZAPf0q151QffSD9ifNnK5pd7zyLj7prwkxb8N+0VhN9nE7S//HsEIA5Hvr DKX/LWd2JbwYDSXg2BrobcDva2I16HmJK53HzAl6HJ3wnEz4ei+mR/nAyK9OCqhiNTycA0+J2UvDU nzSt1YUZyoh/iaPAZt3+fL75wGFL3+xiNmW5X+R+I9OSk7q75NsLDLygzOv5CtVhTTzD7jaJN20pk 9pN098mw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1q8lZJ-002sui-PH; Mon, 12 Jun 2023 17:43:05 +0000 Date: Mon, 12 Jun 2023 18:43:05 +0100 From: Matthew Wilcox To: Ritesh Harjani Cc: Theodore Ts'o , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, Ojaswin Mujoo , Disha Goel , Jan Kara Subject: Re: [RFCv2 2/5] ext4: Remove PAGE_SIZE assumption of folio from mpage_submit_folio Message-ID: References: <87a5x6hy8l.fsf@doe.com> <87wn08pp7y.fsf@doe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wn08pp7y.fsf@doe.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 On Mon, Jun 12, 2023 at 10:55:37PM +0530, Ritesh Harjani wrote: > It is easily recreatable if we have one thread doing buffered-io + > sync and other thread trying to truncate down inode->i_size. > Kernel panic maybe is happening only with -O encrypt mkfs option + > -o test_dummy_encryption mount option, but the size - folio_pos(folio) > is definitely wrong because inode->i_size is not protected in writeback path. Did you not see the email I sent right before you sent your previous email?