All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] orangefs: report attributes_mask and attributes for statx
@ 2018-05-04 19:07 Martin Brandenburg
  2018-05-07  5:11 ` Ritesh Harjani
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Brandenburg @ 2018-05-04 19:07 UTC (permalink / raw)
  To: linux-fsdevel, devel; +Cc: Martin Brandenburg, hubcap

Reported-by: Becky Ligon <ligon@clemson.edu>
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-07  5:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 19:07 [PATCH] orangefs: report attributes_mask and attributes for statx Martin Brandenburg
2018-05-07  5:11 ` Ritesh Harjani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.