Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6164519rwr; Mon, 1 May 2023 18:02:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6I/WerJOIHIUM/DStY6kZmRRP5t8XcqfcYxDrebuS1SlUxc5bk1vCkjQLhcESU6rQipTfv X-Received: by 2002:a05:6a20:a10d:b0:f0:d50c:4ac5 with SMTP id q13-20020a056a20a10d00b000f0d50c4ac5mr20095230pzk.51.1682989356470; Mon, 01 May 2023 18:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682989356; cv=none; d=google.com; s=arc-20160816; b=nst8PFD+l13y7KyupG89np8O9oomxXlm9wbmk005Ee+I5EsX8TayazAZwYiMLCOs0q YfxoyHzuKblEXuOkZHCu1VKehNTLQz8A1ncIo6QIMeTRaIxs0xVNeVpOHERPU0qqF1hh P0kRPltI3In5gnfyekJLqvEj758InZ+ZdN+M43LQpjRXUgNJYlDGEZZI6iW3turTVsQ1 t0cGAfu4Hm6/JRajjs76/1iP7g6herGTqw5Caoa5GMlE3hD8H9i0iyIcaGj41ojm6Vpi +cdYPVk42V41oIo7vDOSw/cYzXq0h07pMpzC2AOkTtx8ING1p7fm0mANRnZ93FrcnIkO wbLQ== 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=ee9kbmLrY2Y7aS+ZkEL+0QK6onncfphaK4NZ0iubdi0=; b=IZVM8759Kc+4lzrhhwTo1k9KyjQwlqKbhXd84+PBwiR94PjSSw1OaFzD42vuaV/1m7 YYc9eCYAQ0OAHczK7paNug8kkQ49/Mgtzzbjm3i32LJru+V8dOiiwamwXw+CVqPOSM6q klF2DtlKpNiLAGzybpRo4f3k2vKD9TxUT9lrqj4iO04LRKrEcYBbkVUdWkbv9J7mjHtP ZmEjq6Cgt1NSk4iVvyIfClXL2xQ2h4rKZ19AnILPzXcZhy+am6VgdSWs0gVnWe6UqKgP RO5ybpBe/rOEpXd99d232B6lNX2zhlfzQLkFr2mgk+He0xgYEf3RPm8TOMVB9KD/7vgI HGfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MaKaBDNE; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a656446000000b0052c4450e9basi211210pgv.780.2023.05.01.18.02.18; Mon, 01 May 2023 18:02:36 -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=@redhat.com header.s=mimecast20190719 header.b=MaKaBDNE; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232233AbjEBA6b (ORCPT + 99 others); Mon, 1 May 2023 20:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjEBA6a (ORCPT ); Mon, 1 May 2023 20:58:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4009F30EA for ; Mon, 1 May 2023 17:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682989069; 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=ee9kbmLrY2Y7aS+ZkEL+0QK6onncfphaK4NZ0iubdi0=; b=MaKaBDNEY02UzHg5aOcbeyKbjoeNNZeFR/TWFqdZsArTx0MOT4fsNgv5nxx2hxswTn0Nax y1wuic1tnDPEKUHCv3SzIDgBh4EYdTe/cjA5nt5dKuQMGSiR6S4YibecorEGEvJqB9Nl0V rDcULQFLghZUAzotcxPF1jUq6GbwA3Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-s2Q55i0OMv6b0B-q6gLVuQ-1; Mon, 01 May 2023 20:57:46 -0400 X-MC-Unique: s2Q55i0OMv6b0B-q6gLVuQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58E6E101A531; Tue, 2 May 2023 00:57:45 +0000 (UTC) Received: from ovpn-8-16.pek2.redhat.com (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9082400F4D; Tue, 2 May 2023 00:57:37 +0000 (UTC) Date: Tue, 2 May 2023 08:57:32 +0800 From: Ming Lei To: Christoph Hellwig Cc: Theodore Ts'o , Baokun Li , Matthew Wilcox , linux-ext4@vger.kernel.org, Andreas Dilger , linux-block@vger.kernel.org, Andrew Morton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Dave Chinner , Eric Sandeen , Zhang Yi , yangerkun , ming.lei@redhat.com Subject: Re: [ext4 io hang] buffered write io hang in balance_dirty_pages Message-ID: References: <663b10eb-4b61-c445-c07c-90c99f629c74@huawei.com> <20230429044038.GA7561@lst.de> <20230501044744.GA20056@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230501044744.GA20056@lst.de> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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, May 01, 2023 at 06:47:44AM +0200, Christoph Hellwig wrote: > On Sat, Apr 29, 2023 at 01:10:49PM +0800, Ming Lei wrote: > > Not sure if it is needed for non s_bdev > > So you don't want to work this at all for btrfs? Or the XFS log device, > or .. Basically FS can provide one generic API of shutdown_filesystem() which shutdown FS generically, meantime calls each fs's ->shutdown() for dealing with fs specific shutdown. If there isn't superblock attached for one bdev, can you explain a bit what filesystem code can do? Same with block layer bdev. The current bio->bi_status together disk_live()(maybe bdev_live() is needed) should be enough for FS code to handle non s_bdev. > > > , because FS is over stackable device > > directly. Stackable device has its own logic for handling underlying disks dead > > or deleted, then decide if its own disk needs to be deleted, such as, it is > > fine for raid1 to work from user viewpoint if one underlying disk is deleted. > > We still need to propagate the even that device has been removed upwards. > Right now some file systems (especially XFS) are good at just propagating > it from an I/O error. And explicity call would be much better. It depends on the above question about how FS code handle non s_bdev deletion/dead. Thanks, Ming