2017-09-20 08:40:11

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 00/10] honor AT_STATX_DONT_SYNC in netfs

This is pretty simple to do: all netfs getattr implementations consist of
two phases:

1) refresh attributes
2) fill in kstat

We just need to omit the first phase if this flag is given.
---
Miklos Szeredi (10):
ceph: honor AT_STATX_DONT_SYNC
cifs: honor AT_STATX_DONT_SYNC
coda: honor AT_STATX_DONT_SYNC
fuse: honor AT_STATX_DONT_SYNC
gfs2: honor AT_STATX_DONT_SYNC
lustre: honor AT_STATX_DONT_SYNC
nfs: honor AT_STATX_DONT_SYNC
ocfs2: honor AT_STATX_DONT_SYNC
orangefs: honor AT_STATX_DONT_SYNC
9p: honor AT_STATX_DONT_SYNC

drivers/staging/lustre/lustre/llite/file.c | 12 +++++++-----
fs/9p/vfs_inode.c | 4 +++-
fs/9p/vfs_inode_dotl.c | 3 ++-
fs/ceph/inode.c | 6 ++++--
fs/cifs/inode.c | 30 ++++++++++++++++--------------
fs/coda/inode.c | 5 ++++-
fs/fuse/dir.c | 9 +++++----
fs/gfs2/inode.c | 3 ++-
fs/nfs/inode.c | 6 +++++-
fs/ocfs2/file.c | 12 +++++++-----
fs/orangefs/inode.c | 6 ++++--
11 files changed, 59 insertions(+), 37 deletions(-)

--
2.5.5


2017-09-20 08:40:25

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 09/10] orangefs: 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 <[email protected]>
Cc: Mike Marshall <[email protected]>
---
fs/orangefs/inode.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 9428ea0aac16..1b3c4c4dd3d4 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -247,7 +247,7 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
int orangefs_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags)
{
- int ret = -ENOENT;
+ int ret = 0;
struct inode *inode = path->dentry->d_inode;
struct orangefs_inode_s *orangefs_inode = NULL;

@@ -255,7 +255,9 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
"orangefs_getattr: called on %pd\n",
path->dentry);

