From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f195.google.com ([209.85.220.195]:42357 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbeEDTIK (ORCPT ); Fri, 4 May 2018 15:08:10 -0400 Received: by mail-qk0-f195.google.com with SMTP id j10so17444080qke.9 for ; Fri, 04 May 2018 12:08:09 -0700 (PDT) From: Martin Brandenburg To: linux-fsdevel@vger.kernel.org, devel@lists.orangefs.org Cc: Martin Brandenburg , hubcap@omnibond.com Subject: [PATCH] orangefs: report attributes_mask and attributes for statx Date: Fri, 4 May 2018 19:07:52 +0000 Message-Id: <20180504190752.1704-1-martin@omnibond.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Reported-by: Becky Ligon Signed-off-by: Martin Brandenburg Cc: hubcap@omnibond.com --- fs/orangefs/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index b583fbf90665..f301e4957659 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -268,6 +268,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat, else stat->result_mask = STATX_BASIC_STATS & ~STATX_SIZE; + + stat->attributes_mask = STATX_ATTR_IMMUTABLE | + STATX_ATTR_APPEND; + if (inode->i_flags & S_IMMUTABLE) + stat->attributes |= STATX_ATTR_IMMUTABLE; + if (inode->i_flags & S_APPEND) + stat->attributes |= STATX_ATTR_APPEND; } return ret; } -- 2.14.3