From patchwork Sat Dec 10 21:03:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keno Fischer X-Patchwork-Id: 9469513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0CEDC607EE for ; Sat, 10 Dec 2016 21:03:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E76E128507 for ; Sat, 10 Dec 2016 21:03:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAD2428518; Sat, 10 Dec 2016 21:03:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47A5128507 for ; Sat, 10 Dec 2016 21:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbcLJVDq (ORCPT ); Sat, 10 Dec 2016 16:03:46 -0500 Received: from mail-ua0-f177.google.com ([209.85.217.177]:33284 "EHLO mail-ua0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752094AbcLJVDp (ORCPT ); Sat, 10 Dec 2016 16:03:45 -0500 Received: by mail-ua0-f177.google.com with SMTP id 20so49331001uak.0 for ; Sat, 10 Dec 2016 13:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pbSK3DNj2XaORJAQOGv4Jvx6eZUps0W/nGw8yER+RBg=; b=AnZ4y7gT6EqUtSSxbiaazTmhRQpJDVuBxMwXVQUEwLuu5v1nDw9KPGdJB/h91MpRNj p+QHE8AORcivxOXdEOaLMrLYG481kZy7z/faxp+M45j42JpwUd9Ekz+cv/LZLmek4+RG 9+hQWEZFQmfrrJhDYGN19g2nsuuCL1xW5eAs0xJUwF0+0I8fYeBVbq9X79iPeiTrr0VO n4Kcpx8ZvpLCUkjm5F5FOWNmtlR59FaEp5YK3KdkcrnZNytc3bmuBC1eckV3vykgyzvu Im/dypt6ZOO2T4CBXwTW6a8tPh4dCg4M5C2mrxv6CZMUGHaHBUlCFx3tEYIwgFbun7MM DDdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pbSK3DNj2XaORJAQOGv4Jvx6eZUps0W/nGw8yER+RBg=; b=dxuV5bGZfPbdqRLtq9fmPjBIMS5QfT9FuK+HGkbcDvq9d8YM4Dg4rbSG1AMa7yrBOx 7UJ87C6KFpuyBmd9Uv8zH9MVEPmoTNefJYin92THzptP5c2peCrejGDmjp563rpmAp/N o5RZb/AdFSlZZXYBoO+6XtufGxjw+gn4q7JUjeuCihxyuxLV3cUhN/BXQkIw2WjZylEZ xysu370LK3dgw4tLVgHGpupsVPk3dsmOJV5zNouohwo1VzcCjDZMSvN4yGFgTvVW00N4 c1eM+SCrqBk0WW8nXuHw5Iv+8Up6V9c5kCXC+Dox8eXQgXgGOQl4ts6Cwud3JNIuFJ0r 2JUw== X-Gm-Message-State: AKaTC03HtMTdYN1Nz+G3p4e/RO/hTrC0UMiGUQ2YeJqpyp308p5rz71X9ysvxVW84FCuSS1btfZDbzuVWlDjIZEZ X-Received: by 10.176.84.12 with SMTP id n12mr65507866uaa.25.1481403824454; Sat, 10 Dec 2016 13:03:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.14.132 with HTTP; Sat, 10 Dec 2016 13:03:04 -0800 (PST) In-Reply-To: <96577e95-953c-994c-1dbb-2b4c92c1d2c4@gmail.com> References: <20161210072018.GA5267@juliacomputing.com> <96577e95-953c-994c-1dbb-2b4c92c1d2c4@gmail.com> From: Keno Fischer Date: Sat, 10 Dec 2016 16:03:04 -0500 Message-ID: Subject: Re: [PATCH] fuse.4: Add new file describing /dev/fuse To: "Michael Kerrisk (man-pages)" Cc: linux-man@vger.kernel.org, Miklos Szeredi , linux-fsdevel@vger.kernel.org, Nikolaus Rath Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Michael, your edits look good to me. Here's some suggested wording to address the FIXMEs. Hope that's clearer (I also hope this goes through ok, gmail sometimes mangles patches, so I usually send them from the command line). .nf @@ -192,47 +189,58 @@ struct fuse_getattr_in { .fi .in -As usual, the filesystem object operated on is indicated by -.IR header\->nodeid . -The daemon should compute the attributes -of this object and reply with the following message: -.in +4n +The requested operation is to compute the attributes to be returned +by +.BR stat(2) +and similar operations for the given file system object. +The object for which the attributes should be computed is indicated +either by +.IR header\->nodeid +or, if the +.IR FUSE_GETATTR_FH +flag is set, by the file handle +.IR fh. +The latter case of operation is analogous to +.BR fstat(2). + +For performance reasons, these attributes may be cached in the kernel for +a specified duration of time. While the cache timeout has not been exceeded, +the attributes will be served from the cache and will not cause additional +.B FUSE_GETATTR +requests. + +The computed attributes and the requested +cache timeout should then be returned in the following structure: +.in +4n .nf -struct fuse_attr { - uint64_t ino; - uint64_t size; - uint64_t blocks; - uint64_t atime; - uint64_t mtime; - uint64_t ctime; - uint32_t atimensec; - uint32_t mtimensec; - uint32_t ctimensec; - uint32_t mode; - uint32_t nlink; - uint32_t uid; - uint32_t gid; - uint32_t rdev; - uint32_t blksize; - uint32_t padding; -}; - struct fuse_attr_out { /* Attribute cache duration (seconds + nanoseconds) */ uint64_t attr_valid; uint32_t attr_valid_nsec; uint32_t dummy; - struct fuse_attr attr; + struct fuse_attr { + uint64_t ino; + uint64_t size; + uint64_t blocks; + uint64_t atime; + uint64_t mtime; + uint64_t ctime; + uint32_t atimensec; + uint32_t mtimensec; + uint32_t ctimensec; + uint32_t mode; + uint32_t nlink; + uint32_t uid; + uint32_t gid; + uint32_t rdev; + uint32_t blksize; + uint32_t padding; + } attr; }; .fi .in -The fields of -.I struct fuse_attr -describe the attributes of the required file. -For the interpretation of these fields, see -.BR stat (2). .TP .BR FUSE_ACCESS @@ -249,9 +257,10 @@ If the .I default_permissions mount options is not used, this request may be used for permissions checking. No reply data is expected, but errors may be indicated -as usual in the reply header (in particular, access denied errors -may be indicated, by setting such field to -.\" FIXME What does "such field" mean? The 'error' field? +as usual by setting the +.I error +field in the reply header (in particular, access denied errors +may be indicated by returning .BR \-EACCES ). .TP .BR FUSE_OPEN " and " FUSE_OPENDIR @@ -328,10 +337,7 @@ The requested action is to read up to .I size bytes of the file or directory, starting at .IR offset . -.\" FIXME -.\" In the following, what are "out header" and "out structure"? -The bytes should be returned directly following the out header, -with no further special out structure. +The bytes should be returned directly following the usual reply header. .TP .BR FUSE_INTERRUPT .in +4n --- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/man4/fuse.4 b/man4/fuse.4 index 30f4b0a..af28ef9 100644 --- a/man4/fuse.4 +++ b/man4/fuse.4 @@ -177,9 +177,6 @@ of the minor versions provided by the daemon and the kernel and both parties should use the protocol corresponding to said minor version. .TP .BR FUSE_GETATTR -.\" FIXME It looks like this is for implementing a stat(2) type of -.\" operation. There needs to be a sentence here describing what -.\" this option does. .in +4n