Skip to content

Commit

Permalink
orangefs: report attributes_mask and attributes for statx
Browse files Browse the repository at this point in the history
OrangeFS formerly failed to set attributes_mask with the result that
software could not see immutable and append flags present in the
filesystem.

Reported-by: Becky Ligon <[email protected]>
Signed-off-by: Martin Brandenburg <[email protected]>
Fixes: 68a24a6 ("orangefs: implement statx")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mike Marshall <[email protected]>
  • Loading branch information
Martin Brandenburg authored and hubcapsc committed Jun 1, 2018
1 parent ec62e95 commit 7f54910
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/orangefs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7f54910

Please sign in to comment.