From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C9C1C282CE for ; Mon, 11 Feb 2019 15:59:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C2D721A80 for ; Mon, 11 Feb 2019 15:59:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="WlKNM1WN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730707AbfBKP7c (ORCPT ); Mon, 11 Feb 2019 10:59:32 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:34991 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731077AbfBKP7a (ORCPT ); Mon, 11 Feb 2019 10:59:30 -0500 Received: by mail-it1-f193.google.com with SMTP id v72so2527896itc.0 for ; Mon, 11 Feb 2019 07:59:30 -0800 (PST) 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:content-transfer-encoding; bh=+uIKGkl1GC41mQ/NKTjmBVUHoDiefW9E78P5EekiS2k=; b=WlKNM1WNb9Jh0+hh9Ease9aGaAKumJa1cRxlihf9YVEgzoXHreFmKhT+rN9QD7x9y0 EhXY3jnUVr5A5aXUvA0MgQ+iPC7GTfhbjZMBf50s9KMaxTK/eP8lmmXFt4sAEBVxwfRI vq1iylwTHKv65zGxMkm2tPpiclfcQ4kWY7kD8= 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:content-transfer-encoding; bh=+uIKGkl1GC41mQ/NKTjmBVUHoDiefW9E78P5EekiS2k=; b=K0mwBYBhuiDN0j/gFffUu4JZ2ZKoD/4TED9PxKI+24GI6GpGRDhZ6KLMLyyqE5piLC sqNYTKxd/L3Bw9IJv7cXjVJ3OelhyGZpXSEzxlxE02cKXA053qI+Z9A0haWyIdjKuRQE LPz2F5wM/77IPicgVuuxukuQEdUPkPDzG089Qzu2JP8jHU16W1AqybiasOSkWp8MZkpM EPRpgSJLVp8BSNJisRhO7ADq5DJM+2gOJUFyucpXO7tAm8yjkM8BAPJnHv6XnfGteVac VmH3YJ4ILKFxW7BmJ7g7T9oJuT+/IQmZy/j23DDuAiMeblypIh4VaOgfKPDoo/2lj46m sXSQ== X-Gm-Message-State: AHQUAubBp9qfyvw66krQI4ReTD7VtipY47bBKWCIrExYVwRld4AWTZTE 8hFfpR2P3PRxkICVrmsIVR6uP+UomSm2e9dYNt+dlQ== X-Google-Smtp-Source: AHgI3IbO2lN8kPzuUH0uKDJEahy/Sfe3xFVXXNw5gjnwKYquICSZk4gjERO4hH7oQg8WX49ThjrAgFwLMZ1UkTbjEuk= X-Received: by 2002:a24:710:: with SMTP id f16mr76176itf.121.1549900770057; Mon, 11 Feb 2019 07:59:30 -0800 (PST) MIME-Version: 1.0 References: <875ztrcpkz.fsf@vostro.rath.org> In-Reply-To: From: Miklos Szeredi Date: Mon, 11 Feb 2019 16:59:18 +0100 Message-ID: Subject: Re: [fuse-devel] [fuse] Relevance of st_ino values To: =?UTF-8?B?SmVhbi1QaWVycmUgQW5kcsOp?= Cc: fuse-devel , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Feb 11, 2019 at 12:18 PM Jean-Pierre Andr=C3=A9 wrote: > > Nikolaus Rath wrote: > > Hello, > > > > For several requests, FUSE userspace returns a struct stat to the > > kernel. struct stat includes an st_ino field, but FUSE generally has a > > separate field for the inode (e.g. fuse_entry_param.ino vs > > fuse_entry_param.attr.st_ino). > > > > Does the kernel use the st_ino value at all, or is just passed through > > to userspace? st_ino value is not used in any way by the kernel, just passed through to userspace. > > Fuse defines its own inode number in order to track the path used > to access a file. So, when a file is recorded in several directories, > it is referenced by fuse with several inode numbers. The high level lib does this, yes. When using the lowlevel lib, it's up to the filesystem implementation: passthrough_ll uses the struct lo_inode pointer (which is specific to a certain real file) as nodeid, so no multi-caching (and related problems with consistency) in case of hard links. Thanks, Miklos