The Samba-Bugzilla – Attachment 9356 Details for
Bug 10068
glusterfs volume capacity reported to Windows is incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch with cherry-pick and bug number information
0001-VFS-plugin-was-sending-the-actual-size-of-the-volume.patch (text/plain), 1.75 KB, created by
Björn Jacke
on 2013-10-31 22:28:37 UTC
(
hide
)
Description:
patch with cherry-pick and bug number information
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2013-10-31 22:28:37 UTC
Size:
1.75 KB
patch
obsolete
>From d7cce0be85ca3ba441df0e67f9e669198fc137f0 Mon Sep 17 00:00:00 2001 >From: Susant Kumar Palai <spalai@redhat.com> >Date: Tue, 6 Aug 2013 14:45:06 -0700 >Subject: [PATCH] VFS plugin was sending the actual size of the volume instead > of the total number of block units because of which windows was getting the > wrong volume capacity. > >Fixes bug #10068 > >Signed-off-by: Susant Kumar Palai <spalai@redhat.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Christopher R. Hertel <crh@samba.org> >(cherry picked from commit a973b1ce7a94bd3f11432a6f32b9d9b13b868dfb) >--- > source3/modules/vfs_glusterfs.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > >diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c >index 1323e0e..af8d5b7 100644 >--- a/source3/modules/vfs_glusterfs.c >+++ b/source3/modules/vfs_glusterfs.c >@@ -301,7 +301,6 @@ static uint64_t vfs_gluster_disk_free(struct vfs_handle_struct *handle, > uint64_t *dsize_p) > { > struct statvfs statvfs = { 0, }; >- uint64_t dfree = 0; > int ret; > > ret = glfs_statvfs(handle->data, path, &statvfs); >@@ -309,19 +308,17 @@ static uint64_t vfs_gluster_disk_free(struct vfs_handle_struct *handle, > return -1; > } > >- dfree = statvfs.f_bsize * statvfs.f_bavail; >- > if (bsize_p != NULL) { >- *bsize_p = statvfs.f_bsize; >+ *bsize_p = (uint64_t)statvfs.f_bsize; /* Block size */ > } > if (dfree_p != NULL) { >- *dfree_p = dfree; >+ *dfree_p = (uint64_t)statvfs.f_bavail; /* Available Block units */ > } > if (dsize_p != NULL) { >- *dsize_p = statvfs.f_bsize * statvfs.f_blocks; >+ *dsize_p = (uint64_t)statvfs.f_blocks; /* Total Block units */ > } > >- return dfree; >+ return (uint64_t)statvfs.f_bavail; > } > > static int vfs_gluster_get_quota(struct vfs_handle_struct *handle, >-- >1.8.3.4 >
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
Flags:
bjacke
:
review+
Actions:
View
Attachments on
bug 10068
:
9112
| 9356