From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DA9AC2D0E5 for ; Thu, 26 Mar 2020 14:58:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3063E2076A for ; Thu, 26 Mar 2020 14:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727793AbgCZO6B (ORCPT ); Thu, 26 Mar 2020 10:58:01 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:60130 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726318AbgCZO6B (ORCPT ); Thu, 26 Mar 2020 10:58:01 -0400 Received: from callcc.thunk.org (pool-72-93-95-157.bstnma.fios.verizon.net [72.93.95.157]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 02QEvvIt002679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Mar 2020 10:57:58 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 62F7B420EBA; Thu, 26 Mar 2020 10:57:57 -0400 (EDT) Date: Thu, 26 Mar 2020 10:57:57 -0400 From: "Theodore Y. Ts'o" To: Eric Whitney Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH] ext4: disable dioread_nolock whenever delayed allocation is disabled Message-ID: <20200326145757.GT53396@mit.edu> References: <20200319150028.24592-1-enwlinux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200319150028.24592-1-enwlinux@gmail.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Mar 19, 2020 at 11:00:28AM -0400, Eric Whitney wrote: > The patch "ext4: make dioread_nolock the default" (244adf6426ee) causes > generic/422 to fail when run in kvm-xfstests' ext3conv test case. This > applies both the dioread_nolock and nodelalloc mount options, a > combination not previously tested by kvm-xfstests. The failure occurs > because the dioread_nolock code path splits a previously fallocated > multiblock extent into a series of single block extents when overwriting > a portion of that extent. That causes allocation of an extent tree leaf > node and a reshuffling of extents. Once writeback is completed, the > individual extents are recombined into a single extent, the extent is > moved again, and the leaf node is deleted. The difference in block > utilization before and after writeback due to the leaf node triggers the > failure. > > The original reason for this behavior was to avoid ENOSPC when handling > I/O completions during writeback in the dioread_nolock code paths when > delayed allocation is disabled. It may no longer be necessary, because > code was added in the past to reserve extra space to solve this problem > when delayed allocation is enabled, and this code may also apply when > delayed allocation is disabled. Until this can be verified, don't use > the dioread_nolock code paths if delayed allocation is disabled. > > Signed-off-by: Eric Whitney Applied, thanks. - Ted