Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4191219pxv; Mon, 19 Jul 2021 19:54:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3NOCKq5YAs/wcCGWKdFsP2IbiiTw9axCsXGwO69FpYqI+JZLVZChEA00lClxZMOmYCskg X-Received: by 2002:a05:6402:2213:: with SMTP id cq19mr38123039edb.320.1626749657473; Mon, 19 Jul 2021 19:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626749657; cv=none; d=google.com; s=arc-20160816; b=vFZLqPo+LnW6JJEnHywc2p4V3JsN9jvZvE1/M7DoEPiTyKfs3L3mKx2k1d1qKnL7Pu Zq7Fy0SCRroFqYkqtGFB/wV5hQjSrLrtuTP39dl8B6ZFNOtH/y8JlNHO7NPos+mTqCqq nrh5fj8Fl4XKtYwDbFQJr+iKtj5mo16zFNceG7jJHJtktqLPTa5xk/eWn0RIhbBJP1qx o7MWCpTeLSM9v6nm9FzzVKvNCXhD+s1op0NlsEsBDcwLbWRGTmt0yQ0Pr0a3Pujk2NuP XE64pMdmzBbkgEdhIczd3XUnF8qHgD+66ibIdpHbaWE26PjAhX9kOUC7odvkd1J99iiu FQbw== 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=vowro5yGBW6raP/4H44k+wX5zWXpKRbu3Z3IwekcF6g=; b=Rrd3XT+0AuXbugF3WDhYyUWZQ4BjueJ2esVMdBt0onJ47xVg145qsVDCNUtaW2NWda n10BzlpX4GDcCKrEAN/WvWggWb9m0OZvpKm3dhhvEtjO6dZKGUaMAJv6vPIJqtp45fv5 nLut/pe9nFDLM+aJHlqMCSWRN8tNTHzo2xsCHDbzuuhsN/45XwK5JASkygq6+Fl50MZ9 0lYIZRio5gdsNzZQOUijBm1FV6MrptUjC35jC3bNGcBTEzW4JCP+tnElKOEZBzSqwR0x sqKLRmOk+JdUv2lMHJMUrLe75PCiwDSl8PSL39v5KvxVlUYZDXbzwg5h46Kle7Ia2Dbs ZmJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Sy4gd7Mo; 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 z62si11602711ede.60.2021.07.19.19.53.53; Mon, 19 Jul 2021 19:54:17 -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=pass header.i=@infradead.org header.s=casper.20170209 header.b=Sy4gd7Mo; 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 S1380856AbhGSRvz (ORCPT + 99 others); Mon, 19 Jul 2021 13:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382448AbhGSRjV (ORCPT ); Mon, 19 Jul 2021 13:39:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E49C061225; Mon, 19 Jul 2021 11:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vowro5yGBW6raP/4H44k+wX5zWXpKRbu3Z3IwekcF6g=; b=Sy4gd7MoBwkmEBCRAxHi9v1KP6 nvLic8PgYzDJ4Z27YBnQkBmwvvhPtTUId/BMzWNdVIgRU6I6gL4O8jgU5Zf3MyDsgB9D5y0nnssZl v1dVeYo89omfazgNgK6UOwun1kNqA6UroQ+fI17P4h6IHKiT53zAJBKr63xXYt0sF6BKtjFj86atV QD5JjDme6HRzaPwmscQxvt+19wGByDRHd8T5r4UXSOX0kzJaxVJaYQCEI4dfVtN4Vgl7dwP+FcDSS yOqYhy8yHbW/67wqKHx2ttJlv799QuAz9/7cd9s49rw/L8UfJAnWGywBDZ4fq1DVZwxGmYoQru1X5 bg/7OtfA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5Xle-007Hqh-Bc; Mon, 19 Jul 2021 18:13:49 +0000 Date: Mon, 19 Jul 2021 19:13:26 +0100 From: Matthew Wilcox To: Roman Gushchin Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Dave Chinner , Murphy Zhou , "Darrick J . Wong" Subject: Re: [PATCH] writeback, cgroup: do not reparent dax inodes Message-ID: References: <20210719171350.3876830-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210719171350.3876830-1-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 19, 2021 at 10:13:50AM -0700, Roman Gushchin wrote: > The inode switching code is not suited for dax inodes. An attempt > to switch a dax inode to a parent writeback structure (as a part > of a writeback cleanup procedure) results in a panic like this: [...] > The crash happens on an attempt to iterate over attached pagecache > pages and check the dirty flag: a dax inode's xarray contains pfn's > instead of generic struct page pointers. I wondered why this happens for DAX and not for other kinds of non-page entries in the inodes. The answer is that it's a tagged iteration, and shadow/swap entries are never tagged; only DAX entries get tagged. Acked-by: Matthew Wilcox (Oracle)