Hello,
thank you for your reply.

>> #!/bin/bash
>> mkdir dir1
>> touch dir1/something
>> mkdir union
>> mount.posixovl dir1
>> mount -t aufs -o br:dir1=rw aufs union
> 
> I guess you can succeed if you use dir1 directly without mount.posixovl.

yes I can.

>> If we run 'mount.posixovl' with -d parameter (debug), we can see that 
>> nothing access the mounted directory dir1 at all during the aufs mount, 
>>   GETATTR is not called, so it seems aufs can not know nlink properly.
> 
> Getattr is totally different from lookup.
> Every filesystem should return correct inode as a result of lookup (when
> the target file exists).
> You should not confuse lookup with getattr.

I didn't say it properly, I apologize. I was trying to say: "neither 
getattr nor anything else is called at all, the debug is entirely empty, 
the FUSE filesystem is untouched during aufs mount."

This is not just a posixovl-problem. For example, NTFS-3G behaves the 
same - if you simply mount it and then try to add the mountpoint to aufs 
as a branch, it's not found by test_add().

Finally I believe it's perhaps a general problem of all fuse 
filesystems, or (the most likely) a bug in fuse, or a bug in aufs.

> If you want to change the value of nlink, I guess what you should
> override is lookup instead of getattr. Why don't you use
> fuse_lowlevel_ops.lookup instead of fuse_operations?

I know almost nothing about FUSE filesystems, I'm sorry.
I'll forward this suggestion to Jan.

>> If we stat the dir1 and after then we mount aufs, it's OK.
> 
> If customizing lookup is hard for you, to issue stat(2) before using
> posixovl as an aufs branch is the best solution.

Yes this will fix my problem and I'll have to do this since now, unless 
the primary source of this problem is not found/fixed.

 > Do you mean LOOKUP_REVAL calls fuse getattr?
 > I don't think it is correct.
 > Did you try it actually by yourself?

I tested it myself and for some reason I believed it fixed the problem. 
But I'm testing it again and it does nothing different at all. I'm sorry 
for suggesting this as it seems it doesn't help anyway.


Tomas M


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Reply via email to