summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/namei.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2017-04-25 15:38:03 -0400
committerMike Marshall <hubcap@omnibond.com>2017-04-26 14:33:00 -0400
commit68a24a6cc4a6025e111c282186a2506281d79b4b (patch)
tree5fad31549fc817c548bbdd28aaa719b152f630c7 /fs/orangefs/namei.c
parent7b796ae37092ef520641b3a96c211c1cc67a0346 (diff)
downloadlinux-0-day-68a24a6cc4a6025e111c282186a2506281d79b4b.tar.gz
linux-0-day-68a24a6cc4a6025e111c282186a2506281d79b4b.tar.xz
orangefs: implement statx
Fortunately OrangeFS has had a getattr request mask for a long time. The server basically has two difficulty levels for attributes. Fetching any attribute except size requires communicating with the metadata server for that handle. Since all the attributes are right there, it makes sense to return them all. Fetching the size requires communicating with every I/O server (that the file is distributed across). Therefore if asked for anything except size, get everything except size, and if asked for size, get everything. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/namei.c')
-rw-r--r--fs/orangefs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
index 7c315938e9c26..478e88bd7f9d3 100644
--- a/fs/orangefs/namei.c
+++ b/fs/orangefs/namei.c
@@ -74,6 +74,7 @@ static int orangefs_create(struct inode *dir,
unlock_new_inode(inode);
orangefs_set_timeout(dentry);
ORANGEFS_I(inode)->getattr_time = jiffies - 1;
+ ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS;
gossip_debug(GOSSIP_NAME_DEBUG,
"%s: dentry instantiated for %pd\n",
@@ -322,6 +323,7 @@ static int orangefs_symlink(struct inode *dir,
unlock_new_inode(inode);
orangefs_set_timeout(dentry);
ORANGEFS_I(inode)->getattr_time = jiffies - 1;
+ ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS;
gossip_debug(GOSSIP_NAME_DEBUG,
"Inode (Symlink) %pU -> %pd\n",
@@ -386,6 +388,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
unlock_new_inode(inode);
orangefs_set_timeout(dentry);
ORANGEFS_I(inode)->getattr_time = jiffies - 1;
+ ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS;
gossip_debug(GOSSIP_NAME_DEBUG,
"Inode (Directory) %pU -> %pd\n",