Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp292521pxj; Fri, 14 May 2021 03:41:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSf4hhGZr8Gputey+YY6cz4o4uZJzsuHh/NqfRcHP1EVK+WPIhlpdA9KXsrnMCRNosKvYN X-Received: by 2002:a05:6402:1158:: with SMTP id g24mr19565064edw.134.1620988864580; Fri, 14 May 2021 03:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620988864; cv=none; d=google.com; s=arc-20160816; b=mN/gvFrb7vthXZl+ODQDvYrLYr7Rz4zK+5R9/DmGa4IB1Eo2Yp8J09b7TAIhfE1iDW Noig9WA6RctQg8+Bvx+5Ozk0n7xRBJpm1ASN9RejFDXRHgB1ZF763bT+lFeZnaGNoEVQ ky8paE0zTwS9T+vZ/DSLGNWoetXj3s3qzgRfjkb0hGXxHVGvDzXmuXpl2vFYZHWUUqRy mcp3anfRdGo5Poh0rBXCIo3k1pU+edwBMMvgVtjx6IDaCXlIqXUO217jYCsw4y7l58WV TQrgC+xITesMrlj1hwXpLVHpD9hsLDaj7uLlK6HAgK3FgsZ9IPdum/60UlcsHbQF/UzR yoKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=0v2WTfoTYYFvI5g3TxNROF/jrQek1EySSdju9KXEFoA=; b=jZNMYDjEHjQHou0PQ+LKTAj5OFokOAyjNOYE1iJ3c5p104YsZKtRMJVibgjZeO+/1k tqEV/+Ac0ybGoSACfV2gkZMOX9dnno9yKjgf+FQ0oUe7a66quGNUe1sl2f1RfzulST+v KNzu+9StOCy3LDBqUKOzPVy60NU1Cy0rLEAISUiitv82BMMoi8Nd8+V9G5MdavmafpgI BwxsWZIHmuQ53WV//zTZDQLeNf5uQ7xVy/DrtKosCi/FuMt6+vCGE1u2HZTD0+DgtCUu p8RmkTVGthJ3tgzegjy6QNhDeQt3Xd43KJZlP9RWR8UPvY2g0CtEbfTuyclBaZib9Uwk 5rag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PG6dlv+k; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si6533693ejx.748.2021.05.14.03.40.41; Fri, 14 May 2021 03:41:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PG6dlv+k; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232269AbhENJwM (ORCPT + 99 others); Fri, 14 May 2021 05:52:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36676 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232268AbhENJwK (ORCPT ); Fri, 14 May 2021 05:52:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620985858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0v2WTfoTYYFvI5g3TxNROF/jrQek1EySSdju9KXEFoA=; b=PG6dlv+kcGF4BYU8kCgNxFC/2VLAWWk9jiKXDFgiGHIYZkZcr2b16biC02wSKHQQbQ5kea rSsgxnNh9EagftB/KRZE8DACjhRGdbc9NXqetcgJ4C2RG2+dr/9R82cdw4NruUlyEZs2Ow M0sNqoBQqth03LeFJPSEe/kvfwSy7n8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-495-i_GH1KlpNd-xW5uWh3gvOQ-1; Fri, 14 May 2021 05:50:57 -0400 X-MC-Unique: i_GH1KlpNd-xW5uWh3gvOQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC9C38042A9; Fri, 14 May 2021 09:50:54 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B2C986788A; Fri, 14 May 2021 09:50:41 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 14E9of0U023228; Fri, 14 May 2021 05:50:41 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 14E9oebu023224; Fri, 14 May 2021 05:50:40 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 14 May 2021 05:50:40 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Milan Broz , Bart Van Assche , "Theodore Ts'o" , Changheun Lee cc: alex_y_xu@yahoo.ca, axboe@kernel.dk, bgoncalv@redhat.com, dm-crypt@saout.de, hch@lst.de, jaegeuk@kernel.org, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, ming.lei@redhat.com, yi.zhang@redhat.com, dm-devel@redhat.com Subject: Re: regression: data corruption with ext4 on LUKS on nvme with torvalds master In-Reply-To: Message-ID: References: <0e7b0b6e-e78c-f22d-af8d-d7bdcb597bea@gmail.com> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 5/13/21 7:15 AM, Theodore Ts'o wrote: > On Thu, May 13, 2021 at 06:42:22PM +0900, Changheun Lee wrote: >> >> Problem might be casued by exhausting of memory. And memory exhausting >> would be caused by setting of small bio_max_size. Actually it was not >> reproduced in my VM environment at first. But, I reproduced same problem >> when bio_max_size is set with 8KB forced. Too many bio allocation would >> be occurred by setting of 8KB bio_max_size. > > Hmm... I'm not sure how to align your diagnosis with the symptoms in > the bug report. If we were limited by memory, that should slow down > the I/O, but we should still be making forward progress, no? And a > forced reboot should not result in data corruption, unless maybe there If you use data=writeback, data writes and journal writes are not synchronized. So, it may be possible that a journal write made it through, a data write didn't - the end result would be a file containing random contents that was on the disk. Changheun - do you use data=writeback? Did the corruption happen only in newly created files? Or did it corrupt existing files? > was a missing check for a failed memory allocation, causing data to be > written to the wrong location, a missing error check leading to the > block or file system layer not noticing that a write had failed > (although again, memory exhaustion should not lead to failed writes; > it might slow us down, sure, but if writes are being failed, something > is Badly Going Wrong --- things like writes to the swap device or > writes by the page cleaner must succeed, or else Things Would Go Bad > In A Hurry). Mikulas