Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp600468yba; Fri, 26 Apr 2019 05:47:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrkj0vNg3xvVFoYgnbVFwf91PlevoIJLXjJyn1RdUwtPdSuHR5YAViYcJd/MSW9WoOs4B9 X-Received: by 2002:a63:7843:: with SMTP id t64mr43104813pgc.130.1556282827015; Fri, 26 Apr 2019 05:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556282827; cv=none; d=google.com; s=arc-20160816; b=fshVGey6tOMemt49W9C5WI22F6b0GFQLBpsVZryPsCO6Ze6bSXtbkRmd/pL97u52QA +ZbIJ4xaqldXGUKe4v2fH0LajRrG+xtJY2Vf4sQ4hjPogK5FveXMrcJXETxZIKK1J7s/ yWXsBPPl8Y4WXOXmpS7yVNv7Ohxaj9Ys1/JqivqaFIGDuhOYAMNeOmFuQ5fjkwiuQLg+ M+mP7A3axjPUGP453VzbDyseX+j31GAtewQ4Iq4AS0RwVLcgdi3L4zxqUIURQRgSppRf dHylywNEWl6q4NnsLiOt0y5hUMbs/nrfEXiX3fGKBEB9HemQDyxjh+B4nYy3+hUM6eaZ V0BA== 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=akHd8JqiMAzxrz2WCE0z9Z8wSwIAjNmdXhzSk4evgGw=; b=mbA0LuooRteVyRJlquHqVHt3UHav0zBG0/uRX/+LWWRhDV5i9x9ywpImOvFFJy3lO7 k7o/14ZUpUldTUrj2ZkhX2PluwoKbnW5JMiOxhypfRbXN58pmscuJo+4iXhJMGX3oyph 9KlVNROh+v4Y1IhXx3F+PPVUqdqpZIV6RQBk8xZnnXumcZ92ti/2yHfZaYfRgPfajQ4T /zDhmLqVHAQkVL6NCf1I5/1vdJ3OpYhmoFd8p22DY++5lxgZRd5Y4hVca0Jlj66K7Bde Wp7tjTpKboUk743cWijkhhxWXH527ZSZcXdunYCMIuet2BT19lGEanxevM4x7SaitGeC idsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AZhuFqvb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si14208130pgp.44.2019.04.26.05.46.51; Fri, 26 Apr 2019 05:47:07 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AZhuFqvb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbfDZMp4 (ORCPT + 99 others); Fri, 26 Apr 2019 08:45:56 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38110 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfDZMp4 (ORCPT ); Fri, 26 Apr 2019 08:45:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=akHd8JqiMAzxrz2WCE0z9Z8wSwIAjNmdXhzSk4evgGw=; b=AZhuFqvb56ZemhjhPqPx8RzlB DHLTZNxiXAREhfS6hcQN84QTKvH+1PpWmT3ZWfsXF+elp2AQmuYMqGB2t3FEbi0ghPRncdVSagaUg smuSONJ+ayLRN+gwNnSaVtu/M7pIk1lzVenHes52Rp0bV1GYl1e5fx3YIjo4uYepzFcszxh3NyQuI 6BJ994ZTbSsB/zVBP8yoQ04uSFpxPPUImZBAYzRQMwjI3NfjMEhuXJrp1MHliAIYRWty+euxnpKua qZKTJVagxc4Kmqtc601X8scFFP7/0W6OCj1Src9tP32GYwPDBknVCaZ7Va2LSJJEgOXC8jpQR+kyy s6+S28swg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK0Ej-0007PV-L6; Fri, 26 Apr 2019 12:45:53 +0000 Date: Fri, 26 Apr 2019 05:45:53 -0700 From: Christoph Hellwig To: Dave Chinner Cc: 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: <20190426124553.GB12339@infradead.org> References: <20190426013814.GB3350@redhat.com> <20190426062816.GG1454@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190426062816.GG1454@dread.disaster.area> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 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.