- ret = orangefs_inode_getattr(inode, 0, 0, request_mask);
+ if (!(flags & AT_STATX_DONT_SYNC))
+ ret = orangefs_inode_getattr(inode, 0, 0, request_mask);
+
if (ret == 0) {
generic_fillattr(inode, stat);

--
2.5.5

2017-09-20 08:40:20

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 05/10] gfs2: 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 <[email protected]>
Cc: Bob Peterson <[email protected]>
Cc: Steven Whitehouse <[email protected]>
---
fs/gfs2/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 863749e29bf9..c59d36a3b724 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1989,7 +1989,8 @@ static int gfs2_getattr(const struct path *path, struct kstat *stat,
int error;

gfs2_holder_mark_uninitialized(&gh);
- if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
+ if (!(flags & AT_STATX_DONT_SYNC) &&
+ gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
if (error)
return error;
--
2.5.5

2017-09-20 08:40:47

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 10/10] 9p: 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 <[email protected]>
Cc: Eric Van Hensbergen <[email protected]>
Cc: Ron Minnich <[email protected]>
Cc: Latchesar Ionkov <[email protected]>
---
fs/9p/vfs_inode.c | 4 +++-
fs/9p/vfs_inode_dotl.c | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 2a5de610dd8f..0a7063f12c0b 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1065,7 +1065,9 @@ v9fs_vfs_getattr(const struct path *path, struct kstat *stat,

p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
v9ses = v9fs_dentry2v9ses(dentry);
- if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
+
+ if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE ||
+ (flags & AT_STATX_DONT_SYNC)) {
generic_fillattr(d_inode(dentry), stat);
return 0;
}
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 70f9887c59a9..92bf43981a0d 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -478,7 +478,8 @@ v9fs_vfs_getattr_dotl(const struct path *path, struct kstat *stat,

p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
v9ses = v9fs_dentry2v9ses(dentry);
- if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
+ if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE ||
+ (flags & AT_STATX_DONT_SYNC)) {
generic_fillattr(d_inode(dentry), stat);
return 0;
}
--
2.5.5

2017-09-20 08:41:12

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 08/10] ocfs2: 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 <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
---
fs/ocfs2/file.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 6e41fc8fabbe..2d248d71c275 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1307,11 +1307,13 @@ int ocfs2_getattr(const struct path *path, struct kstat *stat,
struct ocfs2_super *osb = sb->s_fs_info;
int err;

- err = ocfs2_inode_revalidate(path->dentry);
- if (err) {
- if (err != -ENOENT)
- mlog_errno(err);
- goto bail;
+ if (!(flags & AT_STATX_DONT_SYNC)) {
+ err = ocfs2_inode_revalidate(path->dentry);
+ if (err) {
+ if (err != -ENOENT)
+ mlog_errno(err);
+ goto bail;
+ }
}

generic_fillattr(inode, stat);
--
2.5.5

2017-09-20 08:41:42

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 07/10] nfs: 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 <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Anna Schumaker <[email protected]>
---
fs/nfs/inode.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 134d9f560240..487e99ba7d33 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -739,6 +739,10 @@ int nfs_getattr(const struct path *path, struct kstat *stat,
int err = 0;

trace_nfs_getattr_enter(inode);
+
+ if (query_flags & AT_STATX_DONT_SYNC)
+ goto out;
+
/* Flush out writes to the server in order to update c/mtime. */
if (S_ISREG(inode->i_mode)) {
err = filemap_write_and_wait(inode->i_mapping);
@@ -769,13 +773,13 @@ int nfs_getattr(const struct path *path, struct kstat *stat,
err = __nfs_revalidate_inode(server, inode);
} else
nfs_readdirplus_parent_cache_hit(path->dentry);
+out:
if (!err) {
generic_fillattr(inode, stat);
stat->ino = nfs_compat_user_ino64(NFS_FILEID(inode));
if (S_ISDIR(inode->i_mode))
stat->blksize = NFS_SERVER(inode)->dtsize;
}
-out:
trace_nfs_getattr_exit(inode, err);
return err;
}
--
2.5.5

2017-09-20 08:40:15

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 02/10] cifs: 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 <[email protected]>
Cc: Steve French <[email protected]>
---
fs/cifs/inode.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index a8693632235f..982ba2e4f549 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -2003,22 +2003,24 @@ int cifs_getattr(const struct path *path, struct kstat *stat,
struct inode *inode = d_inode(dentry);
int rc;

- /*
- * We need to be sure that all dirty pages are written and the server
- * has actual ctime, mtime and file length.
- */
- if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
- inode->i_mapping->nrpages != 0) {
- rc = filemap_fdatawait(inode->i_mapping);
- if (rc) {
- mapping_set_error(inode->i_mapping, rc);
- return rc;
+ if (!(flags & AT_STATX_DONT_SYNC)) {
+ /*
+ * We need to be sure that all dirty pages are written and the
+ * server has actual ctime, mtime and file length.
+ */
+ if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
+ inode->i_mapping->nrpages != 0) {
+ rc = filemap_fdatawait(inode->i_mapping);
+ if (rc) {
+ mapping_set_error(inode->i_mapping, rc);
+ return rc;
+ }
}
- }

- rc = cifs_revalidate_dentry_attr(dentry);
- if (rc)
- return rc;
+ rc = cifs_revalidate_dentry_attr(dentry);
+ if (rc)
+ return rc;
+ }

generic_fillattr(inode, stat);
stat->blksize = CIFS_MAX_MSGSIZE;
--
2.5.5

2017-09-20 08:42:01

by Miklos Szeredi

[permalink] [raw]
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 <[email protected]>
Cc: Oleg Drokin <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: James Simmons <[email protected]>
---
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

2017-09-20 08:42:43

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 04/10] fuse: 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 <[email protected]>
---
fs/fuse/dir.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 622081b97426..d2d1dbe1ef75 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -924,12 +924,13 @@ static int fuse_do_getattr(struct inode *inode, struct kstat *stat,
}

