> On Tue, Jun 07, 2016 at 01:36:52PM -0400, Thomas Schulz wrote:
> > Running Samba 4.3.4 on a Solaris 10 i386 box and Samba 4.4.3 on a
> > Solaris 10 sparc box.
> > I have not looked at the logs for awhile. Just checking now and I see
> > many of the following on both systems.
> >
> > [2016/06/01 11:22:04.402945, 0]
../source3/smbd/dfree.c:139(sys_disk_free)
> > WARNING: dfree is broken on this system
> >
> > What could be the cause of this?
>
> The code that creates this is:
>
> if ((*dsize)<1) {
> if (!dfree_broken) {
> DEBUG(0,("WARNING: dfree is broken on this
system\n"));
> dfree_broken=true;
> }
>
>
> Where dsize is calculated as:
>
> if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_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);
> }
>
> Can you add DEBUG statements to see what is
> going on in Solaris 10 here ?
I added debuging as follows:
--- dfree.c.orig 2016-02-09 04:40:29.000000000 -0500
+++ dfree.c 2016-06-08 11:48:05.267240000 -0400
@@ -121,12 +121,19 @@
DBG_ERR("VFS disk_free failed. Error was : %s\n",
strerror(errno));
return (uint64_t)-1;
}
+ if (!dfree_broken) {
+ DEBUG (0, ("dsize %u bsize %u dfree %u \n", (*dsize),
(*bsize), (*dfree) ));
+ }
+
if (disk_quotas(conn, path, &bsize_q, &dfree_q, &dsize_q)) {
uint64_t min_bsize = MIN(*bsize, bsize_q);
+ if (!dfree_broken) {
+ DEBUG (0, ("dsize %u bsize %u dfree %u dsize_q %u
bsize_q %u dfree_q %u \n", (*dsize), (*bsize), (*dfree), dsize_q, bsize_q,
dfree_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;
So far the error has not been logged. I am getting output such as:
[2016/06/08 11:56:52.493274, 0] ../source3/smbd/dfree.c:127(sys_disk_free)
dsize 0 bsize 1143062772 dfree 0
[2016/06/08 12:01:50.331024, 0] ../source3/smbd/dfree.c:127(sys_disk_free)
dsize 0 bsize 1795693380 dfree 0
I will wait until the error is logged and then see what things look like.
Perhaps degugging statements in different locations will be needed.
Tom Schulz
Applied Dynamics Intl.
schulz at adi.com