lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Sep 2017 10:40:01 +0200
From:   Miklos Szeredi <mszeredi@...hat.com>
To:     linux-fsdevel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
        David Howells <dhowells@...hat.com>,
        Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        James Simmons <jsimmons@...radead.org>
Subject: [PATCH 06/10] lustre: honor AT_STATX_DONT_SYNC

The description of this flag says "Don't sync attributes with the server".
In other words: always use the attributes cached in the kernel and don't
send network or local messages to refresh the attributes.

Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
Cc: Oleg Drokin <oleg.drokin@...el.com>
Cc: Andreas Dilger <andreas.dilger@...el.com>
Cc: James Simmons <jsimmons@...radead.org>
---
 drivers/staging/lustre/lustre/llite/file.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index be665454f407..decbe5eb0c9d 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -2955,14 +2955,16 @@ int ll_getattr(const struct path *path, struct kstat *stat,
 	struct ll_inode_info *lli = ll_i2info(inode);
 	int res;
 
-	res = ll_inode_revalidate(path->dentry,
+	if (!(flags & AT_STATX_DONT_SYNC)) {
+		res = ll_inode_revalidate(path->dentry,
 				  MDS_INODELOCK_UPDATE | MDS_INODELOCK_LOOKUP);
-	ll_stats_ops_tally(sbi, LPROC_LL_GETATTR, 1);
+		ll_stats_ops_tally(sbi, LPROC_LL_GETATTR, 1);
 
-	if (res)
-		return res;
+		if (res)
+			return res;
 
-	OBD_FAIL_TIMEOUT(OBD_FAIL_GETATTR_DELAY, 30);
+		OBD_FAIL_TIMEOUT(OBD_FAIL_GETATTR_DELAY, 30);
+	}
 
 	stat->dev = inode->i_sb->s_dev;
 	if (ll_need_32bit_api(sbi))
-- 
2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