static int fuse_update_get_attr(struct inode *inode, struct file *file,
- struct kstat *stat)
+ struct kstat *stat, unsigned int flags)
{
struct fuse_inode *fi = get_fuse_inode(inode);
int err = 0;

- if (time_before64(fi->i_time, get_jiffies_64())) {
+ if (!(flags & AT_STATX_DONT_SYNC) &&
+ time_before64(fi->i_time, get_jiffies_64())) {
forget_all_cached_acls(inode);
err = fuse_do_getattr(inode, stat, file);
} else if (stat) {
@@ -943,7 +944,7 @@ static int fuse_update_get_attr(struct inode *inode, struct file *file,

int fuse_update_attributes(struct inode *inode, struct file *file)
{
- return fuse_update_get_attr(inode, file, NULL);
+ return fuse_update_get_attr(inode, file, NULL, 0);
}

int fuse_reverse_inval_entry(struct super_block *sb, u64 parent_nodeid,
@@ -1782,7 +1783,7 @@ static int fuse_getattr(const struct path *path, struct kstat *stat,
if (!fuse_allow_current_process(fc))
return -EACCES;

- return fuse_update_get_attr(inode, NULL, stat);
+ return fuse_update_get_attr(inode, NULL, stat, flags);
}

static const struct inode_operations fuse_dir_inode_operations = {
--
2.5.5

2017-09-20 08:43:21

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 03/10] coda: 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 <[email protected]>
Cc: Jan Harkes <[email protected]>
---
fs/coda/inode.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 6058df380cc0..734672b2cbdc 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode)
int coda_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags)
{
- int err = coda_revalidate_inode(d_inode(path->dentry));
+ int err = 0;
+
+ if (!(flags & AT_STATX_DONT_SYNC))
+ err = coda_revalidate_inode(d_inode(path->dentry));
if (!err)
generic_fillattr(d_inode(path->dentry), stat);
return err;
--
2.5.5

2017-09-20 08:43:45

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 01/10] ceph: 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 <[email protected]>
Cc: Ilya Dryomov <[email protected]>
Cc: "Yan, Zheng" <[email protected]>
Cc: Sage Weil <[email protected]>
---
fs/ceph/inode.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 373dab5173ca..723002f6b060 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2201,9 +2201,11 @@ int ceph_getattr(const struct path *path, struct kstat *stat,
{
struct inode *inode = d_inode(path->dentry);
struct ceph_inode_info *ci = ceph_inode(inode);
- int err;
+ int err = 0;
+
+ if (!(flags & AT_STATX_DONT_SYNC))
+ err = ceph_do_getattr(inode, CEPH_STAT_CAP_INODE_ALL, false);

- err = ceph_do_getattr(inode, CEPH_STAT_CAP_INODE_ALL, false);
if (!err) {
generic_fillattr(inode, stat);
stat->ino = ceph_translate_ino(inode->i_sb, inode->i_ino);
--
2.5.5

2017-09-20 20:38:08

by Jan Harkes

[permalink] [raw]
Subject: Re: [PATCH 03/10] coda: honor AT_STATX_DONT_SYNC

On Wed, Sep 20, 2017 at 10:39:58AM +0200, Miklos Szeredi wrote:
> 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.

What is the use case for this AT_STATX_DONT_SYNC flag?

I'm asking because the Coda userspace client potentially has attributes
that are not cached in the kernel but can be (re-)validated without
network communication. So if we just care about avoiding network
traffic we could propagate the flag up to userspace. If we want to avoid
context switches, disk I/O and only check on what happens to be cached
in the kernel the current approach works fine.

Jan

> Signed-off-by: Miklos Szeredi <[email protected]>
> Cc: Jan Harkes <[email protected]>
> ---
> fs/coda/inode.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/coda/inode.c b/fs/coda/inode.c
> index 6058df380cc0..734672b2cbdc 100644
> --- a/fs/coda/inode.c
> +++ b/fs/coda/inode.c
> @@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode)
> int coda_getattr(const struct path *path, struct kstat *stat,
> u32 request_mask, unsigned int flags)
> {
> - int err = coda_revalidate_inode(d_inode(path->dentry));
> + int err = 0;
> +
> + if (!(flags & AT_STATX_DONT_SYNC))
> + err = coda_revalidate_inode(d_inode(path->dentry));
> if (!err)
> generic_fillattr(d_inode(path->dentry), stat);
> return err;
> --
> 2.5.5
>
>

2017-09-21 12:45:34

by Miklos Szeredi

[permalink] [raw]
Subject: Re: [PATCH 03/10] coda: honor AT_STATX_DONT_SYNC

On Wed, Sep 20, 2017 at 10:04 PM, Jan Harkes <[email protected]> wrote:
> On Wed, Sep 20, 2017 at 10:39:58AM +0200, Miklos Szeredi wrote:
>> 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.
>
> What is the use case for this AT_STATX_DONT_SYNC flag?
>
> I'm asking because the Coda userspace client potentially has attributes
> that are not cached in the kernel but can be (re-)validated without
> network communication. So if we just care about avoiding network
> traffic we could propagate the flag up to userspace. If we want to avoid
> context switches, disk I/O and only check on what happens to be cached
> in the kernel the current approach works fine.

It's an interesting question, "server" could mean several different
things depending on the context. I interpreted it as "any entity
outside the kernel the filesystem resides in", mainly because it's the
simplest interpretation.

Thanks,
Miklos


>> Signed-off-by: Miklos Szeredi <[email protected]>
>> Cc: Jan Harkes <[email protected]>
>> ---
>> fs/coda/inode.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/coda/inode.c b/fs/coda/inode.c
>> index 6058df380cc0..734672b2cbdc 100644
>> --- a/fs/coda/inode.c
>> +++ b/fs/coda/inode.c
>> @@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode)
>> int coda_getattr(const struct path *path, struct kstat *stat,
>> u32 request_mask, unsigned int flags)
>> {
>> - int err = coda_revalidate_inode(d_inode(path->dentry));
>> + int err = 0;
>> +
>> + if (!(flags & AT_STATX_DONT_SYNC))
>> + err = coda_revalidate_inode(d_inode(path->dentry));
>> if (!err)
>> generic_fillattr(d_inode(path->dentry), stat);
>> return err;
>> --
>> 2.5.5
>>
>>

2017-09-21 18:14:31

by Steve French

[permalink] [raw]
Subject: Re: [PATCH 02/10] cifs: honor AT_STATX_DONT_SYNC

Do you have any sample program/code to query with this flag?

On Wed, Sep 20, 2017 at 3:39 AM, Miklos Szeredi <[email protected]> wrote:
> 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 <[email protected]>
> Cc: Steve French <[email protected]>
> ---
> fs/cifs/inode.c | 30 ++++++++++++++++--------------
> 1 file changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index a8693632235f..982ba2e4f549 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -2003,22 +2003,24 @@ int cifs_getattr(const struct path *path, struct kstat *stat,
> struct inode *inode = d_inode(dentry);
> int rc;
>
> - /*
> - * We need to be sure that all dirty pages are written and the server
> - * has actual ctime, mtime and file length.
> - */
> - if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
> - inode->i_mapping->nrpages != 0) {
> - rc = filemap_fdatawait(inode->i_mapping);
> - if (rc) {
> - mapping_set_error(inode->i_mapping, rc);
> - return rc;
> + if (!(flags & AT_STATX_DONT_SYNC)) {
> + /*
> + * We need to be sure that all dirty pages are written and the
> + * server has actual ctime, mtime and file length.
> + */
> + if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
> + inode->i_mapping->nrpages != 0) {
> + rc = filemap_fdatawait(inode->i_mapping);
> + if (rc) {
> + mapping_set_error(inode->i_mapping, rc);
> + return rc;
> + }
> }
> - }
>
> - rc = cifs_revalidate_dentry_attr(dentry);
> - if (rc)
> - return rc;
> + rc = cifs_revalidate_dentry_attr(dentry);
> + if (rc)
> + return rc;
> + }
>
> generic_fillattr(inode, stat);
> stat->blksize = CIFS_MAX_MSGSIZE;
> --
> 2.5.5
>



--
Thanks,

Steve