From: Wang Shilong <wangshilong1991@gmail.com>
To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-xfs@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Cc: lixi@ddn.com, adilger@dilger.ca, Wang Shilong <wshilong@ddn.com>
Subject: [PATCH 6/8] ext4: support project in ext4_getattr()
Date: Fri, 1 Mar 2019 23:05:39 +0900 [thread overview]
Message-ID: <1551449141-7884-7-git-send-email-wshilong1991@gmail.com> (raw)
In-Reply-To: <1551449141-7884-1-git-send-email-wshilong1991@gmail.com>
From: Wang Shilong <wshilong@ddn.com>
From: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
fs/ext4/inode.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index b6c451407dcd..cd7b3f997c3b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5703,6 +5703,8 @@ int ext4_getattr(const struct path *path, struct kstat *stat,
struct ext4_inode_info *ei = EXT4_I(inode);
unsigned int flags;
+ stat->projid = ei->i_projid;
+
if (EXT4_FITS_IN_INODE(raw_inode, ei, i_crtime)) {
stat->result_mask |= STATX_BTIME;
stat->btime.tv_sec = ei->i_crtime.tv_sec;
@@ -5720,12 +5722,15 @@ int ext4_getattr(const struct path *path, struct kstat *stat,
stat->attributes |= STATX_ATTR_IMMUTABLE;
if (flags & EXT4_NODUMP_FL)
stat->attributes |= STATX_ATTR_NODUMP;
+ if (flags & EXT4_PROJINHERIT_FL)
+ stat->attributes |= STATX_ATTR_PROJINHERIT;
stat->attributes_mask |= (STATX_ATTR_APPEND |
STATX_ATTR_COMPRESSED |
STATX_ATTR_ENCRYPTED |
STATX_ATTR_IMMUTABLE |
- STATX_ATTR_NODUMP);
+ STATX_ATTR_NODUMP |
+ STATX_ATTR_PROJINHERIT);
generic_fillattr(inode, stat);
return 0;
--
2.19.1
next prev parent reply other threads:[~2019-03-01 14:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 14:05 [PATCH 0/8] add generic interface to set/get project Wang Shilong
2019-03-01 14:05 ` [PATCH 1/8] fs: add support to change project ID Wang Shilong
2019-03-03 21:53 ` Dave Chinner
2019-03-04 23:36 ` 答复: " Wang Shilong
2019-03-01 14:05 ` [PATCH 2/8] ext4: support project ID in ext4_setattr() Wang Shilong
2019-03-01 14:05 ` [PATCH 3/8] f2fs: support project ID in f2fs_setattr() Wang Shilong
2019-03-01 14:05 ` [PATCH 4/8] xfs: support project ID in xfs_setattr() Wang Shilong
2019-03-01 15:49 ` Darrick J. Wong
2019-03-03 22:18 ` Dave Chinner
2019-03-01 14:05 ` [PATCH 5/8] fs: add project support to statx Wang Shilong
2019-03-03 23:01 ` Dave Chinner
2019-03-01 14:05 ` Wang Shilong [this message]
2019-03-01 14:05 ` [PATCH 7/8] f2fs: support project in f2fs_getattr() Wang Shilong
2019-03-01 14:05 ` [PATCH 8/8] xfs: support project in xfs_getattr() Wang Shilong
2019-03-01 15:39 ` Darrick J. Wong
2019-03-03 23:03 ` Dave Chinner
2019-03-03 21:11 ` [PATCH 0/8] add generic interface to set/get project Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1551449141-7884-7-git-send-email-wshilong1991@gmail.com \
--to=wangshilong1991@gmail.com \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=lixi@ddn.com \
--cc=wshilong@ddn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).