gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] unify's return "struct stat" scheme


From: LI Daobing
Subject: [Gluster-devel] unify's return "struct stat" scheme
Date: Thu, 10 Jan 2008 10:51:36 +0800

Hello,

this letter is relative with the last letter post by me in [1]
[1] http://tinyurl.com/2lsa24

unify adopt 4 schemes to return struct stat* in 18 functions.

1. struct stat* is returned from the data node: readv, writev
2. struct stat* is returned from the NS node: mknod, mkdir, symlink,
link, create
3. most part of struct stat* is returned from the NS node, but mtime,
st_size, st_blocks is returned from data node: lookup, stat, fstat,
fchmod, fchown, ftruncate
4. if it's a directory, return struct stat* from the NS node,
otherwise same with 3: chmod, chown, truncate, utimens, rename
(I don't know whether I have made mistake in this paragraph, :) )

Hmm, the unstable returned time will make vim give a warning (as I
descripted in last letter). So I propose another scheme for returning
struct stat*:

1. if it's a file: return struct stat* from the data node
2. if it's a dir: return struct stat* from the NS node

under this scheme, at least the returned stat* can be stable.

Any comment or suggestion? Thanks.

-- 
Best Regards,
 LI Daobing




reply via email to

[Prev in Thread] Current Thread [Next in Thread]