[PATCH 2/2 v2] vfs_ceph: remove cephwrap_init_stat_ex_from_stat()
Michael Adam
obnox at samba.org
Wed Mar 18 07:08:16 MDT 2015
This one is good now. Thanks!
Will push later (after checking back with Ira).
Michael
On 2015-03-18 at 11:34 +0800, Yan, Zheng wrote:
> cephwrap_init_stat_ex_from_stat() lacks code that makes 'create'
> timestamp. Besides that, it's identical to init_stat_ex_from_stat().
>
> Signed-off-by: Yan, Zheng <zyan at redhat.com>
> ---
> source3/modules/vfs_ceph.c | 32 +++++++++-----------------------
> 1 file changed, 9 insertions(+), 23 deletions(-)
>
> diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
> index 6bf4dc5..c04bf3a 100644
> --- a/source3/modules/vfs_ceph.c
> +++ b/source3/modules/vfs_ceph.c
> @@ -520,26 +520,6 @@ static int cephwrap_fsync(struct vfs_handle_struct *handle, files_struct *fsp)
> WRAP_RETURN(result);
> }
>
> -static void cephwrap_init_stat_ex_from_stat(struct stat_ex *dst, const struct stat *src)
> -{
> - ZERO_STRUCT(*dst);
> -
> - dst->st_ex_dev = src->st_dev;
> - dst->st_ex_ino = src->st_ino;
> - dst->st_ex_mode = src->st_mode;
> - dst->st_ex_nlink = src->st_nlink;
> - dst->st_ex_uid = src->st_uid;
> - dst->st_ex_gid = src->st_gid;
> - dst->st_ex_rdev = src->st_rdev;
> - dst->st_ex_size = src->st_size;
> - dst->st_ex_atime.tv_sec = src->st_atime;
> - dst->st_ex_mtime.tv_sec = src->st_mtime;
> - dst->st_ex_ctime.tv_sec = src->st_ctime;
> - dst->st_ex_btime.tv_sec = src->st_mtime;
> - dst->st_ex_blksize = src->st_blksize;
> - dst->st_ex_blocks = src->st_blocks;
> -}
> -
> static int cephwrap_stat(struct vfs_handle_struct *handle,
> struct smb_filename *smb_fname)
> {
> @@ -565,7 +545,9 @@ static int cephwrap_stat(struct vfs_handle_struct *handle,
> stbuf.st_uid, stbuf.st_gid, llu(stbuf.st_rdev), llu(stbuf.st_size), llu(stbuf.st_blksize),
> llu(stbuf.st_blocks), llu(stbuf.st_atime), llu(stbuf.st_mtime), llu(stbuf.st_ctime)));
> }
> - cephwrap_init_stat_ex_from_stat(&(smb_fname->st), &stbuf);
> + init_stat_ex_from_stat(
> + &smb_fname->st, &stbuf,
> + lp_fake_directory_create_times(SNUM(handle->conn)));
> DEBUG(10, ("[CEPH] mode = 0x%x\n", smb_fname->st.st_ex_mode));
> return result;
> }
> @@ -589,7 +571,9 @@ static int cephwrap_fstat(struct vfs_handle_struct *handle, files_struct *fsp, S
> llu(stbuf.st_blocks), llu(stbuf.st_atime), llu(stbuf.st_mtime), llu(stbuf.st_ctime)));
> }
>
> - cephwrap_init_stat_ex_from_stat(sbuf, &stbuf);
> + init_stat_ex_from_stat(
> + sbuf, &stbuf,
> + lp_fake_directory_create_times(SNUM(handle->conn)));
> DEBUG(10, ("[CEPH] mode = 0x%x\n", sbuf->st_ex_mode));
> return result;
> }
> @@ -612,7 +596,9 @@ static int cephwrap_lstat(struct vfs_handle_struct *handle,
> if (result < 0) {
> WRAP_RETURN(result);
> }
> - cephwrap_init_stat_ex_from_stat(&(smb_fname->st), &stbuf);
> + init_stat_ex_from_stat(
> + &smb_fname->st, &stbuf,
> + lp_fake_directory_create_times(SNUM(handle->conn)));
> return result;
> }
>
> --
> 1.9.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150318/00f378de/attachment.pgp>
More information about the samba-technical
mailing list