Preparation patch for bugfix-sums-with-different-block-size.patch
A new function au_add_muldiv_till_max which works like au_add_till_max but adds
the result of b*mul/div instead of just b.
NEED SOME HELP HERE: the function is not overflow-safe yet. I think there must
be such functions in the ke
If aufs is mounted in sum mode, but the source file systems have different
block sizes, the result of the statfs is the sum of all block counts which does
not make sense. This patch corrects this problem by normalizing the block
counts to the same block size and then adds them.
Index: aufs3-stan
There were two problems:
1) au_add_till_max returns ULLONG_MAX if b==0
Reason: in this case, a is not bigger then old but equal. This is the reason
for the very big values which confuse df.
2) If aufs is mounted in sum mode, but the source file systems have different
block sizes, the result o
If argument b is set to 0, au_add_till_max returns the value of constant
ULLONG_MAX. In this case, old is equal to a and the condition fails.
Index: aufs3-standalone.git/fs/aufs/super.c
===
--- aufs3-standalone.git.orig/fs/aufs/super.
quilt according to a tutorial. unfortunately, I got a bounce
message from the Mail list. That's the reason why I sent it twice (in
different formats).
Daniel Alder
--
Virtualization & Cloud Management Using Cap
>> 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)=22
the block
counts to the same block size and then adds them.
Signed-off-by: Daniel Alder
Index: aufs3-standalone.git/fs/aufs/super.c
===
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -305,7 +305,18 @@ static u64 au_add_till_max(u64 a
Yes, I was confused. But now I think I understand.
Btw: your english is not worse than mine..
Here we go:
Signed-off-by: Daniel Alder
Index: aufs/fs/aufs/super.c
===
--- aufs.orig/fs/aufs/super.c 2012-03-20 11:00
Hello Preeti
If you do the same by using Fanotify, you don't even have to touch the
kernel and your program can run completely in user space.
Daniel Alder
On 21.04.2012 09:06, sf...@users.sourceforge.net wrote:
>
> Hello Preeti,
>
> Preeti Sharma:
>> I am new to auf