>> The sum is either >> >> (7*131072/131072 + 5*4096/131072 + ...) if reported bsize is 131072 >> (7*131072/4096 + 5*4096/4096 + ...) if reported bsize is 4096 > > No. > We don't have to calculate it by the unit of byte. The unit should be > block. So the sum should be either (7+1)=8 or (7*32+5)=229. > Don't you think so?
The unit byte was only an intermediate value. but if you take 256 instead it is just more complicated: if reported bsize is 131072: (7*(131072/512) + 5*(4096/512) + ...) / (131072/512) maybe we could fix bsize to a constant 512. in that case it's just: (7*(131072/512) + 5*(4096/512) + ...) or as formula: sum of all ( buf->blocks * ( buf->bsize / 512 ) ) Is that what you mean? In the aggregation loop you have to normalize to a known unit, which will also be the reported bsize. This normalization needs both multiplication and division. bsize can be any power of 2, either one of the source file systems or a completely different one like a constant 512. >> 1/3 was not manually edited. Why do you think it is? > > If you look at the patch 1/3 you sent again, you would notice two > issues. > - last two lines don't contain the space at the top of the line. > - diff(1) produces 3 lines after the change (by default?) and patch(1) > expects the same amount of lines. But the 1/3 has only two. I have to check that at home. I am surprised to hear that.. Daniel ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/