smbd/quotas.c, line 546: if (D.dqb_curblocks == D.dqb_curblocks == 1) *bsize = 512; this will always set the returned bsize to 512. Our EMC system, for example, returns a block size 8192 so all user quotas are underreported incorrectly by a factor of 16. Logs, etc. are available on request. Here's the essential extract: [2005/11/18 11:28:27, 10] smbd/quotas.c:nfs_quotas(541) nfs_quotas: Let`s look at D a bit closer... status "1" bsize "8192" active? "1" bhard "625000" bsoft "625000" curb "315573" [2005/11/18 11:28:27, 5] smbd/quotas.c:nfs_quotas(563) nfs_quotas: For path "/hpfs/data/homefs/tzz" returning bsize 512, dfree 309427, dsize 625000 Thanks Ted
Exactly the same issue on FreeBSD 4.10-RELEASE-p2 Samba 3.0.20b [2005/12/20 16:35:42, 10] smbd/quotas.c:nfs_quotas(1077) nfs_quotas: Let`s look at D a bit closer... status "1" bsize "4096" active? "1" bhard "4718592" bsoft "4718592" curb "1826663" [2005/12/20 16:35:42, 5] smbd/quotas.c:nfs_quotas(1104) nfs_quotas: For path "/vol/vol0/home" returning bsize 512, dfree 2891929, dsize 4718592 I commented out the block mentioned and rebuilt, restarted. Quotas now report correctly.
The same error occurs in smbd/quotas.c twice, once at 550 and again at line 1093 ( 3.0.24) source/smbd/quotas.c: missing logical operator near line 550 if (D.dqb_curblocks == D.dqb_curblocks == 1) source/smbd/quotas.c: missing logical operator near line 1093 if (D.dqb_curblocks == D.dqb_curblocks == 1)
Created attachment 7862 [details] patch for master to fix this resetting the block size makes no sense. In master this only affects Solaris as the other platforms use sysquota's nfs quota code now which doesn't do such stuff.
(In reply to comment #3) > Created attachment 7862 [details] > patch for master to fix this > > resetting the block size makes no sense. In master this only affects Solaris as > the other platforms use sysquota's nfs quota code now which doesn't do such > stuff. Hm, not certain: a couple of other implementations do *bsize = DEV_BSIZE; here ore something equivalent. If this is wrong (in the sunos path), then possibly other implementations are wrong as well.
Re-assigning to Björn for commenting.
the customer said it works for him and to me this looks very sane. I think Michael mainly is not certain if other quota methods are broken or not if I read the comment right :-). (And indeed, other quota methods have issues with the base block vs. quota block size with certain filesystems, but that's another not jet existing bug report, this should not be discussed here ;-))
(In reply to comment #6) > the customer said it works for him and to me this looks very sane. I think > Michael mainly is not certain if other quota methods are broken or not if I > read the comment right :-). (And indeed, other quota methods have issues with > the base block vs. quota block size with certain filesystems, but that's > another not jet existing bug report, this should not be discussed here ;-)) I think the patch looks fine.
Pushed to v3-6-test (and verified that it's already included in v4-0-test). Closing out bug report. Thanks!