[PATCH]vfs_glusterfs : Volume capacity reported to Windows is incorrect

Susant Kumar Palai spalai at redhat.com
Mon Aug 5 03:35:53 MDT 2013


On 05/08/13 14:58, Susant Kumar Palai wrote:
>
> 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.
>
> Signed-off-by: susant <spalai at redhat.com>
> ---
>   src/vfs_glusterfs.c |    8 ++++----
>   1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/vfs_glusterfs.c b/src/vfs_glusterfs.c
> index aa07733..444100b 100644
> --- a/src/vfs_glusterfs.c
> +++ b/src/vfs_glusterfs.c
> @@ -307,16 +307,16 @@ vfs_gluster_disk_free(struct vfs_handle_struct
> *handle, const char *path,
>                  return -1;
>          }
>
> -       dfree = statvfs.f_bsize * statvfs.f_bavail;
> +       dfree = statvfs.f_bavail;
>
>          if (bsize_p) {
> -               *bsize_p = statvfs.f_bsize;
> +               *bsize_p = statvfs.f_bsize; /*Block size*/
>          }
>          if (dfree_p) {
> -               *dfree_p = dfree;
> +               *dfree_p = dfree; /*Available Block units*/
>          }
>          if (dsize_p) {
> -               *dsize_p = statvfs.f_bsize * statvfs.f_blocks;
> +               *dsize_p = statvfs.f_blocks; /*Total Block units*/
>          }
>
>          return dfree;
Fix for Bug Id : 10068

Thanks !
Susant Kumar Palai | Redhat Storage Developer | Bangalore


More information about the samba-technical mailing list