Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp557301pxf; Wed, 17 Mar 2021 10:25:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz45BD/fa1qppZlBPNhTnk2VyefBZ1HCD9d1eQoIfVFNHil+68M7kc0Ay0KFRshbqj2NUvx X-Received: by 2002:aa7:c403:: with SMTP id j3mr43411957edq.137.1616001927112; Wed, 17 Mar 2021 10:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001927; cv=none; d=google.com; s=arc-20160816; b=hg5eLcXaPLaY1Q4Xi1G0r8CS5vgQSAEUSQDmqR1V7MiKQHk6trsNwyPB9l0kMzuK6Y 33KXqUCVDsJIiBNPpU1U4pCUuRhV7LN7UxllS5NA65aTE3TEl/TTipUBTvSB8OIKa0hQ 7Ol+5Cq+JqLIi8vhqn/q77AIoC/sZlSk0a/wcgUEvE+MjqK+nos7rD7KzcLX+Uk81qL8 nHzFDHa5mpa96OTSbstgmevGDpXn27RsPtWNeyIYnzP7x0oY3go9I4218aqefx9ADw/a +R59Lo9yQ3JmYr3xkVZmO+AtotR2Ng9Gx7OEzoafpwe5Y03W34Lwb3J33WX+LsisjPdf GVJg== 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; bh=ZIA1O/arIWH9WMYFQfeQoyPILj+gNDbhXNbiN/rGHvU=; b=0hakULxZsCWQyABAm+YhzyfVsk6y5a9YV/IXmImGu7jyFUV2nWaYZEgANdqLJVkcZP qACPrDtVCCpHuPKMk+PnogzVNUekF1+SL4PYoP0QSFHle26UHFe1LVB2nwTvv8mg4dpI PmI/o8l73oFmC7ZQ3xJg6efx0szdOnCiCGk22cOS2SlSL6kaaAE9AiLIh30kMx7EAOqm W9781HCXwEURFvoOSk1DwyJOxKxFdZrtZRQ8uGlm3VaSP4D7na5WYQUXmr+oQynUV8YR Ao65gFmGAHY4QxsxC36eMUVTCwuNhxUC+7GDrempUS9Gg8U62iiULKK5MaUkU2m00W5f F4ow== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bv9si6871801ejb.377.2021.03.17.10.25.01; Wed, 17 Mar 2021 10:25:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbhCQRGP (ORCPT + 99 others); Wed, 17 Mar 2021 13:06:15 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:44665 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229591AbhCQRGE (ORCPT ); Wed, 17 Mar 2021 13:06:04 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 12HH5xxj031661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Mar 2021 13:06:00 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id A6E9F15C39C8; Wed, 17 Mar 2021 13:05:59 -0400 (EDT) Date: Wed, 17 Mar 2021 13:05:59 -0400 From: "Theodore Ts'o" To: Shashidhar Patil Cc: linux-ext4@vger.kernel.org Subject: Re: jbd2 task hung in jbd2_journal_commit_transaction Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Mar 17, 2021 at 08:30:56PM +0530, Shashidhar Patil wrote: > Hi Theodore, > Thank you for the details about the journalling layer and > insight into the block device layer. > I think Good luck might have clicked. The swap file in our case is > attached to a loop block device before enabling swap using swapon. > Since loop driver processes its IO requests by calling > vfs_iter_write() the write requests re-enter the ext4 > filesystem/journalling code. > Is that right ? There seems to be a possibility of cylic dependency. If that hypothesis is correct, you should see an example of that in one of your stack traces; do you? The loop device creates struct file where the file is opened using O_DIRECT. In the O_DIRECT code path, assuming the file was fully allocate and initialized, it shouldn't involve starting a journal handle. That being said, why are you using a loop device for a swap device at all? Using a swap file directly is going to be much more efficient, and decrease the stack depth and CPU cycles needed to do a swap out if nothing else. If you can reliably reproduce the problem, what happens if you use a swap file directly and cut out the loop device as a swap device? Does it make the problem go away? - Ted