mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
s3: VFS: ceph_snapshots: Implement SMB_VFS_FNTIMES()
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
f07f3a5c22
commit
31091cc538
@ -1024,6 +1024,29 @@ static int ceph_snap_gmt_ntimes(vfs_handle_struct *handle,
|
||||
return SMB_VFS_NEXT_NTIMES(handle, csmb_fname, ft);
|
||||
}
|
||||
|
||||
static int ceph_snap_gmt_fntimes(vfs_handle_struct *handle,
|
||||
files_struct *fsp,
|
||||
struct smb_file_time *ft)
|
||||
{
|
||||
time_t timestamp = 0;
|
||||
int ret;
|
||||
|
||||
ret = ceph_snap_gmt_strip_snapshot(handle,
|
||||
fsp->fsp_name,
|
||||
×tamp,
|
||||
NULL,
|
||||
0);
|
||||
if (ret < 0) {
|
||||
errno = -ret;
|
||||
return -1;
|
||||
}
|
||||
if (timestamp != 0) {
|
||||
errno = EROFS;
|
||||
return -1;
|
||||
}
|
||||
return SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
|
||||
}
|
||||
|
||||
static int ceph_snap_gmt_readlinkat(vfs_handle_struct *handle,
|
||||
const struct files_struct *dirfsp,
|
||||
const struct smb_filename *csmb_fname,
|
||||
@ -1465,6 +1488,7 @@ static struct vfs_fn_pointers ceph_snap_fns = {
|
||||
.fchmod_fn = ceph_snap_gmt_fchmod,
|
||||
.chdir_fn = ceph_snap_gmt_chdir,
|
||||
.ntimes_fn = ceph_snap_gmt_ntimes,
|
||||
.fntimes_fn = ceph_snap_gmt_fntimes,
|
||||
.readlinkat_fn = ceph_snap_gmt_readlinkat,
|
||||
.mknodat_fn = ceph_snap_gmt_mknodat,
|
||||
.realpath_fn = ceph_snap_gmt_realpath,
|
||||
|
Loading…
x
Reference in New Issue
Block a user