Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1016777ybh; Tue, 10 Mar 2020 12:51:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv814qqYQPjiTFQLPQWdGjitf45Mu9k6ix5ck5K9CIzhHniGJCc8Iy8kTzRqZnDiTU1musA X-Received: by 2002:a9d:750d:: with SMTP id r13mr7472184otk.321.1583869862649; Tue, 10 Mar 2020 12:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583869862; cv=none; d=google.com; s=arc-20160816; b=B7MoMXq4dnXwAHEdy2/gmqo2pHLmwQ5aYjm4ik4Im+ToE49WxTZDYkisTE2jOOnofL tABzMDmx2872oGP2gH+DGiyPNP3xre/dFWdYp42bCmTVfmB51Rni7PVjtoHWqzzt4mLR 96OHDvRqCUdmS49SM1atR5Ed5d1Lx0eghriCO9fHjm3l6PGNdJsvvd9//CoN0PDEbnQV bbdhYDu7n12g0En+Z2I6ZrFcncThAHQ/rPVn7qq6m+jeYbz6TkNmbnNgJBGHARs/6JYR 9NLxmH78pc0g2JsthFUcKL8P9KdXnJPuuhd2ErDHEoM9BVO2A1ESqko+9wbMC4FrSI52 UD0A== 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=a3QS0e8RcKFN7/huSeBCCDwuVM9JqD+PwQz/25LYZ7s=; b=X5W8kmqHYAfADQ0NXYDJgYMMOpnyap5XAzBFpXF85pEvmVzCmt+aPU99yFtbvr01DF c3hKL2OgQxKUgryWx47IcRNTkC4zCbicD82IG8kbV6ojJTsFuHQVMZ9ic0YlsmHw/VCL g1NcL0Q2eS98mhEBu8qKS5X6a20A/EkTDwcdeVm/ZVryqAi6+QFvtdx0hBou5J/leFyF KL4i7ov/kolPYxJUbVVGs+MuiddY3gWfjAiJhKpry92mdbxqlRK3BWNkrWxVzu05A9Dz QXoEuPDFAlgyhm+8OxSXSxeWNUhNDA6NRbJNCk62FBFCMOWb2fvJapoKNaslhv7seVGr uupg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=OhbAghdN; 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 3si5964407oip.102.2020.03.10.12.50.48; Tue, 10 Mar 2020 12:51:02 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=OhbAghdN; 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 S1727646AbgCJTuB (ORCPT + 99 others); Tue, 10 Mar 2020 15:50:01 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:37600 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbgCJTuB (ORCPT ); Tue, 10 Mar 2020 15:50:01 -0400 Received: by mail-io1-f67.google.com with SMTP id k4so14082742ior.4 for ; Tue, 10 Mar 2020 12:50:00 -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=a3QS0e8RcKFN7/huSeBCCDwuVM9JqD+PwQz/25LYZ7s=; b=OhbAghdNUJbciPVHuH7moOlqqCFrFRE9cU5y6G8bZaazds/cVCLgdwVJGN8cktdJeV PcCU4iK+sDFS7sQ0uFJKeBvYtAZY/fdaWTYPriu+UWlAjLMThNuq340tP6KkBerdfuKh y3T0QJitw2eIkqR+syI0QC6SM1+A3omTiS8nU= 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=a3QS0e8RcKFN7/huSeBCCDwuVM9JqD+PwQz/25LYZ7s=; b=AC2ixpEQL7RD8uYFQW+5yrcdnoqcTdaAaHpj/xQH3aXzwRMpQc/Mj+TZemmZD/wId9 lHy71xB8FzWvXSy/MR7XrEo5vMVsOLcC8z/sL9NOH/BfpP0tEwzTAJCyUUInvLfS+u4W m8E1LP2Apjz7f6FQzUcSDw+22MASIvBQ6EcBvDeYNzPPhqMk168oz5XLjFEWQQ9+3oEC QTRvml2Q/rGFaNvEWR6GYRjrA7+Wfo8mowtNMGgRU4+NU1Q2yabmltZE4CzpDzO6YuUt ovA8E961Eh9seAPM+39765QQqh1bxKOMLhBCLzqSH9N95r7u9SnH1JQLzLlY8PqJWeNI pvjw== X-Gm-Message-State: ANhLgQ2lFW21JX1oMly5Xjz5CjrB11xhAdK9GB7VyI67MrsHVSlzuMLc qPgb2i33QqV58NMgwzlUTSyI7IPnwijf3/FH1GPUqA== X-Received: by 2002:a02:a813:: with SMTP id f19mr19907887jaj.35.1583869800367; Tue, 10 Mar 2020 12:50:00 -0700 (PDT) MIME-Version: 1.0 References: <20200304165845.3081-1-vgoyal@redhat.com> <20200304165845.3081-13-vgoyal@redhat.com> In-Reply-To: <20200304165845.3081-13-vgoyal@redhat.com> From: Miklos Szeredi Date: Tue, 10 Mar 2020 20:49:49 +0100 Message-ID: Subject: Re: [PATCH 12/20] fuse: Introduce setupmapping/removemapping commands To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, virtio-fs@redhat.com, Stefan Hajnoczi , "Dr. David Alan Gilbert" , "Michael S. Tsirkin" , Peng Tao 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 Wed, Mar 4, 2020 at 5:59 PM Vivek Goyal wrote: > > Introduce two new fuse commands to setup/remove memory mappings. This > will be used to setup/tear down file mapping in dax window. > > Signed-off-by: Vivek Goyal > Signed-off-by: Peng Tao > --- > include/uapi/linux/fuse.h | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h > index 5b85819e045f..62633555d547 100644 > --- a/include/uapi/linux/fuse.h > +++ b/include/uapi/linux/fuse.h > @@ -894,4 +894,41 @@ struct fuse_copy_file_range_in { > uint64_t flags; > }; > > +#define FUSE_SETUPMAPPING_ENTRIES 8 > +#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0) > +struct fuse_setupmapping_in { > + /* An already open handle */ > + uint64_t fh; > + /* Offset into the file to start the mapping */ > + uint64_t foffset; > + /* Length of mapping required */ > + uint64_t len; > + /* Flags, FUSE_SETUPMAPPING_FLAG_* */ > + uint64_t flags; > + /* Offset in Memory Window */ > + uint64_t moffset; > +}; > + > +struct fuse_setupmapping_out { > + /* Offsets into the cache of mappings */ > + uint64_t coffset[FUSE_SETUPMAPPING_ENTRIES]; > + /* Lengths of each mapping */ > + uint64_t len[FUSE_SETUPMAPPING_ENTRIES]; > +}; fuse_setupmapping_out together with FUSE_SETUPMAPPING_ENTRIES seem to be unused. Thanks, Miklos