git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25bad32
)
s3: VFS: ceph: Replace the lseek/write ftruncate extend with pwrite.
author
Jeremy Allison
<jra@samba.org>
Wed, 2 May 2018 23:47:22 +0000
(16:47 -0700)
committer
Ralph Boehme
<slow@samba.org>
Fri, 4 May 2018 20:34:25 +0000
(22:34 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_ceph.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_ceph.c
b/source3/modules/vfs_ceph.c
index 2f50aa67c57aa0ef42dc9644852c014ade988fc6..cfb887d4e3cb31ac7c127fa47a4a12b2436ffa4d 100644
(file)
--- a/
source3/modules/vfs_ceph.c
+++ b/
source3/modules/vfs_ceph.c
@@
-1113,15
+1113,10
@@
static int cephwrap_ftruncate(struct vfs_handle_struct *handle, files_struct *fs
goto done;
}
- if (SMB_VFS_LSEEK(fsp, len-1, SEEK_SET) != len -1)
- goto done;
-
- if (SMB_VFS_WRITE(fsp, &c, 1)!=1)
+ if (SMB_VFS_PWRITE(fsp, &c, 1, len-1)!=1) {
goto done;
+ }
- /* Seek to where we were */
- if (SMB_VFS_LSEEK(fsp, currpos, SEEK_SET) != currpos)
- goto done;
result = 0;
done: