The Samba-Bugzilla – Attachment 11795 Details for
Bug 11681
wrong disk size reporting if statvfs block size is different than quota block size
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.3.next
dfqbs43.patch (text/plain), 1.30 KB, created by
Uri Simchoni
on 2016-01-28 05:51:23 UTC
(
hide
)
Description:
git-am fix for 4.3.next
Filename:
MIME Type:
Creator:
Uri Simchoni
Created:
2016-01-28 05:51:23 UTC
Size:
1.30 KB
patch
obsolete
>From e9625a88f3ab62e3b102e4e99f3e49cdd767be38 Mon Sep 17 00:00:00 2001 >From: Uri Simchoni <uri@samba.org> >Date: Tue, 19 Jan 2016 14:57:16 +0200 >Subject: [PATCH] smbd: show correct disk size for different quota and dfree > block sizes > >When file system stats (VFS disk_free_fn) and quota (VFS get_quota_fn) >return different block sizes, normalize values before comparing. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11681 > >Signed-off-by: Uri Simchoni <uri@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 67c89715d00abc588239d8220f09cf51a58db05a) >--- > source3/smbd/dfree.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c >index 32a3a69..0c38837 100644 >--- a/source3/smbd/dfree.c >+++ b/source3/smbd/dfree.c >@@ -123,7 +123,14 @@ uint64_t sys_disk_free(connection_struct *conn, const char *path, > } > > if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) { >- (*bsize) = bsize_q; >+ uint64_t min_bsize = MIN(*bsize, bsize_q); >+ >+ (*dfree) = (*dfree) * (*bsize) / min_bsize; >+ (*dsize) = (*dsize) * (*bsize) / min_bsize; >+ dfree_q = dfree_q * bsize_q / min_bsize; >+ dsize_q = dsize_q * bsize_q / min_bsize; >+ >+ (*bsize) = min_bsize; > (*dfree) = MIN(*dfree,dfree_q); > (*dsize) = MIN(*dsize,dsize_q); > } >-- >2.4.3 >
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:
jra
:
review+
Actions:
View
Attachments on
bug 11681
:
11794
| 11795