From patchwork Sat Mar 11 05:30:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9618387 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 2326C60414 for ; Sat, 11 Mar 2017 05:32:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08F7828710 for ; Sat, 11 Mar 2017 05:32:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE5B3287B3; Sat, 11 Mar 2017 05:32:20 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 939D828710 for ; Sat, 11 Mar 2017 05:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171AbdCKFcT (ORCPT ); Sat, 11 Mar 2017 00:32:19 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36486 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750896AbdCKFcS (ORCPT ); Sat, 11 Mar 2017 00:32:18 -0500 Received: by mail-pf0-f196.google.com with SMTP id j5so12922387pfb.3 for ; Fri, 10 Mar 2017 21:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zxD1kuwo1UPCQzSiqYcge7SdZ9s5bP/SFSSFrheNG4M=; b=kbu3fjF3bvRbBfPdQ01gt3s11bPABWu9V7uYptP2IGmuX/YD/+PE7PSu7WzTi1rsxj QT/5q9U3k7mYJ3N0kYpJf0xxfXSk5B5uDXqOy9eUvbWt+UfoRxD04eD6e11q83r9fsl1 uEvKivdi1F/vScUmc6rtCVBinUpBeuuwaGW6ScQYZMxAHOgntUgaoAxSxJNgLGGVgVP7 Ji3c99d4SuioXlKNs9Nu0KvtEaDFtJDN6nUwoHx1WW7fLgBGozRs6oboCqX7GXGL84HQ NNZnRW2Y7DivMBmpQiCmUjw5LejzxFes6x1wPUKKGNEHLDqZDPzhjBfxctsh+P3Xk4hD fqRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zxD1kuwo1UPCQzSiqYcge7SdZ9s5bP/SFSSFrheNG4M=; b=BUVSwBa1jdhEre6iuzKSwrtsqkziR+jRbTifQoQaaZW/Oqnv8hkqvtrWGuLexFFbS3 tq3xirxRPF1xwb4KF/uDVWzhWjLQmCm+wv2exPh+nTwNmiFo1dxGEtzSZpqwX3gcbAH4 nMGDqHqZQZrbWqfRiSMLO9rbMCy16X619NXDp8P4NlTxqFde7gVOBqL7KcVsUv4VBS7D vFOOkMme63ESwu+/ZjDU3anb9AzD83d0SWW0KLOsV33rwocV9frpT5wtg/WgPfLTnfBx GBIvzchiTd4x2PS17Pm48zKLlgsNYxxvgLNn0VnANSf55kNE0Mhjr6tg6oXbOCKyoPJF k4ew== X-Gm-Message-State: AMke39n4HRbKkGA6SKmXj+D4zNgkaLaWB2ol2sn8HPnCFuId8dT5Alh/MW9C/+j0vMKbMw== X-Received: by 10.99.147.16 with SMTP id b16mr24531174pge.126.1489210337138; Fri, 10 Mar 2017 21:32:17 -0800 (PST) Received: from zzz.hsd1.wa.comcast.net (c-73-239-167-150.hsd1.wa.comcast.net. [73.239.167.150]) by smtp.gmail.com with ESMTPSA id y67sm21563108pfa.96.2017.03.10.21.32.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 21:32:16 -0800 (PST) From: Eric Biggers To: linux-fsdevel@vger.kernel.org Cc: Al Viro , David Howells , Eric Biggers Subject: [PATCH] Documentation/filesystems: fix documentation for ->getattr() Date: Fri, 10 Mar 2017 21:30:16 -0800 Message-Id: <20170311053016.31244-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.12.0 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 From: Eric Biggers Following the recent merge of statx, correct the documented prototype for the ->getattr() inode operation, and add an entry to the porting file. Signed-off-by: Eric Biggers --- Documentation/filesystems/Locking | 3 +-- Documentation/filesystems/porting | 6 ++++++ Documentation/filesystems/vfs.txt | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index fdcfdd79682a..fe25787ff6d4 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -58,8 +58,7 @@ prototypes: int (*permission) (struct inode *, int, unsigned int); int (*get_acl)(struct inode *, int); int (*setattr) (struct dentry *, struct iattr *); - int (*getattr) (const struct path *, struct dentry *, struct kstat *, - u32, unsigned int); + int (*getattr) (const struct path *, struct kstat *, u32, unsigned int); ssize_t (*listxattr) (struct dentry *, char *, size_t); int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); void (*update_time)(struct inode *, struct timespec *, int); diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 95280079c0b3..5fb17f49f7a2 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting @@ -600,3 +600,9 @@ in your dentry operations instead. [recommended] ->readlink is optional for symlinks. Don't set, unless filesystem needs to fake something for readlink(2). +-- +[mandatory] + ->getattr() is now passed a struct path rather than a vfsmount and + dentry separately, and it now has request_mask and query_flags arguments + to specify the fields and sync type requested by statx. Filesystems not + supporting any statx-specific features may ignore the new arguments. diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 569211703721..94dd27ef4a76 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -382,8 +382,7 @@ struct inode_operations { int (*permission) (struct inode *, int); int (*get_acl)(struct inode *, int); int (*setattr) (struct dentry *, struct iattr *); - int (*getattr) (const struct path *, struct dentry *, struct kstat *, - u32, unsigned int); + int (*getattr) (const struct path *, struct kstat *, u32, unsigned int); ssize_t (*listxattr) (struct dentry *, char *, size_t); void (*update_time)(struct inode *, struct timespec *, int); int (*atomic_open)(struct inode *, struct dentry *, struct file *,