posixovl+aufs again

2007-07-15 Thread Tomas M
Hello,
I'm still trying to fix the problem with posixovl+aufs.
I was debugging it with Jan Engelhardt (posixovl author) and he thinks 
it may be an aufs issue. The following script will make the error:

#!/bin/bash
mkdir dir1
touch dir1/something
mkdir union
mount.posixovl dir1
mount -t aufs -o br:dir1=rw aufs union

The mount call fails at test_add, line 377, because it thinks nlink=0.

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.
If we stat the dir1 and after then we mount aufs, it's OK.

Jan suggests the following:

  Try replacing aufs/opts.c,
  near line 422:
  err = path_lookup(add-path, lkup_dirflags, add-nd);
  use lkup_dirflags | LOOKUP_REVAL. (One would have to add it to
  more places like branch deletion)


Would you please consider Jan's suggestion?

Thank you very much

Tomas M
slax.org


-
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/


Re: posixovl+aufs again

2007-07-15 Thread sfjro

Tomas M:
 #!/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.


 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.
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?


 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.


 Jan suggests the following:
 
   Try replacing aufs/opts.c,
   near line 422:
   err = path_lookup(add-path, lkup_dirflags, add-nd);
   use lkup_dirflags | LOOKUP_REVAL. (One would have to add it to
   more places like branch deletion)
 
 
 Would you please consider Jan's suggestion?

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


Junjiro Okajima

-
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/


aufs Monday release

2007-07-15 Thread sfjro

o current problems
- setting inode number which was previously assigned (broken ino
  msg) (fixed).
- getdents(2) returns nothing. (fixed)
- cpup_wh_file() failure. (fixed)

o bugfix
- bugfix: cpup whiteout which was called #2 in last ci.

o news
- begin supporting linux-2.6.22
  + introduce lhash patch for 2.6.22.
  + no more ksize.patch.
- introduce new branch permission 'rr.'
  + rename au_is_ro() to au_is_rr().
- introduce new (re)mount option, 'verbose' family, currenlty for
  deleting a branch only.
- support MagicSysRq key for debugging.

o misc
- testing CONFIG_AUFS_ROBR.
- testing new mount option for 'refreshing opened file'
  + a generation to branch.
  + typedef for every generation data.
  + stop packing branch id and si generation.
  + return of 'coo' option.
- discard pre-allocated block for xino bitmap.
- add a note about unmouting ore remounting root aufs at shutdown
  time.
- minor optimization for handling udba=inotify.
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().
- print inotify info for inode.
- move lock subclasses from hinode.h to vfsub.h.


Junjiro Okajima

--

Index: Kconfig.in
- testing CONFIG_AUFS_ROBR.
- begin supporting linux-2.6.22
  + introduce lhash patch for 2.6.22.

Index: fs/aufs/aufs.h
- begin supporting linux-2.6.22
  + no more ksize.patch.

Index: fs/aufs/branch.c
- introduce new branch permission 'rr.'
  + rename au_is_ro() to au_is_rr().
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().
- testing new mount option for 'refreshing opened file'
  + a generation to branch.
  + typedef for every generation data.
- introduce new (re)mount option, 'verbose' family, currenlty for
  deleting a branch only.

Index: fs/aufs/branch.h
- begin supporting linux-2.6.22
  + introduce lhash patch for 2.6.22.
- testing new mount option for 'refreshing opened file'
  + a generation to branch.
- introduce new branch permission 'rr.'
  + rename au_is_ro() to au_is_rr().

Index: fs/aufs/cpup.c
Index: fs/aufs/f_op.c
Index: fs/aufs/i_op_ren.c
- minor optimization for handling udba=inotify.
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().

Index: fs/aufs/debug.c
- support MagicSysRq key for debugging.
- begin supporting linux-2.6.22
  + no more ksize.patch.
- print inotify info for inode.

Index: fs/aufs/debug.h
- support MagicSysRq key for debugging.
- introduce new (re)mount option, 'verbose' family, currenlty for
  deleting a branch only.

Index: fs/aufs/dentry.c
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().
- minor optimization for handling udba=inotify.
- testing new mount option for 'refreshing opened file'
  + typedef for every generation data.

Index: fs/aufs/dentry.h
Index: fs/aufs/file.h
Index: fs/aufs/inode.h
Index: fs/aufs/misc.h
Index: fs/aufs/sbinfo.c
- testing new mount option for 'refreshing opened file'
  + typedef for every generation data.

Index: fs/aufs/dir.c
Index: fs/aufs/i_op_add.c
Index: fs/aufs/plink.c
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().

Index: fs/aufs/export.c
- testing new mount option for 'refreshing opened file'
  + typedef for every generation data.
  + stop packing branch id and si generation.

Index: fs/aufs/file.c
- minor optimization for handling udba=inotify.
- testing new mount option for 'refreshing opened file'
  + return of 'coo' option.
  + typedef for every generation data.
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().
- bugfix: cpup whiteout which was called #2 in last ci.

Index: fs/aufs/hinode.h
- move lock subclasses to vfsub.h.
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().

Index: fs/aufs/i_op.c
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().
- minor optimization for handling udba=inotify.
- bugfix: cpup whiteout which was called #2 in last ci.

Index: fs/aufs/i_op_del.c
Index: fs/aufs/iinfo.c
- minor optimization for handling udba=inotify.

Index: fs/aufs/misc.c
- begin supporting linux-2.6.22
  + no more ksize.patch.
- rename hi_lock_XXX() to vfsub_i_lock_nested().
- rename hi_unlock() to vfsub_i_unlock().

Index: fs/aufs/module.c
- support MagicSysRq key for debugging.
- begin supporting linux-2.6.22
  + no more ksize.patch.

Index: fs/aufs/module.h
Index: fs/aufs/sysaufs.h
- support MagicSysRq key for debugging.

Index: fs/aufs/opts.c
- introduce new (re)mount option, 'verbose' family, currenlty for
  deleting a branch only.
- testing new mount option for 'refreshing opened file'
  + return of 'coo' option.
- introduce new branch permission 'rr.'
- minor optimization for handling udba=inotify.

Index: fs/aufs/opts.h
- testing new mount option for 'refreshing opened file'
  + return of 'coo' option.

Index: 

Re: posixovl+aufs again

2007-07-15 Thread Tomas M
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/