Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp897393pxf; Thu, 11 Mar 2021 18:43:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5DCDA842UzlDsiELfIUkWfpN8oO6mwybHd5uS6Lq7vszaFOvOHvahxAt7I+9e8y28EIMY X-Received: by 2002:a17:906:5012:: with SMTP id s18mr5837073ejj.100.1615516990091; Thu, 11 Mar 2021 18:43:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615516990; cv=none; d=google.com; s=arc-20160816; b=ScX0thWMyCEyjKDcPw5gIAZE5nJNrj4x11qrKkCM3VZNlSJ781xjZvRQ/8w9iSHY7G PNMjZobarwvPysY/44g0SL2tMmp3nNvJ2coDnkHaTT5wG2wfpODRfOkz/nqt45OL21lR Yx7iYtgKsPulwyNhHUtav8ZKo0BqVAn56IMP7l7BTVlxuN7uWXze//uOQO3eSRaqMdsn J7MnJOsG+KOf6E5PBEmEiV5z0n/1uNbPWTFkx8GewMjDp4HVw73gbHhRoJvAEvYESz4a MhFFznfrFtcS5TTPhq7WYqBNxwG3OdoY0+o6oJ1Ms6ipsVqddNFnnk/FiH3GTFnIXEfP Wntw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=y8i+GgL7puLj/AgRgZOUrsPa8kJQ2nQpYlPE1FT1rvo=; b=asYcixMwDIedTdrhRUQ6PTMeq0mkb9UPVBIMEE9vHbb6hGoUdltOQVAu1WIIKHTp80 MzTRqs25+ZbSeKhny7HCXQZo+zNbBTTC/kUoe4XNCTEXgc8LLptmMFmDd+knW1xayfP5 pTnIJr6q4f1PGQGakCXP0efhR4oLt2RtMw54TaYrRls4Jcz+7MoEduFC6F7YHZtXuwHp MDS2LYwIgcDYcIaCzT1jMu6T+WuPWY5xeg+oE/cwpdgBjkhEYjpl25pdvwww2xlx8vVy 5Uuggde+6yoHurAGTWYxRlbTyYtlqcBZaZZHJExirKk49lYd3gdE2Szkv554tjMmMAz/ 1DtQ== ARC-Authentication-Results: i=1; mx.google.com; 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 d3si3002335edq.276.2021.03.11.18.42.47; Thu, 11 Mar 2021 18:43:10 -0800 (PST) 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; 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 S231786AbhCLClp convert rfc822-to-8bit (ORCPT + 99 others); Thu, 11 Mar 2021 21:41:45 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:3359 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231489AbhCLClO (ORCPT ); Thu, 11 Mar 2021 21:41:14 -0500 Received: from DGGEML402-HUB.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4DxVPN6yhtz5bFp; Fri, 12 Mar 2021 10:38:48 +0800 (CST) Received: from DGGEML423-HUB.china.huawei.com (10.1.199.40) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 12 Mar 2021 10:41:05 +0800 Received: from DGGEML509-MBS.china.huawei.com ([169.254.4.125]) by dggeml423-hub.china.huawei.com ([10.1.199.40]) with mapi id 14.03.0513.000; Fri, 12 Mar 2021 10:40:57 +0800 From: "chenjun (AM)" To: Matthew Wilcox CC: "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Dan Williams , Jan Kara , "Xiangrui (Euler)" , "lizhe (Y)" , yangerkun , "zhangyi (F)" Subject: Re: [question] Panic in dax_writeback_one Thread-Topic: [question] Panic in dax_writeback_one Thread-Index: AdcWSusQwspXlegvQqCtsylm2CuWCw== Date: Fri, 12 Mar 2021 02:40:56 +0000 Message-ID: References: <20210311121923.GU3479805@casper.infradead.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.178.53] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/3/11 20:20, Matthew Wilcox 写道: > On Thu, Mar 11, 2021 at 07:48:25AM +0000, chenjun (AM) wrote: >> static int dax_writeback_one(struct xa_state *xas, struct dax_device >> *dax_dev, struct address_space *mapping, void *entry) >> ----dax_flush(dax_dev, page_address(pfn_to_page(pfn)), count * PAGE_SIZE); >> The pfn is returned by the driver. In my case, the pfn does not have >> struct page. so pfn_to_page(pfn) return a wrong address. > > I wasn't involved, but I think the right solution here is simply to > replace page_address(pfn_to_page(pfn)) with pfn_to_virt(pfn). I don't > know why Dan decided to do this in the more complicated way. > Thanks Mattherw I think pfn_to_virt could not work in my case. Because of the pfn is not in memory block. -- Regards Chen Jun