Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp273985iog; Mon, 13 Jun 2022 02:21:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw96ziIpiEgqYX4xpGR0sHqlqsVfJzBpavt67I7jDhk64bybWrVwGDrGm/2i07E8wx09vn/ X-Received: by 2002:a05:6a00:1941:b0:50d:807d:530b with SMTP id s1-20020a056a00194100b0050d807d530bmr59020225pfk.17.1655112076867; Mon, 13 Jun 2022 02:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655112076; cv=none; d=google.com; s=arc-20160816; b=h0tIQm8nyfE63iJ5YDZWUviYUOmqQHP8jWC4ao/VqYZ/wgkc7NQtaqkBADfYWGAYjl avjj+2dutWHjs6wytzXZPAm4IbESXe3b6zJzkhPnZM+hpI06x3oEa9aJiwXZq6VSNafZ Tj32GKXhkn1E6ZEXcjTu9gUQuTI0Jy49kdCMpWBqc3OwVhUgP5wHkHTxPgt5j0Ub2GbI lrI5rgX1a4LPhrCXGcbUnmBKLmwGe9p2dnYx/btPp3bnA3FkbRZpIEZytx6gxJ733xrA djYjUmyoSG4cC2pxPWk1XIjZdWyjYLolmk6TSo2JJr7NgbKDodRVru+A3XwUao0Idwf/ jxyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CfmGJwskHmHAhCB8UZHmS2yFdhea4kPoHSuMHnO5k3I=; b=YQWHErP0yB3lCFt11o4rTXUkVgamp+gwHKQLxwpWdU9cdjvsy7/ez0kbnMdTnqgdQV AyjdcVfz0xtmokI3srKgv1sataq0+3hhD/krJpbL6mhjt9ZK7FnItaZpW2EW578Velvc Ct4gVax27FYW1ew0nrz+mQCl6eZUI6VI8NMQL03iEgQ6odjlSFdZNcIEH+FX58P0a/Ip lXjr4+Z8JfPE/GjxFzHyeqwu+TJnpX2NrmKNtgLRH8IPyZ4kCr+g6+fG2MMLRBGBQuc3 0jGA4YRgkN2RbRpubX4AbQiU6FzvJRwzqNB3P0+ppuUkWExQbFs6vVkAOcheQO5YxFFS NXDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="Jr7rk/jd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 u5-20020a17090341c500b001678adeceecsi10069434ple.384.2022.06.13.02.21.02; Mon, 13 Jun 2022 02:21:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b="Jr7rk/jd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238452AbiFMIp3 (ORCPT + 99 others); Mon, 13 Jun 2022 04:45:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239993AbiFMIpN (ORCPT ); Mon, 13 Jun 2022 04:45:13 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0D9D1EEF5 for ; Mon, 13 Jun 2022 01:45:12 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id h19so6193484edj.0 for ; Mon, 13 Jun 2022 01:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CfmGJwskHmHAhCB8UZHmS2yFdhea4kPoHSuMHnO5k3I=; b=Jr7rk/jdznpRCtSmIXFZLDpBqEU6tFtAlG5tryZCnRA3ms47dOK8U8AAUvyt+zvQ7m sK3eLBFP8TGR6Zt7MS7vwyoqlsIOdj4wRS8Kraq+FXAnMsaKRnAGmZnoVT1wPs0EjV+m OeUW8b3fBFOivxW662zjwkk1hWoOTiXnodlX0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CfmGJwskHmHAhCB8UZHmS2yFdhea4kPoHSuMHnO5k3I=; b=IJicAr7qBilP3+PCkC2tu579USmexCrbHgyHrTfizjZgPJ5fOeXt9oXELSuLzt+uwB pKhgabqco4OVWSgukRaAQuNasw31WiXugBDHcUPqdq7QkvfwZP7oOyL2LEX9YKgnuPwd hmtVh/sKgsJoEAykzMQqffoCdcU+QMm3q4lzXO0tORANKVe8pfNJU1lXJE9ujkZXTmcZ hU/t8iEtHWZm2xFzvMy7NYCiXC7aoS9fFAcNB0OKLZmSaZnxkPWkqVPlBOjOkaWGoJgW jOR4fFxPTfQ7PzaQ9X484BL3ocz72q+tJXBshAIcG5rjol4N5e481Cf5qbEvghj2a1Z7 NKFQ== X-Gm-Message-State: AOAM531gtVGxQi4S9xcUFwi3KRirKvImfn+Hqn08xT/sPzKqP1DMekXi bzna2SMIaLXsl7ySAqQAT9A23SwDimYF0fkKccmEyg== X-Received: by 2002:a05:6402:524a:b0:431:51b3:bc7 with SMTP id t10-20020a056402524a00b0043151b30bc7mr45207130edd.5.1655109911441; Mon, 13 Jun 2022 01:45:11 -0700 (PDT) MIME-Version: 1.0 References: <20210603125242.31699-1-chenguanyou@xiaomi.com> <1fabb91167a86990f4723e9036a0e006293518f4.camel@mediatek.com> <07c5f2f1e10671bc462f88717f84aae9ee1e4d2b.camel@mediatek.com> <07ad7d51d15c7ffc708b55066ded653a4b2c5c98.camel@mediatek.com> In-Reply-To: <07ad7d51d15c7ffc708b55066ded653a4b2c5c98.camel@mediatek.com> From: Miklos Szeredi Date: Mon, 13 Jun 2022 10:45:00 +0200 Message-ID: Subject: Re: [PATCH] [fuse] alloc_page nofs avoid deadlock To: Ed Tsai Cc: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , chenguanyou , =?UTF-8?B?U3RhbmxleSBDaHUgKOacseWOn+mZnik=?= , =?UTF-8?B?WW9uZy14dWFuIFdhbmcgKOeOi+ipoOiQsSk=?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org On Fri, 10 Jun 2022 at 09:48, Ed Tsai wrote: > Recently, we get this deadlock issue again. fuse_flush_time_update() > use sync_inode_metadata() and it only write the metadata, so the > writeback worker could still be blocked becaused of file data. > > I try to use write_inode_now() instead of sync_inode_metadata() and the > writeback thread will not be blocked anymore. I don't think this is a > good solution, but this confirm that there is still a potential > deadlock because of file data. WDYT. I'm not sure how that happens. Normally writeback doesn't block. Can you provide the stack traces of all related tasks in the deadlock? Thanks, Miklos