The Samba-Bugzilla – Attachment 5853 Details for
Bug 6762
ctdb on gpfs error with MS Office
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Was needed for 3.5
SMB-GPFS-patch.txt (text/plain), 3.16 KB, created by
martin.vogt
on 2010-07-20 04:02:02 UTC
(
hide
)
Description:
Was needed for 3.5
Filename:
MIME Type:
Creator:
martin.vogt
Created:
2010-07-20 04:02:02 UTC
Size:
3.16 KB
patch
obsolete
> >--- source3/modules/gpfs.c.orig 2010-06-19 10:17:18.000000000 +0200 >+++ source3/modules/gpfs.c 2010-06-19 10:21:54.000000000 +0200 >@@ -28,6 +28,7 @@ > static bool gpfs_leases; > static bool gpfs_getrealfilename; > static bool gpfs_winattr; >+static bool gpfs_do_ftruncate; > > static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny); > static int (*gpfs_set_lease_fn)(int fd, unsigned int leaseType); >@@ -38,7 +39,7 @@ > static int (*gpfs_set_winattrs_path_fn)(char *pathname, int flags, struct gpfs_winattr *attrs); > static int (*gpfs_get_winattrs_path_fn)(char *pathname, struct gpfs_winattr *attrs); > static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs); >- >+static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length); > > bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, > uint32 share_access) >@@ -141,6 +142,16 @@ > return gpfs_putacl_fn(pathname, flags, acl); > } > >+int smbd_gpfs_ftrunctate(int fd, gpfs_off64_t length) >+{ >+ if (!gpfs_do_ftruncate || (gpfs_ftruncate_fn == NULL)) { >+ errno = ENOSYS; >+ return -1; >+ } >+ >+ return gpfs_ftruncate_fn(fd, length); >+} >+ > int smbd_gpfs_get_realfilename_path(char *pathname, char *filenamep, > int *buflen) > { >@@ -247,7 +258,7 @@ > init_gpfs_function(&gpfs_get_winattrs_path_fn,"gpfs_get_winattrs_path"); > init_gpfs_function(&gpfs_set_winattrs_path_fn,"gpfs_set_winattrs_path"); > init_gpfs_function(&gpfs_get_winattrs_fn,"gpfs_get_winattrs"); >- >+ init_gpfs_function(&gpfs_ftruncate_fn,"gpfs_ftruncate"); > > gpfs_share_modes = lp_parm_bool(-1, "gpfs", "sharemodes", True); > gpfs_leases = lp_parm_bool(-1, "gpfs", "leases", True); >@@ -255,6 +266,8 @@ > True); > gpfs_winattr = lp_parm_bool(-1, "gpfs", "winattr", False); > >+ gpfs_do_ftruncate = lp_parm_bool(-1, "gpfs", "ftruncate", True); >+ > return; > } > >--- source3/modules/vfs_gpfs.c.orig 2010-06-19 10:17:31.000000000 +0200 >+++ source3/modules/vfs_gpfs.c 2010-06-19 10:31:54.000000000 +0200 >@@ -1103,6 +1103,19 @@ > > } > >+static int vfs_gpfs_ftruncate(struct vfs_handle_struct *handle, >+ struct files_struct *fsp, >+ SMB_OFF_T len) >+{ >+ int result; >+ >+ result = smbd_gpfs_ftrunctate(fsp->fh->fd, len); >+ if ((result == -1) && (errno == ENOSYS)) { >+ return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len); >+ } >+ return result; >+} >+ > static struct vfs_fn_pointers vfs_gpfs_fns = { > .kernel_flock = vfs_gpfs_kernel_flock, > .linux_setlease = vfs_gpfs_setlease, >@@ -1124,6 +1137,7 @@ > .fstat = vfs_gpfs_fstat, > .lstat = vfs_gpfs_lstat, > .ntimes = vfs_gpfs_ntimes, >+ .ftruncate = vfs_gpfs_ftruncate, > }; > > NTSTATUS vfs_gpfs_init(void); >--- source3/modules/vfs_gpfs.h.orig 2010-06-19 10:17:37.000000000 +0200 >+++ source3/modules/vfs_gpfs.h 2010-06-19 10:32:40.000000000 +0200 >@@ -34,4 +34,5 @@ > int smbd_fget_gpfs_winattrs(int fd, struct gpfs_winattr *attrs); > int get_gpfs_winattrs(char * pathname,struct gpfs_winattr *attrs); > int set_gpfs_winattrs(char * pathname,int flags,struct gpfs_winattr *attrs); >+int smbd_gpfs_ftrunctate(int fd, gpfs_off64_t length); > void init_gpfs(void);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6762
: 5853