Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp724930yba; Fri, 26 Apr 2019 07:47:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaI9f1kTwZ9NIhp4qgSuxNrX4kXi9OolaZeS68Rw3PACCvlHvZ3HB2VHRnZCe/COPtQ/Oh X-Received: by 2002:a62:304:: with SMTP id 4mr45892264pfd.99.1556290047597; Fri, 26 Apr 2019 07:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556290047; cv=none; d=google.com; s=arc-20160816; b=W31NNWmPx22CG80QDJr7c2SHCJ5Im3VBn03one7NpKW8m/B9cabnVi9FfTNGEf1Wmx sF70X7t8bKc3r6iRK4JCCDuykMIlv72xH3+lvwZqio3apAIQB/ZmHvgwU8HxOkxfkSjX EsOL8Wc91CnVk8vpvKBPoTVZiyn1SLhsiOsh2p7fE02i52h6lZChiP5ENeY8dj9I66aS Ts0wlYE3MR5XR9UKq1cJOOprGuvOAR1MzMdzELlY2mqA2KEruomKegQ8DR4k0JLCoZC6 8xHIlC0Vm56sSu2MbyqB+J8Yodv/qNgSnQ17vVd6mNRujyxvzqUCTeiw5eUH3OUlabo7 CpLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LE9A4smiUcCKHhSGSOEPiRFSN9l8MMhyxEeH0NKsxbs=; b=cDwtNKFEDY44Z+3HI3UhYh8GreDyLQrM0hiWAtJ3fxrE4UlRQhPdja0q0b21J26x8s XOp8YlsJ9zervyuUgB72qb7yfUKBmSCiDqYwAvuvxSqrrEtn4d6vyw1yeW2dXF8t8JIG PZtYrELS7WbCjNe3EJKoFPheL9MuXNSYmH+yuVBLRxPRPcpn2e1nOruXrEOQlGygK8C/ BX3MN0PhYFNqSzGSaYlxC+94G5WMEUE+ovPtSTduIehzeb200K9I1Zvl+10/JFBhifWE 5zxghsnXylzlIWIiFY13GHzlMv6VhT6ZDqOrVPklDpeEO2Pl8QlMW63IOKzDyMHNYv5V rhqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="XNRLx+/7"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8si25262644plk.392.2019.04.26.07.47.12; Fri, 26 Apr 2019 07:47:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="XNRLx+/7"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726651AbfDZOpo (ORCPT + 99 others); Fri, 26 Apr 2019 10:45:44 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:40602 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfDZOpn (ORCPT ); Fri, 26 Apr 2019 10:45:43 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3QEYTmS120579; Fri, 26 Apr 2019 14:45:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=LE9A4smiUcCKHhSGSOEPiRFSN9l8MMhyxEeH0NKsxbs=; b=XNRLx+/7PRD7ym+fUsYzMt4wfLPh6UCuLh8UnZvF78EJKnzruNlOdccbiJhgIe5kl7iY /9OEHv5GBUe4aq9tvnaP5wYY5IbDsy5yihOkZoZCkrAW7ZA1xqgEUUx+NajOUoPXuKJ9 C2AMf75B4eucFzdtrJ7zycj0pu3kEKwUlztJlb3v84VlNwiqroxJ6fOvRI7FmTSAZIvF zMdqTAl0Z3VewQl2Ja7q9uniTaJIEhuHFZ+qwCCMXvMN8MyY/sD+80Vtope085wYE5sD nc+bGpF/Uv68G9ZIaDzryOOFJ2dpdAmebCxw9dP4Zl/qBP8mOQpadPQIboCcOl4IgIJM BA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 2ryrxder02-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 14:45:10 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3QEipin179053; Fri, 26 Apr 2019 14:45:09 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2s0dwg2app-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 14:45:09 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x3QEj7FI016013; Fri, 26 Apr 2019 14:45:07 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 26 Apr 2019 07:45:07 -0700 Date: Fri, 26 Apr 2019 07:45:07 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: Dave Chinner , Jerome Glisse , lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [LSF/MM TOPIC] Direct block mapping through fs for device Message-ID: <20190426144507.GB178347@magnolia> References: <20190426013814.GB3350@redhat.com> <20190426062816.GG1454@dread.disaster.area> <20190426124553.GB12339@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190426124553.GB12339@infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9238 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260101 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9238 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260101 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 26, 2019 at 05:45:53AM -0700, Christoph Hellwig wrote: > On Fri, Apr 26, 2019 at 04:28:16PM +1000, Dave Chinner wrote: > > i.e. go look at how xfs_pnfs.c works to hand out block mappings to > > remote pNFS clients so they can directly access the underlying > > storage. Basically, anyone wanting to map blocks needs a file layout > > lease and then to manage the filesystem state over that range via > > these methods in the struct export_operations: > > > > int (*get_uuid)(struct super_block *sb, u8 *buf, u32 *len, u64 *offset); > > int (*map_blocks)(struct inode *inode, loff_t offset, > > u64 len, struct iomap *iomap, > > bool write, u32 *device_generation); > > int (*commit_blocks)(struct inode *inode, struct iomap *iomaps, > > int nr_iomaps, struct iattr *iattr); > > Nipick: get_uuid isn't needed for the least itself, it just works > around the fact that the original pNFS/block protocol is braindead. > The pNFS/SCSI prototocol already switches to a device UUID, and other > users that work locally shouldn't need it either. Hmmm, this lease interface still doesn't support COW, right? (Right, xfs_pnfs.c bails out with -ENXIO for reflink files) It occurs to me that maybe we don't want Goldwyn's IOMAP_DAX_COW approach (hide the read address in the iomap->inline_data pointer); we just want two physical source addresses. Then the dax code can turn that into a memory pointer and file lessees can do sector accesses or whatever they need to do to write the range before calling ->commit_blocks. Oh, right, both of you commented about a dual iomap approach on the v2 btrfs dax support series. /me goes back to drinking coffee. --D