CephFS is prepared for the statx interface that doesn’t necessarily fill in
every member of the stat structure, and allows you to make requests for
only certain pieces of information. The purpose is so that the client and
MDS can take less expensive actions than are required to satisfy a full
stat.
-Greg
On Mon, Dec 17, 2018 at 5:23 PM <wei.qiaom...@zte.com.cn> wrote:

> Hi,everyone
>
>    I found libcephfs API, redefine "struct ceph_statx" instead of "struct
> stat", why not use "struct stat "
>
> directly and I think it may be better understandable  and more convenient
> to use for caller.
>
>
>
> struct ceph_statx {
>
> uint32_t stx_mask;
>
> uint32_t stx_blksize;
>
> uint32_t stx_nlink;
>
> uint32_t stx_uid;
>
> uint32_t stx_gid;
>
> uint16_t stx_mode;
>
> uint64_t stx_ino;
>
> uint64_t stx_size;
>
> uint64_t stx_blocks;
>
> dev_t stx_dev;
>
> dev_t stx_rdev;
>
> struct timespec stx_atime;
>
> struct timespec stx_ctime;
>
> struct timespec stx_mtime;
>
> struct timespec stx_btime;
>
> uint64_t stx_version;
>
> };
>
>
> struct stat {
>
>     dev_t     st_dev;     /* ID of device containing file */
>
>     ino_t     st_ino;     /* inode number */
>
>     mode_t    st_mode;    /* protection */
>
>     nlink_t   st_nlink;   /* number of hard links */
>
>     uid_t     st_uid;     /* user ID of owner */
>
>     gid_t     st_gid;     /* group ID of owner */
>
>     dev_t     st_rdev;    /* device ID (if special file) */
>
>     off_t     st_size;    /* total size, in bytes */
>
>     blksize_t st_blksize; /* blocksize for file system I/O */
>
>     blkcnt_t  st_blocks;  /* number of 512B blocks allocated */
>
>     time_t    st_atime;   /* time of last access */
>
>     time_t    st_mtime;   /* time of last modification */
>
>     time_t    st_ctime;   /* time of last status change */
>
> };
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to