Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4139020pxa; Mon, 10 Aug 2020 01:32:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEj5iXea9ejD09Fl1RepMn694zRfQxVVeakRSfhG5HC24CttSNgg/FxHuXwInkF1PAvbA6 X-Received: by 2002:a05:6402:13c4:: with SMTP id a4mr20243644edx.108.1597048347943; Mon, 10 Aug 2020 01:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597048347; cv=none; d=google.com; s=arc-20160816; b=jF1HfwcPBst3L73OzC2IfT39YOoLqa3gOR+QO8TT/gk+Zgs5wnLTiG8P/vagg1BBwh E32p7SKvaIJGh21sFKmHOkFzjV1u5yw/IFcR3GA96x9dheUFoxnTCILqj8ytlLld9zrE 7hLJk5G7qtEq6jfdlLBEKeBWktKELCZL/33l5aMn/x/SERr94bqoa9XpuZ1T/RJsQuVM dlkj9LGHB56x/tyH10X44bO/EE89FXxS9fnXPQL1AvKGxaiBFFokDSGH2Uj6vICXpU90 Yp5ZyR+WpAieDL+lJeC7jE4xWrTCDx632hWMAX5ZVMkptOukh7JMBLxjh/jc6nA0tsl5 9atg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CquD0s9C4x3ETpaALuSLXwVqkmCKd258dwzlSXP4DNs=; b=gbKXUjGnjNbmssnpLENCHvwSFPddamO2dnOyP/d5y8BIIPkB3TrqAiNN97R/jxOtkw 9kcR8x+2crhe/O43KdwKB+DNBI6KiG0wd/sUbxads9xSQGLR1dYSxPI+RlQXXztIA1G7 XanwSeTCBPvhwwL6/a7oGPyy1NMvJR0gGNaYASdebIAL+RkwasOa96dZcf2e14HPZxBR eaVaBZgPZnZHwN3MKDtdKMMF+oiZyX8V1ibMuM/BIIhhCg8X6CPQFa8AicrtNGv8PZVF kr5f/DnixplJ+Gu16+4E0jM9jiSxSTUnxvQmwaKe2DHrd+q548xvm6b0Gx5s+4OWygSU soUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=S2DnfquU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 i2si10111739edu.549.2020.08.10.01.32.04; Mon, 10 Aug 2020 01:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=S2DnfquU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbgHJI31 (ORCPT + 99 others); Mon, 10 Aug 2020 04:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbgHJI30 (ORCPT ); Mon, 10 Aug 2020 04:29:26 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05FEDC061756 for ; Mon, 10 Aug 2020 01:29:25 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id kq25so8497375ejb.3 for ; Mon, 10 Aug 2020 01:29:25 -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=CquD0s9C4x3ETpaALuSLXwVqkmCKd258dwzlSXP4DNs=; b=S2DnfquUHkVrQ3lZVZC1emkh4OCaAvpJvC5YFe8+WX6NKsOIK7gbvBx/6LZgrhozk7 CFbSDsCdO1bYMfX6mAIinY2M5dta1plFEJhbQJA6IDjdZX4QYOF8Qga7R0zegK/Swnxn GUzWkJocv9oeIfkHDemI3ud7ojPTlett6S974= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CquD0s9C4x3ETpaALuSLXwVqkmCKd258dwzlSXP4DNs=; b=h29egEq+ux55nEe5FGzpbcuQsZTywO15Q/lBneN2jrYOw5o0V+seS+BuWFsu00rOj/ FcqjBfcoYwVgrnsD8R/kckkTk5vFB+ol2nWvcBrioZncMUDPp5YYl2xK5gt+8DdDKVOl nHqWWOBKRvvwSVKvjM6ro00f0oiGXbpJFaDcj+aWoaN8p0ZcEh1yTVNajyCiNzHSWlQw AYtOLYeiywz/D1lxAET3LRoMFPPIJRVMOvLUH2kIFO596qXFQUfZkzLf820P6cXDLc5r otGRFwUS4YHINlDTaCCskKRsBdn1njxN6/eBE36T9c9iQevzLhtKttTubTietgurXKza M0KQ== X-Gm-Message-State: AOAM531hIdjyI4rzTRkc9pGYvbjTdfQ1IUR3ijLL9nRA05LS0UPBn7Hf QmjVRVUBTXpPnCoDTEJ8AUW28+tkjtLiiEyGNoCGmg== X-Received: by 2002:a17:906:4e4f:: with SMTP id g15mr5960567ejw.443.1597048164614; Mon, 10 Aug 2020 01:29:24 -0700 (PDT) MIME-Version: 1.0 References: <20200807195526.426056-1-vgoyal@redhat.com> <20200807195526.426056-19-vgoyal@redhat.com> In-Reply-To: <20200807195526.426056-19-vgoyal@redhat.com> From: Miklos Szeredi Date: Mon, 10 Aug 2020 10:29:13 +0200 Message-ID: Subject: Re: [PATCH v2 18/20] fuse: Release file in process context To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs-list , Stefan Hajnoczi , "Dr. David Alan Gilbert" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 7, 2020 at 9:55 PM Vivek Goyal wrote: > > fuse_file_put(sync) can be called with sync=true/false. If sync=true, > it waits for release request response and then calls iput() in the > caller's context. If sync=false, it does not wait for release request > response, frees the fuse_file struct immediately and req->end function > does the iput(). > > iput() can be a problem with DAX if called in req->end context. If this > is last reference to inode (VFS has let go its reference already), then > iput() will clean DAX mappings as well and send REMOVEMAPPING requests > and wait for completion. (All the the worker thread context which is > processing fuse replies from daemon on the host). > > That means it blocks worker thread and it stops processing further > replies and system deadlocks. Is this reasoning specific to DAX? Seems to me this is a virtio-fs specific issue. Thanks, Miklos