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

Anand Avati avati at redhat.com
Tue Aug 6 16:03:12 MDT 2013


Jeremy,
Your patch is better than Susanth's version (we don't need the extra 
dfree variable). I see from your patch that both dfree and dsize are in 
blocks, and not in bytes. Note that I copied the logic of disk_free 
handling frpm vfs_ceph. So copy'ing Sam (who is the author from git log) 
as the same issue is probably there in vfs_ceph as well (as of today's 
master HEAD of samba.git).

As for this patch -

Reviewed-by: Anand Avati <avati at redhat.com>

Thanks,
Avati

On 08/06/2013 02:55 PM, Christopher R. Hertel wrote:
> Thanks, Jeremy.
>
> Jose caught the discrepency earlier today and is also reworking the
> patch.  The originally submitted version applies against 3.6.
>
> Jose:  Please compare yours against Jeremy's.
>
> I will take a final review pass once the finished version is submitted.
>
> Thanks!
>
> Chris -)-----
>
> ----- Original Message -----
> From: "Jeremy Allison" <jra at samba.org>
> To: "Susant Kumar Palai" <spalai at redhat.com>
> Cc: samba-technical at lists.samba.org, "Raghavendra Talur" <rtalur at redhat.com>, "Vivek Agarwal" <vagarwal at redhat.com>, "Anand Avati" <avati at redhat.com>, "Christopher R. Hertel" <crh at redhat.com>
> Sent: Tuesday, August 6, 2013 4:46:10 PM
> Subject: Re: [PATCH]vfs_glusterfs : Volume capacity reported to Windows is incorrect
>
> On Mon, Aug 05, 2013 at 02:58:59PM +0530, 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;
>> --
>> 1.7.1
>
> This patch doesn't apply in the Samba tree. I think the following
> is what you want. Please confirm (and I'm +1 on the review
> if so).
>
> Jeremy.
>



More information about the samba-technical mailing list