Re: aufs max branches

2007-02-13 Thread sfjro

Tomas M:
 and then I add branches one by one, by using
 
 mount -o remount,add:1:/mnt/images/image1 aufs /union
 
 for example. This works OK and branches are added to the union, but 
 remounting the union ro causes the oops I sent you. Do you still agree 
 it's a problem of the lenght of mount arguments?

I think so.
Will you try this patch?

Junjiro Okajima

Index: fs/aufs/opts.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/opts.c,v
retrieving revision 1.24
diff -u -p -r1.24 opts.c
--- fs/aufs/opts.c  12 Feb 2007 02:57:13 -  1.24
+++ fs/aufs/opts.c  13 Feb 2007 12:04:21 -
@@ -633,9 +633,12 @@ int parse_opts(struct super_block *sb, c
Err(unknown option %s\n, opt_str);
break;
}
+
if (!err  !skipped) {
if (unlikely(++opt  opt_tail)) {
err = -E2BIG;
+   opt--;
+   opt-type = Opt_tail;
break;
}
opt-type = Opt_tail;

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642


Re: aufs max branches

2007-02-13 Thread sfjro

Tomas M:
 I tested the patch. No difference, remount,ro causes oops in 
 kernel/exit.c:860

How about BUG: ... NULL pointer ...?
Your gif file showed me it before BUG: at kernel/exit.c:860.

Junjiro Okajima

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642


Re: aufs max branches

2007-02-13 Thread sfjro

Tomas M:
 It was in Linux Live CD all the time, using 'mount' command from 
 busybox. Now I tried it in a normal Linux (installed) and it doesn't 
 segfault, remount simply exits with E2BIG (Argument list too long).

Thi is the effect of the patch I sent.
If you used the un-patched aufs, it would not return the error and cause
a problem.


 I noticed the line in /etc/mtab (mount arguments) can't be longer than 
 4096 characters. This is 2^12 I guess.

Yes, it is the limitation of mount and /proc/mounts. It is the size of a
memory page.
And aufs will try sysfs as you suggested.

--

 Now I decided to skip unionctl at all, and use
 
mount -n -o remount,add:1:/new/branch=ro aufs /union
:::
 Remount segfaults the same in Live CD. BUT! I am unable to reproduce the 
 problem in my installed Linux, even if using busybox's mount. So it it 
 very strange :)

Please let me make sure.
- you did it on your hdd-installed Linux, instead of Live CD
- the aufs patch was applied
- mount.aufs was not installed
- you executed busybox mount -n -o remount,add:1:/new/branch=ro aufs /union
- the busybox aborted by segfault

Which problem do you wrote as unable to reproduce?

--

 So here is how did I fix it:
 - I call:
 
  mount -o remount,ro aufs .

Well, probably it is a busybox issue.
But aufs should work correctly which includes the expected error.
Do you think aufs has no problem anymore?
I am confused a little...


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: OK, I give..Help?

2007-02-13 Thread sfjro

Chris Furlough:
 What I'd like to be able to do, is to mount something over the whole / 
 mount point.

Then you did it. And you see everything under /root/jukebox_cddb/aufs,
except /proc, /sys, /dev/pts and /dev/shm, don't you?
Is it enough for you?

Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs on a 2.4 kernel ?

2007-02-14 Thread sfjro

Flemming Madsen:
 Is anybody by any chance contemplating a backport of aufs to the 2.4 kernel.
 Would be much appreciated for use in embedded systems.

Unfortunately, I don't have such machine and disk space.
If anybody start backporting, I will try answering the questions.
I forgot many things in 2.4 since it was years ago when I touched it
last time.
I guess it is possible to backport aufs if all the features are not
necessary. i.e. the limited or basic features only.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: AUFS Kernel module crashes

2007-02-16 Thread sfjro

Marty Rosenberg:
 so it seems like aufs gets extremely unstable when running with my setup.  
 After attempting to run a du operation or two, the kernel module crashes.  
 I'm not sure if it occurs before the module crash, but other actions such as
 ls will hang.  Other people using the system have said that they can still 
 run ls in subdirectories, however I have not found this to be true.  In case 
 it helps, there are approximately 773,950 files total that are in all of the 
 source directories.

Hello Marty,
Thank you for your report, including /proc/mounts and others.

Since vdir.c:603 is checking an internal lock, aufs seems to be totally
broken. I will review aufs code.

Do you know what is the difference between you and other people using
the system? How about the compiler's version? Are you using the same
compiler with other people? Or kernel configuration?


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: OK, I give..Help?

2007-02-16 Thread sfjro

Chris Furlough:
  Then you did it. And you see everything under /root/jukebox_cddb/aufs,
  except /proc, /sys, /dev/pts and /dev/shm, don't you?
  Is it enough for you?
 
 Either I don't understand aufs, or it's not working.  After the above mount, 
 I went to /root, and created a file, and threw some text into it.  Now, in 
 theory, if I understand correctly, this file should ONLY exist virtually, as 
 in only in the AUFS.  So, I reboot, and when it comes up, the file is there, 
 and I can cat it normally.  Is the / dir NOT read-only?  Is this file 
 existing in AUFS across boots?

You went to /root, it is out of aufs.
Your aufs is /root/jukebox_cddb/aufs, isn't it?
Your newly created file is saved in /root.

I am afraid you don't understand aufs or mount.
Probably, you need to try LiveCD, for example SLAX.
Basically, it doesn't save the created files in your hard drive.
Also, I recommend you to read the manual of chroot(8).


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: hm weird behavior of unionctl

2007-02-18 Thread sfjro

Patrick:
 Heh, will do . but is that behavior of unionctl supposed to be like that? :)

Of course, no it isn't.
And Tomas M suggested you one of the way to research the problem.
Thank you Tomas.

Additionally, there is a description about the time of remount. When you
have lots of inodes and dentries cached, it may take a long time. It
depends upon your operations before remount, and the amount of your
system memory.

In your case, in order to know your situation, I'd like to ask you
questions.
- How did you mount your aufs?
- How is /proc/mounts just before you remount or unionctl? Will you show
  us?
- Have you ever read the manual of mount(8), or some documentations
  about /etc/mtab and /proc/mounts? Since it must be fundamental
  knowledge when you use linux or unix.

And,
- it is recommended to use mount -o remount,... instead of unionctl.
- mount.aufs is not supposed to be executed manually. use mount(8).
- if you use -n option to your mount(8), you will never get the entry in
  your mount listing by mount(8).

Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: nwkq=N

2007-02-19 Thread sfjro

Tomas M:
 I still can't find it.
 In aufs.in.5 there is written:
 default value is .

The manual page, aufs.5 is built by make.
Please make it.

Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: unionctl issue

2007-02-20 Thread sfjro

Fernando A. P. Gomes:
 [EMAIL PROTECTED] aufs]# 
 unionctl /mnt/aufs/filesystem --add --before /mnt/aufs/dir1 --mode ro /etc
 
 [EMAIL PROTECTED] aufs]# unionctl /mnt/aufs/filesystem --list
 /etc (r--)
 /mnt/aufs/.changes (rw-)
 /mnt/aufs/dir1 (r--)
 
 /etc goes two position above dir1, when should go only one.

Thank you very much.
I will include this patch in next Monday release.

Junjiro Okajima

--

Index: util/unionctl
===
RCS file: /cvsroot/aufs/aufs/util/unionctl,v
retrieving revision 1.18
diff -u -p -r1.18 unionctl
--- util/unionctl   19 Feb 2007 03:26:18 -  1.18
+++ util/unionctl   20 Feb 2007 13:12:20 -
@@ -129,7 +129,6 @@ do_add()
do
case $1 in
--before)   bindex=`find_bindex $2`
-   bindex=`expr $bindex - 1` || :
;;
--after)bindex=`find_bindex $2`
bindex=`expr $bindex + 1` || :

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs BUG

2007-02-22 Thread sfjro

Hi,

Fernando A. P. Gomes:
 
 What did your rc script do?
 
 Nothing anormal, it's in attach.

I will wait for your next mail. :-)


  Are there something about mounting, module loading/unloading, chroot(2)
  and operating around /var/log/squid?
 
 Aufs module is builtin I can't loading/unloading. The only operation 
 around /var/log/squid is /etc/init.d/squid start (open log files 
 in /var/log/squid).

How about another modules?
I want to make sure that all necessary modules are loaded correctly, and
there is no kernel messages.


 What you mean with chroot? Is I do a chroot and a pivot_root.

What I want to know is whether you did chroot(2) in your rc script, or
not.
Do you mean that you did both?


  And after your rc script, is the aufs entry in /proc/mounts correct?
 
 Yes

Will you show me your /proc/mounts?


  Is /cdrom/tmpdir/3 working correctly, how about ls(1) to it? Which type
  is its filesystem?
 
 It's a cramfs filesystem mountend looped and unionctl to aufs.
 
 I realize that the bug is in more locations that de /var/log, in /etc I've 
 the 
 same problem with some files ( ex: /etc/wvdial.conf ).

Yes, I read your another mails.
Your aufs seems to handling ghosts of inodes. They seems to be gone.
But aufs believes they are still existing, and shows you almost NULL
data or garbages.

So you can ls(1) to your branches directly, and it succeeded, right?
Then, how about ls to your aufs after direct ls?


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: hm weird behavior of unionctl

2007-02-22 Thread sfjro

Patrick:
  Do you mean that 'mount -o remout,mod:/real_root=rw /your/aufs' returns
  an error? What did it say?
:::
 mount -o remount,mod:/real_root=rw /
 mount: / not mounted already, or bad option

Are there any aufs messages left?


 I think that is logical since neither /real_root nor /union exists or is 

Currently I don't agree.
Will you try strace, and show me the output?


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: hm weird behavior of unionctl

2007-02-22 Thread sfjro

Patrick:
 logs etc. to ram .. but sometimes I need modifications to be done 
 permanently, thus infact I would need that.
 But isnt there another way? e.g. copying / mount-moving/binding 
 real_root to the union or something like that?

I think it depends on your initramfs.
As long as you use initramfs, you cannot see /real_root, can you?
If aufs introduces a new option which enables changeing permission mode
of a hidden branch, you cannot write to it directly.

But here is an idea, which might be rather complex operation.
- introduce some mount options,
+ idel:branch index
  removes a branch specified by index, instead of path.
+ imod:branch index:new permission
  modifies a permission mode of the branch specified by index, instead 
of path.
+ imove:old branch index:new branch index
  re-order the branches, from old to new. it might be dangerous.
+ coo
  copyup on open
+ nocoo
  disables coo
- mount -o remount,imod:1:rw,imove:1:0,imod:1:ro,coo /your/aufs
- head -1 /your/aufs/whatever/you/want/to/copyup
- mount -o remount,imod:1:rw,imove:1:0,imod:1:ro,nocoo /your/aufs

Is that what you need?


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: Can't compile aufs patched 2.6.20-rc1 kernel cleanly

2007-02-28 Thread sfjro

Tapani_Rikknen:
 This must be my ignorance but compiling new kernel (in a debian way with =
 
 make-kpkg) with aufs patch gives me following error messages:
:::
 include/linux/aufs_type.h:40:2: error: #error unknown =
 
 CONFIG_AUFS_BRANCH_MAX value
 fs/aufs/module.c:292:5: warning: AUFS_BRANCH_MAX is not defined

Assuming your 'aufs patch' means 'aufs CVS tree on sourceforge', how did
you configure/compile it? Just 'make -f local.mk'?


 (didn't get any extra info with 'aufs debugging feature' enabled)

Do you mean that you enabled CONFIG_AUFS_DEBUG? It is for run-time, not
compile-time.


 My original problem is the same as someone has described in the message:
 http://lists.debian.org/debian-knoppix/2007/02/msg00014.html
 And in my own message:
 http://knoppix.net/forum/viewtopic.php?t=3D26812

Will you try ls(1) or something just after mounting aufs, in order to
make sure,
- aufs is loaded correctly
- aufs is mounted correctly
- you can access mounted aufs correctly
- are there any messages left in your syslog or something?

I read both of the URLs and know that you did 'make -f local.mk.'
On my test environment, I use plain linux-2.6.20. I will try
linux-2.6.21-rc1 in a few weeks.


 I can compile aufs module fine but it don't work in my remastered =
 
 Knoppix 5.1.1  (giving segmentation fault message during boot process or =

Which process aborts with segmentation fault?


 I would prefer patching kernel tree directly with aufs patch than =
 
 compiling it afterwards  (make -f local.mk), if it could be possible.

Did you try 'make -f locak.mk kconfig'?


 -Unionfs is going to be included on vanilla 2.6.21 from kernel.org =
 
 (if I'm right); what about aufs?

Currently I have no such plan.


 -Can aufs be used with realtime preemption kernel =
 
 (http://people.redhat.com/mingo/realtime-preempt/)? Should aufs work on =
 
 liveCD with -rt patched kernel (I never succeeded with unionfs)?

Although I have never tried this patch, I will try someday, probably far
future...


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs BUG

2007-02-28 Thread sfjro

Tomas M:
 But it seems to me like Fernando is using switch_root, which is used if 
 you're using initramfs. Initramfs is something very different from 
:::
Fernando wrote that he uses initrd. I don't know he switched to
initramfs...

Thank you for your follow-up and pointing out.
Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs for disaster recovery

2007-03-01 Thread sfjro

Hello Ramy,

Ramy M. Hassan :
 Unfortunatly, I am not able to use the current version of aufs for this 
 purpose, because export via NFS is not yet supported by NFS. I see it in 
 the list of (current work). Junjiro, could you please let me know when 
 we should expect this feature in aufs ?

Currently I have finished implementing it and testing now.
I sent a patch to an aufs user since he requested this feature
strongly and propsed as tester. So I guess he and I are testing it now.
Will you join this test? Of course, it is a test and I never recommend
you to use it for production use.


 Is there any tool that allows merging the two branches in the upper 
 read-write branch, so that we can safly remove the corrupted branch to 
 be reformatted ? I know it should be easy to implement (maybe the 
 snapmerge script that comes with unionfs can be used).

Unfortunately, I don't have such tool currently. Also I think that it is
worth to try the snapmerge script in unionfs.

While I am not sure, here is an idea.

# mount -t aufs -o br:/rw:/ro none /aufs
(some works)
# mount -o remount,prepend:/new_rw,xino=/new_rw/xino,mod:rw=ro /aufs
(continue working)
# mount -t aufs -o ro,br:/rw=ro:/ro none /aufs2
# cp -ru /aufs2 /aufs
# umount /aufs2


 Our application uses O_DIRECT (as a compile time flag) for performance 
 reasons. We can disable O_DIRECT to be able to use aufs, although it 
 would be very nice if aufs supported O_DIRECT (Junjiro was asking if 
 that was neccessary).

Ok.
I will append it to my work-list. I am afraid reacing it will take a
longer time since some aufs users have some troubles now. You might know
it if you read this ML.
If you have a simple test case for O_DIRECT which I can use testing
aufs, please send me.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs BUG

2007-03-01 Thread sfjro

Fernando A. P. Gomes:
 switchroot doesn't have exit code. switchroot replaces the current process  
 (the init in initrd) and then executes the new init.

Since you are still using initrd instead of initramfs, I must ask you
again.
How did you identify that switchroot succeeded?
Your kernel may execute init process after your linuxrc/switchroot
aborts. But it may depends upon your parameters.


 switchroot moves the specified diretory to /. What was before that directory 
 can't be accessed anymore.

Do you mean that you took your aufs apart from its branches.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: Possible to 'invalidate cache'?

2007-03-19 Thread sfjro

Jrgen_P._Tjern:
 So either there were other conditions to cause my BUG @ super.c:357, or =
 
 the newest CVS fixed the problem by itself.

There is a condition to reproduce this bug.

$ cd /your/aufs/subdir
$ sudo mount -o remount,udba=inotify /your/aufs
then you will meet BUG @ super.c:357 again.

It means the subdir is in use, and aufs tries some processing at
remount-time. If you didn't use any of subdir, you would not meet the
bug. I guess the samba service daemon refered a subdir when the first
time you met the bug.


Junjiro Okajima



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: BUG @ hinotify.c:123!

2007-03-22 Thread sfjro

Jrgen_P._Tjern:
 [14664.834300] kernel BUG at /root/aufs.wcvs/aufs/fs/aufs/hinotify.c:123!

This is very strange too.
I cannot guess what is wrong.
But I will try kernel 2.6.20.3 and smb exrporting in a few days.

Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs Tuesday release (Re: skip aufs Monday release)

2007-03-27 Thread sfjro

Tomas M:
 I think the Tuesday's release can't be compiled.
:::
 /usr/src/a/fs/aufs/misc.h:150: error: dereferencing pointer to 
 incomplete type

Sorry.
It was due to my debug environment.
Please update your CVS tree and try again.
I have just updated misc.h.


Junjiro Okajima


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs Tuesday release (Re: skip aufs Monday release)

2007-03-27 Thread sfjro

Marty Rosenberg:
 I'd like to apologize for not giving enough information in the past, I'll try 
 to be a bit more verbose this time.
 Config:
 I've patched a vanilla 2.6.18.8 kernel with this tuesday's release.  
 M Another unionfs
 ---   These options are generated automatically for 2.6.18.8
 [*]   Use simplified (fake) nameidata
   Maximum number of branches (127)  ---
 [*]   Use sysfs/fs/aufs
 ---   INOTIFY and AUFS_HINOTIFY are disabled
 [*]   NFS-exportable aufs
 [ ]   ksize.patch was applied or not
 [*]   Debug aufs
 [ ]   Compatibility with Unionfs (obsolete)

Thank you.
I can see no problem in your configuration.
But version 20070327 had a bug and you could not compile it.
Did you fix it by yourself? If not, please check your loaded or linked
aufs version.

 the contents of /etc/exports is
:::
 /data_test 
 192.168.0.0/255.255.255.0(async,no_subtree_check,ro)

To export aufs, you need to specify fsid option in your exports.
Please read the manual.
But I don't think this is the reason of 
 mount: stargate:/data_test failed, reason given by server: Permission denied.

So I am afraid that your loaded or linked aufs version is old.


 pesky inode bug: still there.

Still I am trying reproduce your problem, but I never succeeded.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: Stale NFS file handle (wtf?)

2007-03-28 Thread sfjro

  Nothing interesting in dmesg. Compiled using gcc 3.4, local.mk and =
  
  kernel v2.6.20.3. Not using latest daily, will recompile to that and =
  
  reload module later on. I'm guessing that will solve the problem =
 
 You have changed your environment, thank you, but you still had a
 problem and I cannot reproduce your problem.
 
 I think I am stucking about your problem.
 If anyone can reproduce Jorgen's problem, please let me know how.

Jorgen,

If you meet BUG at iinfo.c:62 again, please send me the stacktrace.
Your new kernel configuration will show us the correct stacktrace.
And send me your .config too.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs backport to kernel 2.6.15

2007-03-29 Thread sfjro

Hi Hans,

Hans-Peter Jansen:
 before switching my users to openSUSE 10.2 diskless, I tackled the job of 
 backporting aufs to (at least) 2.6.11 for SuSE 9.3 (diff attached).
:::
   All kudos to you!

Thank you very much.
I believe you have not only good skills but also frontier spirit.
I am very glad your success.
But I am afraid you will meet some problems in the future.


 I'm overwhelmed by this level of success. Thank you very much. If you visit 
 Germany one day, or I am Japan, I would be pleased to invite you for a nice  
 dinner at large - please let me know, seriously!

Haha, I decided now. Today I shall have a dinner with sausages, potatos,
sour cabbage, Butter AUFS Brot, beer, mit singing Ein Prosit. :-)


 If you want to do me a(nother) favour, please have a look on my changes and 
 give me a note if something stands out badly. I you consider applying 
 something like that, let me know, and I will try to clean it up. 

- The macros LOCK_INODE() and UNLOCK_INODE() are not bad, but where do
  you use them?
- I prefer defining ATTR_FILE as zero, instead of removing.
- it is recommended to define CONFIG_AUFS_DEBUG.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: .config for kernel with flaky inodes.

2007-03-29 Thread sfjro

Marty Rosenberg:
  is attached.  It's kinda large and now compressed. I also realized that I
:::

Thank you.
And I want you to try this patch.
Unfortunately this is just a trial, not a solution.
With this patch, I hope your kernel will tell us more information.

Also, I want you to try xino option.
(an old mail)
--
From: [EMAIL PROTECTED]
Subject: Re: AUFS incorrectly identifies files as directories. 
To: Marty Rosenberg [EMAIL PROTECTED],
aufs-users@lists.sourceforge.net
Date: Wed, 21 Mar 2007 11:50:44 +0900


 Now your environment is,
 - vanilla 2.6.19 kernel
 - aufs 20070312 (20070319?)
 - seven xfs branches with 773,950 files total
 - ls(1) and find(1) show you crazy inode info
 - after crazy inode, aufs crashes by BUG at vdir.c:605
 
 I will try it again on my local environment, if you have another thing
 which is related to this problem, please let me know.

I tested again, and found no problem.
One thing I can guess which might be related to your problem is xino
files. Although I am no sure, will you try xino mount option specifying
a non-xfs path?
For example,
# mount -t aufs -o xino=/non-xfs/new-file,br=...

--

Junjiro Okajima

--- marty.config2007-03-30 14:36:03.0 +0900
+++ .config 2007-03-30 15:23:37.0 +0900
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18.8
-# Tue Mar 27 12:10:08 2007
+# Fri Mar 30 15:23:37 2007
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -39,11 +39,12 @@
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -65,8 +66,8 @@
 #
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 # CONFIG_KMOD is not set
 
@@ -253,6 +254,7 @@
 CONFIG_PCI_MMCONFIG=y
 # CONFIG_PCIEPORTBUS is not set
 # CONFIG_PCI_MSI is not set
+# CONFIG_PCI_DEBUG is not set
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -437,6 +439,7 @@
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
 # CONFIG_SYS_HYPERVISOR is not set
 
 #
@@ -1509,13 +1489,40 @@
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
 CONFIG_MAGIC_SYSRQ=y
-CONFIG_UNUSED_SYMBOLS=y
-# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_FRAME_POINTER is not set
+CONFIG_UNWIND_INFO=y
+CONFIG_STACK_UNWIND=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_EARLY_PRINTK=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+
+#
+# Page alloc debug is incompatible with Software Suspend on i386
+#
+# CONFIG_DEBUG_RODATA is not set
+# CONFIG_4KSTACKS is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
 CONFIG_DOUBLEFAULT=y

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


aufs Monday release

2007-04-01 Thread sfjro

o bugfix
- bugfix: forgot dput in a error case.

o news
- introduce wkq_nowait().
- refine udba=inotify, still testing.
- extract some functions from sbinfo.c, create a new file plink.c.

Junjiro Okajima

--

Index: fs/aufs/Makefile
Index: fs/aufs/sbinfo.c
- extract some functions from sbinfo.c, create a new file plink.c.

Index: fs/aufs/dentry.c
Index: fs/aufs/hinotify.c
Index: fs/aufs/i_op_del.c
Index: fs/aufs/inode.c
Index: fs/aufs/opts.c
- refine udba=inotify, still testing.

Index: fs/aufs/export.c
- bugfix: forgot dput in a error case.

Index: fs/aufs/inode.h
Index: fs/aufs/super.h
- move some declarations from super.h to inode.h.

Index: fs/aufs/super.c
- refine show_options() simply.
- refine udba=inotify, still testing.

Index: fs/aufs/whout.c
Index: fs/aufs/wkq.c
- introduce wkq_nowait().

Index: README
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/vfsub.c
Index: fs/aufs/vfsub.h
Index: include/linux/aufs_type.h
- less important changes.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs on 64 bit nodes: warnings on compilation

2007-04-02 Thread sfjro

Hello Vasily,

Vasily Tarasov:
 Hello, I've just compiled aufs on my 64bit node and there were a lot of 
 warnings caused by 64bit specifics. The tiny patch below fixes most of them. 
 However there are still a bit warnings, but it depends greatly on the author 
 how to fix it, so I just report about them:

Thank you.
Won't you try this patch?
- apply cast operator to size_t and ssize_t.
- refine inline au_is_mmapped().
- rename static fread() and fwrite().
- refine vfsub_read/write() which is unrelated to this issue.


Junjiro Okajima

--

Index: fs/aufs/debug.h
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/debug.h,v
retrieving revision 1.25
diff -u -p -r1.25 debug.h
--- fs/aufs/debug.h 27 Mar 2007 12:45:59 -  1.25
+++ fs/aufs/debug.h 3 Apr 2007 04:00:02 -
@@ -60,7 +60,7 @@ extern atomic_t aufs_cond;
}while(0)
 #define TraceErrPtr(p) do { \
if (IS_ERR(p)) \
-   TraceErr(PTR_ERR(p)); \
+   LKTRTrace(err %ld\n, PTR_ERR(p)); \
}while(0)
 #define TraceEnter()   LKTRLabel(enter)
 
Index: fs/aufs/f_op.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/f_op.c,v
retrieving revision 1.21
diff -u -p -r1.21 f_op.c
--- fs/aufs/f_op.c  27 Mar 2007 12:49:00 -  1.21
+++ fs/aufs/f_op.c  3 Apr 2007 04:00:02 -
@@ -130,7 +130,8 @@ static ssize_t aufs_read(struct file *fi
int dlgt;
 
dentry = file-f_dentry;
-   LKTRTrace(%.*s, cnt %d, pos %Ld\n, DLNPair(dentry), count, *ppos);
+   LKTRTrace(%.*s, cnt %lu, pos %Ld\n,
+ DLNPair(dentry), (unsigned long)count, *ppos);
 
sb = dentry-d_sb;
si_read_lock(sb);
@@ -177,7 +178,8 @@ static ssize_t aufs_write(struct file *f
int dlgt;
 
dentry = file-f_dentry;
-   LKTRTrace(%.*s, cnt %d, pos %Ld\n, DLNPair(dentry), count, *ppos);
+   LKTRTrace(%.*s, cnt %lu, pos %Ld\n,
+ DLNPair(dentry), (unsigned long)count, *ppos);
 
inode = dentry-d_inode;
i_lock(inode);
@@ -467,8 +469,8 @@ static ssize_t aufs_sendfile(struct file
struct super_block *sb;
 
dentry = file-f_dentry;
-   LKTRTrace(%.*s, pos %Ld, cnt %d, loopback %d\n,
- DLNPair(dentry), *ppos, count, loopback);
+   LKTRTrace(%.*s, pos %Ld, cnt %lu, loopback %d\n,
+ DLNPair(dentry), *ppos, (unsigned long)count, loopback);
 
sb = dentry-d_sb;
si_read_lock(sb);
Index: fs/aufs/file.h
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/file.h,v
retrieving revision 1.21
diff -u -p -r1.21 file.h
--- fs/aufs/file.h  27 Mar 2007 12:46:34 -  1.21
+++ fs/aufs/file.h  3 Apr 2007 04:00:02 -
@@ -104,7 +104,7 @@ static inline int au_figen(struct file *
 
 static inline int au_is_mmapped(struct file *f)
 {
-   return (int)ftofi(f)-fi_h_vm_ops;
+   return !!ftofi(f)-fi_h_vm_ops;
 }
 
 /* -- */
Index: fs/aufs/sysaufs.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/sysaufs.c,v
retrieving revision 1.1
diff -u -p -r1.1 sysaufs.c
--- fs/aufs/sysaufs.c   27 Mar 2007 12:52:39 -  1.1
+++ fs/aufs/sysaufs.c   3 Apr 2007 04:00:02 -
@@ -374,7 +374,7 @@ static ssize_t sysaufs_read(struct kobje
loff_t len;
struct dentry *d;
 
-   LKTRTrace(%d, offset %Ld, sz %u\n, index, offset, sz);
+   LKTRTrace(%d, offset %Ld, sz %lu\n, index, offset, (unsigned long)sz);
 
if (unlikely(!sz))
return 0;
Index: fs/aufs/vfsub.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/vfsub.c,v
retrieving revision 1.3
diff -u -p -r1.3 vfsub.c
--- fs/aufs/vfsub.c 2 Apr 2007 01:19:29 -   1.3
+++ fs/aufs/vfsub.c 3 Apr 2007 04:00:02 -
@@ -294,17 +294,15 @@ struct read_args {
 static void call_read_k(void *args)
 {
struct read_args *a = args;
-   LKTRTrace(%.*s, cnt %u, pos %Ld\n,
- DLNPair(a-file-f_dentry), a-count, *a-ppos);
+   LKTRTrace(%.*s, cnt %lu, pos %Ld\n,
+ DLNPair(a-file-f_dentry), (unsigned long)a-count,
+ *a-ppos);
*a-errp = do_vfsub_read_k(a-file, a-kbuf, a-count, a-ppos);
 }
 
 ssize_t vfsub_read_u(struct file *file, char __user *ubuf, size_t count,
 loff_t *ppos, int dlgt)
 {
-   if (unlikely(!count))
-   return 0;
-
if (!dlgt)
return do_vfsub_read_u(file, ubuf, count, ppos);
else {
@@ -316,12 +314,16 @@ ssize_t vfsub_read_u(struct file *file, 
.ppos   = ppos
};
 
+   if (unlikely(!count))
+ 

Re: Strange nodes whose names start with .wh..wh.

2007-04-02 Thread sfjro

Hello Sandino,

Sandino Flores Moreno:
 I'm using aufs to rapidly create file systems for embedded devices, and
 after creating the new file systems, but before doing any other thing, a
 file and directory are always created inside the changes_dir
 
 .wh..wh.aufs
 .wh..wh.plink/
 
 I'm mounting with noplink option and using aufs 20070402 with kernel vanilla
 2.6.20.4
 
 What are they for?
 Is it possible to avoid them?

.wh..wh.aufs is the source of all whiteouts.
When your branch is marked as '=rw', it will be always created.
(from the aufs manual)
   All whiteouts are hardlinked, including 'writable branch top 
dir/.wh..wh.aufs.'

   The hardlink on an ordinary (disk based) filesystem  does  not  consume
   inode  resource  newly.  But  in linux tmpfs, the number of free inodes
   will be decremented by link(2). It is recommended to specify  nr_inodes
   option to your tmpfs if you meet ENOSPC. Use this option after checking
   by 'df -i'.


 The options I'm using look like this:
 
 rw,dirs=changes_dir=rw:master_dir=ro,xino=/tmp/xino,noplink

You can avoid .wh..wh.plink, if you write 'noplink' before 'dirs='.
The mount options are  interpreted  from  left  to  right basically. It
is described in the aufs manual.
But I have a plan to change this rule a little bit.
- at remount-time, the options are interpreted from left to right
- at mount-time, br: or dirs= is interpreted last. this new rule will
  not confuse you.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: dmes logs ' different uid/gid/permission' but the branches have the same permissions/uid/gid

2007-04-04 Thread sfjro

Sandino Flores Moreno:
 And the directory
 /data/EVM_filesystems/common/masters/CSSD_Linux_12.3RC1.master/target and
 the other branch directory have the same permissions/gid/uid

Are you sure?
If it is true, it must be aufs bug.
Please show me your branches by,,,
$ ls -ld branch1 branch2 ...


 What is this warning due to?
 Is it a signal of something bad?

(from the aufs manual)
--
.B warn_perm nowarn_perm
Enables or disables the warning about uid/gid/permission at adding a
branch. The default is warn_perm (cf. DIAGNOSTICS).
:::
.SH DIAGNOSTICS
When you add an branch to your union, aufs may warn you about the
privilege or security of the branch, which is the permission bits,
owner and group of the top directory of the branch.
If your upper writable branch has a world writable top directory,
a malicious user can create any files on the writable branch directly,
like copyup and modify manually. I am afraid it can be a security
issue.
--

By the way, this is not the first time people asked me about this
warning. Is it so strange? Is the description in the manual too poor? Or
people doesn't read the manual, then where and how should I describe?


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


aufs Monday release

2007-04-08 Thread sfjro

o news
- introduce new branch attribute nolwh.
- refine parsing options at mount/remount time, reported by Sandino
  Flores Moreno.
+ remove whiteout-base and whplink-dir in nopllink and br_mod(),
  but br_del().
+ increment sbinfo generation in a new function
  aufs_remount_fs().
+ support multiple xino/noxino options in another way.
+ force ro when unknown branch permission is specified.
+ at mount-time, interpret options in this order.
* simple flags, except xino/noxino, udba=inotify and dlgt.
* branches.
* xino/noxino.
* udba=inotify.
* dlgt.
+ at remount-time,
* interpret options in the given order left to right,
  except dlgt which is disabled in interpreting.
* create whiteout-base and whplink-dir if neccessary.
* dlgt if neccessary.
+ new functions, clean_wh(), clean_plink(), test_linkable(),
  plink_dir().
- support 64bit environtment, reported by Vasily Tarasov.
- introduce a sample for kprobe.

o bugfix
- bugfix: do not traverse the sub-mounts under aufs at refreshing
  cached dirs after remount.
- bugfix: simultaneous read in 'dlgt' mode, reported and fixed by
  Ulrich Holeschak.
- bugfix: LINUX_VERSION_CODE for linux-2.6.16.

o misc
- still testing inotify.
- support lockdep in nfsd, still testing.
- minor optimization for dput().
- new test functions br_writable(), br_whable() and br_linkable_wh(),
  replacing au_is_whable().
- do write_lock() in reinit_br_wh().
- refine updating /sys/fs/aufs/stat.
- wkq_nowait() calls schedule_work().


Junjiro Okajima

--

Index: fs/aufs/branch.c
- minor optimization for dput().
- new test functions br_writable(), br_whable() and br_linkable_wh(),
  replacing au_is_whable().
- introduce new branch attribute nolwh.
- refine parsing options at mount/remount time, reported by Sandino
  Flores Moreno. cf. opts.c.

Index: fs/aufs/branch.h
- new test functions br_writable(), br_whable() and br_linkable_wh(),
  replacing au_is_whable().
- introduce new branch attribute nolwh.

Index: fs/aufs/debug.h
Index: fs/aufs/f_op.c
Index: fs/aufs/file.h
Index: fs/aufs/sysaufs.c
- support 64bit environtment, reported by Vasily Tarasov.

Index: fs/aufs/dir.c
Index: fs/aufs/export.c
Index: fs/aufs/super.h
- support lockdep in nfsd, still testing.

Index: fs/aufs/file.c
- bugfix: LINUX_VERSION_CODE for linux-2.6.16.

Index: fs/aufs/i_op.c
- new test functions br_writable(), br_whable() and br_linkable_wh(),
  replacing au_is_whable().

Index: fs/aufs/i_op_add.c
Index: fs/aufs/i_op_del.c
Index: fs/aufs/i_op_ren.c
- minor optimization for dput().

Index: fs/aufs/opts.c
Index: util/aufs.in.5
- introduce new branch attribute nolwh.
- refine parsing options at mount/remount time, reported by Sandino
  Flores Moreno.
+ remove whiteout-base and whplink-dir in nopllink and br_mod(),
  but br_del().
+ increment sbinfo generation in a new function
  aufs_remount_fs().
+ support multiple xino/noxino options in another way.
+ force ro when unknown branch permission is specified.
+ at mount-time, interpret options in this order.
* simple flags, except xino/noxino, udba=inotify and dlgt.
* branches.
* xino/noxino.
* udba=inotify.
* dlgt.
+ at remount-time,
* interpret options in the given order left to right,
  except dlgt which is disabled in interpreting.
* create whiteout-base and whplink-dir if neccessary.
* dlgt if neccessary.

Index: fs/aufs/opts.h
Index: fs/aufs/whout.h
- refine parsing options at mount/remount time, reported by Sandino
  Flores Moreno. cf. opts.c.

Index: fs/aufs/super.c
- refine parsing options at mount/remount time, reported by Sandino
  Flores Moreno. cf. opts.c.
- bugfix: do not traverse the sub-mounts under aufs at refreshing
  cached dirs after remount.

Index: fs/aufs/debug.c
Index: fs/aufs/hinotify.c
Index: fs/aufs/module.c
Index: include/linux/aufs_type.h
Index: sample/diskless/comount.sh
Index: util/c2tmac.c
- less important changes.

Index: fs/aufs/vfsub.c
- support 64bit environtment, reported by Vasily Tarasov.
- bugfix: simultaneous read in 'dlgt' mode, reported and fixed by
  Ulrich Holeschak.

Index: fs/aufs/whout.c
- refine parsing options at mount/remount time, reported by Sandino
  Flores Moreno. cf. opts.c.
+ new functions, clean_wh(), clean_plink(), test_linkable(),
  plink_dir(), 
- introduce new branch attribute nolwh.
- do write_lock() in reinit_br_wh().

Index: fs/aufs/wkq.c
- refine updating /sys/fs/aufs/stat.
- wkq_nowait() calls schedule_work().

Index: fs/aufs/xino.c
- support 64bit environtment, reported by Vasily Tarasov.
- new 

Re: Strange nodes whose names start with .wh..wh.

2007-04-08 Thread sfjro

Sandino Flores Moreno:
 I modified my script, so now the noplink option is before the dirs= option,
 but the .wh* nodes are still created.
 I think you already realized this.

Please try the latest aufs CVS, I have updated it a few minutes before.
And try the new branch attribute 'rw+lwh', for example
'dirs=changes_dir=rw+nolwh:master_dir=ro,xino=/tmp/xino,noplink'

You will not see both of .wh..wh.plink and .wh..wh.aufs.
But, usually, it is recommended to use 'plink' and '=rw.'


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs Tuesday release (Re: skip aufs Monday release)

2007-04-09 Thread sfjro

Marty Rosenberg:
  To export aufs, you need to specify fsid option in your exports. Please
  read the manual.
  Sorry, this seems rather trivial, but I'm still unsure of how to get the
  fsid of a given file system.

You can set it whatever you like. But it must be unique number.


  more or less the same config.  I'll have to try this with another box.  I
  think part of the problem might be that the system that I'm attempting to
  mount it on is on a 64 bit system.  I remember that there were some issues
  with the number of bits for the handles, but I'm not sure.

So your nfs server is 32bit system, and your nfs client is 64bit system.
Actually I have not tried such case.
Can somebody else try this case?


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs bug, my first real one

2007-04-13 Thread sfjro

Hello,

Tomas M:
 mount -o remount,add:1:/mnt/live/memory/images/some_dir
 
 Then I start kbuildsycoca to refresh KDE menu.
 Sometimes it is OK but after adding few branches this way dmesg shows 
 the error attached, after kbuildsycoca.
 
 my configuration:
 CONFIG_AUFS=m
 CONFIG_AUFS_FAKE_DM=y
 CONFIG_AUFS_BRANCH_MAX_1023=y
 CONFIG_AUFS_SYSAUFS=y
 CONFIG_AUFS_KSIZE_PATCH=y
 
 there is approximately 10 branches in union.

I could not reproduce this problem, and I can't guess the cause.
Won't you enable CONFIG_AUFS_DEBUG and reproduce it? I hope BUG_ON
macro in somewhere can detect the problem. But I am not confident.


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


Re: aufs bug, my first real one

2007-04-13 Thread sfjro

Tomas M:
 So I enabled debug and here is the result (attached)
:::
 kernel BUG at /usr/src/a/aufs/fs/aufs/iinfo.c:64!
:::
 Call Trace:
  [f8cec6be] au_new_inode+0x45e/0x510 [aufs]
  [f8ced1f9] aufs_permission+0x149/0x260 [aufs]
  [f8cecd1d] aufs_lookup+0x7d/0xd0 [aufs]
  [c0165660] do_lookup+0x130/0x170

Thnak you.
It is much easier to debug.
But this Call Trace is strange because of aufs_permission() between
aufs_lookup() and au_new_inode().
- aufs_lookup() never call aufs_permission()
- aufs_permission() never calls au_new_inode()

I guess that you didn't enable CONFIG_FRAME_POINTER, so I want you to
enable these configurations.
- DEBUG_KERNEL
- FRAME_POINTER
- DEBUG_STACKOVERFLOW

And please show me the output of this command (for the current aufs module)
The result may depend on your compiler.
$ objdump -d /your/current/aufs.ko | perl 
/your/kernel/src/scripts/checkstack.pl i386


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


aufs Monday release

2007-04-15 Thread sfjro

o bugfix
- bugfix: introduce dcsub.[ch] to handle dentry cache.
- bugfix: use readlink(1) to get cwd, in auplink, mount.aufs and
  unionctl, reported by Torsten Luettgert. Actually, to use readlink
  was suggested by Tomas M last year.

o news
- support initramfs.
- verbose warning message for 'different uid/gid/perm.'
- still testing udba=inotify.

o misc
- support GFP flags in au_kzrealloc().
- simplified lock/unlock functions definition by a new macro
  SimpleRWSem...

Junjiro Okajima

--
Index: fs/aufs/Makefile
Index: fs/aufs/aufs.h
- bugfix: introduce dcsub.[ch] to handle dentry cache.

Index: fs/aufs/branch.c
- support GFP flags in au_kzrealloc().
- verbose warning message for 'different uid/gid/perm.'
- bugfix: introduce dcsub.[ch] to handle dentry cache.

Index: fs/aufs/branch.h
Index: fs/aufs/file.h
Index: fs/aufs/inode.h
Index: fs/aufs/super.h
- simplified lock/unlock functions definition by a new macro
  SimpleRWSem...

Index: fs/aufs/cpup.c
Index: fs/aufs/debug.c
Index: fs/aufs/debug.h
Index: fs/aufs/export.c
Index: fs/aufs/i_op_add.c
Index: fs/aufs/i_op_del.c
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/sysaufs.c
Index: fs/aufs/wkq.c
Index: include/linux/aufs_type.h
Index: util/aufs.in.5
- less important changes

Index: fs/aufs/dentry.c
- support GFP flags in au_kzrealloc().
- still testing udba=inotify.

Index: fs/aufs/f_op.c
- bugfix: prevent from a race between file_list in remount.
  (this fix was removed temporary, since I could not test it well)

Index: fs/aufs/file.c
Index: fs/aufs/inode.c
Index: fs/aufs/misc.c
Index: fs/aufs/vdir.c
- support GFP flags in au_kzrealloc().

Index: fs/aufs/hinotify.c
- still testing udba=inotify.

Index: fs/aufs/misc.h
- simplified lock/unlock functions definition by a new macro
  SimpleRWSem...
- support GFP flags in au_kzrealloc().

Index: fs/aufs/opts.c
- revised simply.

Index: fs/aufs/super.c
- bugfix: introduce dcsub.[ch] to handle dentry cache.
- revised simply.

Index: sample/diskless/Makefile
Index: sample/diskless/comount.sh
Index: sample/diskless/diskless.6aufs
Index: sample/diskless/initrd.mk
Index: sample/diskless/linuxrc
Index: sample/diskless/pxe.conf
Index: README
- support initramfs.

Index: util/auplink
Index: util/mount.aufs
Index: util/unionctl
- bugfix: use readlink(1) to get cwd, in auplink, mount.aufs and
  unionctl, reported by Torsten Luettgert. Actually, to use readlink
  was suggested by Tomas M last year.

-
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: aufs bug, my first real one

2007-04-15 Thread sfjro

Tomas M:
 OK I modified kernel config to enabled this debug and I recompiled the 
 kernel and aufs.ko as well.
 
 Then I reproduced the bug again, here are the results:
 - config: kernel config used (from /proc/config.gz)
 - stack.txt: objdump output
 - dmesg.log: bug report

Thank you very much.
Honestly speaking, I am still unsure what was wrong.
But I guess your problem may be related to the today's bugfix which is
for handling dcache. Please try the latest aufs.

And I think this stack usage is too large, I will reduce it in next
Monday release.
 0x00010b96 aufs_rename [aufs]:508
 0x000113fb aufs_rename [aufs]:508


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-04-22 Thread sfjro

o bugfix
- bugfix: file revalidation after rename(tgt).
- strict inode lock in fsync() before 2.6.17.

o news
- restore rdacahe option, which was dropped by mistake.
- print the depth of generic workqueue in sysfs/aufs/stat.
- testing initramfs.
- still testing udba=inotify.
- simplified uid/gid/perm message.
- reduce stack space.
- make aufs_cond available even if CONFIG_LKTR is disabled.

o misc
- revise au_fin_finfo() and si lock.
- simplified cache function definitions.
- merge both of wait/nowait works into a single enqueue function.
- rename wkq_wait() to au_wkq_wait().
- rename some name hash functions, and two new functions nash_new()
  and nhash_del().
+ init_nhash()  -- nhash_init()
+ move_nhash()  -- nhash_move()
+ free_nhash()  -- nhash_fin()
- move au_is_kthread() to wkq.h, and rename to is_aufsd().
- rename au_init_wkq() to au_wkq_init().
- rename au_fin_wkq() to au_wkq_fin().
- rename au_inotify_exit() to au_inotify_fin().
- rename dbg_dlgt_exit() to dbg_dlgt_fin().


Junjiro Okajima

--

Index: fs/aufs/branch.c
- simplified uid/gid/perm message.

Index: fs/aufs/cpup.c
Index: fs/aufs/dentry.c
Index: fs/aufs/i_op.c
Index: fs/aufs/vfsub.c
- rename wkq_wait() to au_wkq_wait().

Index: fs/aufs/debug.c
Index: fs/aufs/debug.h
- make aufs_cond available even if CONFIG_LKTR is disabled.

Index: fs/aufs/dir.c
- bugfix: file revalidation after rename(tgt).
- revise au_fin_finfo() and si lock.
- rename wkq_wait() to au_wkq_wait().
- reduce stack space.

Index: fs/aufs/dir.h
Index: fs/aufs/vdir.c
- rename some name hash functions, and two new functions nash_new()
  and nhash_del().
+ init_nhash()  -- nhash_init()
+ move_nhash()  -- nhash_move()
+ free_nhash()  -- nhash_fin()

Index: fs/aufs/f_op.c
- revise au_fin_finfo() and si lock.
- strict inode lock in fsync() before 2.6.17.

Index: fs/aufs/file.c
- rename wkq_wait() to au_wkq_wait().
- bugfix: file revalidation after rename(tgt).

Index: fs/aufs/finfo.c
- revise au_fin_finfo() and si lock.

Index: fs/aufs/hinotify.c
- still testing udba=inotify.
- rename wkq_wait() to au_wkq_wait().
- rename au_inotify_exit() to au_inotify_fin().

Index: fs/aufs/i_op_del.c
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/misc.c
- reduce stack space.

Index: fs/aufs/inode.h
- rename au_inotify_exit() to au_inotify_fin().

Index: fs/aufs/misc.h
- move au_is_kthread() to wkq.h, and rename to is_aufsd().

Index: fs/aufs/module.c
- rename dbg_dlgt_exit() to dbg_dlgt_fin().
- rename au_init_wkq() to au_wkq_init().
- rename au_fin_wkq() to au_wkq_fin().
- rename au_inotify_exit() to au_inotify_fin().

Index: fs/aufs/module.h
- move au_wkq to wkq.h.
- simplified cache function definitions.

Index: fs/aufs/opts.c
- restore rdacahe option, which was dropped by mistake.
- reduce stack space.

Index: fs/aufs/plink.c
- rename au_is_kthread() to is_aufsd().
- rename wkq_wait() to au_wkq_wait().

Index: fs/aufs/super.c
- revised simply.
- testing initramfs.

Index: fs/aufs/sysaufs.c
- print the depth of generic workqueue in sysfs/aufs/stat.

Index: fs/aufs/whout.c
- rename wkq_wait() to au_wkq_wait().
- rename some name hash functions.

Index: fs/aufs/wkq.c
- merge both of wait/nowait works into a single enqueue function.
- print the depth of generic workqueue in sysfs/aufs/stat.
- rename au_fin_wkq() to au_wkq_fin().
- rename au_init_wkq() to au_wkq_init().
- move au_is_kthread() to wkq.h, and rename to is_aufsd().

Index: fs/aufs/xino.c
- revised simply.

Index: util/aufs.in.5
- print the depth of generic workqueue in sysfs/aufs/stat.

Index: README
Index: fs/aufs/Makefile
Index: fs/aufs/export.c
Index: fs/aufs/iinfo.c
Index: fs/aufs/inode.c
Index: fs/aufs/vfsub.h
Index: include/linux/aufs_type.h
Index: sample/diskless/Makefile
Index: sample/diskless/comount.sh
Index: sample/diskless/def.mk
Index: sample/diskless/initrd.mk
Index: sample/diskless/linuxrc
Index: sample/diskless/nfscd.mk
- less important changes.

-
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: Want hack to prevent .wh.__dir_opaque creation

2007-04-22 Thread sfjro

 I guess your script which will be executed periodically will be such
 like this (I didn't test it),
 
 mount -o remount,udba=inotify /aufs
 mv /rw/* /ro/*
 mount -o remount,udba=reval /aufs

This sample was rough or rude.
You may need to care about whiteout, and the possibility of another
process may modify aufs.
Here is a modified sample.
You still need to decide how to handle whiteouts.

--
tmp=/rw/.wh..wh.$$
mount -o remount,udba=inotify /aufs
find /rw ! -name '.wh.*' \( -type d -fprintf $tmp.dir '%P\n' -o -fprintf 
$tmp.nondir '%P\n' \)

cd /ro
xargs -r mkdir  $tmp.dir
xargs -ri mv /rw/\{\} \{\}  $tmp.nondir
rm $tmp.*

cd $OLDPWD
mount -o remount,udba=reval /aufs
--

Ideally, this script should be executed with locking-out all other
processes.


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/


bugfix: stop consuming inode number rapidly.

2007-05-08 Thread sfjro

As I announced in last Moday release, a minor bug is fixed which is the
end of a revalidating problem.

- bugfix: stop consuming inode number rapidly.

Junjiro Okajima

--

Index: fs/aufs/i_op_del.c
Index: fs/aufs/i_op_ren.c
- bugfix: stop consuming inode number rapidly.

-
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: aufs Monday release

2007-05-14 Thread sfjro

Sandino Flores Moreno:
 ... on linux 2.6.21.1, I got this error:

Sorry, I may be confused 2.6.21 with 2.6.22.
Please try this patch. If it succeeds, I will update CVS.

Junjiro Okajima

--

Index: fs/aufs/opts.h
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/opts.h,v
retrieving revision 1.12
diff -u -p -r1.12 opts.h
--- fs/aufs/opts.h  14 May 2007 03:40:27 -  1.12
+++ fs/aufs/opts.h  14 May 2007 06:12:52 -
@@ -28,7 +28,7 @@
 #include linux/version.h
 #include linux/aufs_type.h
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,21)
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,22)
 typedef const char* au_parser_pattern_t;
 #else
 typedef char* au_parser_pattern_t;
Index: fs/aufs/sysaufs.h
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/sysaufs.h,v
retrieving revision 1.2
diff -u -p -r1.2 sysaufs.h
--- fs/aufs/sysaufs.h   14 May 2007 03:40:13 -  1.2
+++ fs/aufs/sysaufs.h   14 May 2007 06:12:52 -
@@ -27,7 +27,7 @@
 #include linux/sysfs.h
 #include linux/version.h
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,21)
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,22)
 typedef struct kset au_subsys_t;
 #define au_subsys_to_kset(subsys) (subsys)
 #else

-
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: unionctl -- unionfs compatibility

2007-05-16 Thread sfjro

Hi Ryan,

Ryan Jud Hughes:
 It seems that aufs's unionctl wants a command like:
   unionctl /UNION --mode /foo ro
 
 whereas unionfs's wanted a command like:
   unionctl /UNION --mode ro /foo
:::
 Is there any reason not to do this?

Because unionctl.c in unionfs-1.4.tar.gz shows us,

fprintf(stderr, \tunionctl UNION --mode BRANCH (rw|ro|nfsro)\n);

Unionfs-unionctl may accept the both cases.


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/


Re: aufs working on 2.6.21.1 (x86-64)?

2007-05-17 Thread sfjro

Michael Creel:
  Everything seems to go well, but when the CD is booted (actually, I use
  VMware to boot the image), there is a failure at the point that the aufs
  filesystem is mounted, leading to a failure bad /proc/mounts 1 message.
:::
 I am trying this using VMware, and I can't grab screen output to paste into a
 message, so I've made two screenshots showing what happens when booting. They
 are at http://pareto.uab.es/mcreel/pk64-aufs.png and
 http://pareto.uab.es/mcreel/pk64-aufs2.png In the first, you see that

According to pk64-aufs2.png, the message failure bad /proc/mounts 1 is
unrelated to your problem.
Can you capture the entire message at kernel panic?
Linux Tux is hiding them. :-)

I want to know whether the aufs debug message was printed or not.


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/


Re: Changing permissions in writable branch won't work sometimes

2007-05-20 Thread sfjro

Hi,

Wolfgang Barth:
 - Calling ntlm_auth (for AD authentication) from squid needs
 
   drwxr-x--- 2 root proxy
 
   so I only changed the group ownership and restarted all relevant
   processes.

Do you mean that you changed it on the writable branch directly?
If so, you need to use udba=inotify mount option.
Why it works somtimes, because of your inode cache.
It is recommended to change winbindd_privileged on aufs, instead of the
writable branch directly.


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-05-20 Thread sfjro

o misc
- flush all the scheduled/nowait tasks at umouning and remounting.
- refine the nowait task queuing.
- support the enqueue error in workqueue.

Junjiro Okajima

--

Index: fs/aufs/cpup.c
Index: fs/aufs/dentry.c
Index: fs/aufs/dir.c
Index: fs/aufs/file.c
Index: fs/aufs/i_op.c
Index: fs/aufs/plink.c
Index: fs/aufs/vfsub.c
Index: fs/aufs/xino.c
- support the enqueue error in workqueue.

Index: fs/aufs/hinotify.c
Index: fs/aufs/whout.c
- refine the nowait task queuing.
- support the enqueue error in workqueue.

Index: fs/aufs/super.c
- flush all the scheduled/nowait tasks at umouning and remounting.

Index: fs/aufs/wkq.c
Index: fs/aufs/wkq.h
- flush all the scheduled/nowait tasks at umouning and remounting.
- refine the nowait task queuing.
- support the enqueue error in workqueue.

Index: fs/aufs/i_op_del.c
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/module.c
Index: fs/aufs/sbinfo.c
Index: fs/aufs/super.h
Index: fs/aufs/whout.h
Index: include/linux/aufs_type.h
- less important changes.

-
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: Changing permissions in writable branch won't work sometimes

2007-05-21 Thread sfjro

Wolfgang Barth:
 No, I changed the permissions on aufs, as you recommended, not directly.

If you can see the dir group id was changed expectedly and all the
relevant processes were restarted correctly, then it must be an aufs
bug.

Will you show me the simple way to reproduce it?
For example, how about to try strace to find out which process and which
systemcall are returning the error?

Thanks in advance.
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/


Re: aufs bug

2007-05-21 Thread sfjro

Hi,

Wolfgang Barth:
 I can now reproduce my winbind problem in an easy case.

Thank you.
now is:
% ls -ld /z-var/lib/xxx /DISK/var/lib/xxx /var/lib/xxx
drwxr-x---  2 root root  2048 May 21 11:16 /z-var/lib/xxx/
drwxr-x---  2 root proxy 4096 May 21 13:37 /DISK/var/lib/xxx/
drwxr-x---  2 root proxy 4096 May 21 13:37 /var/lib/xxx/
:::
[EMAIL PROTECTED]:~$ cd /var/lib/xxx
-su: cd: /var/lib/xxx: Permission denied

How about the permission bits of all parents?
Please show me the results of,
# ls -ld /var /var/lib /var/lib/xxx


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/


Re: aufs bug

2007-05-21 Thread sfjro

Wolfgang Barth:
 % ls -ld /var /var/lib /var/lib/xxx
 drwxr-xr-x  26 root root  4096 May 21 11:56 /var/
 drwxr-xr-x  32 root root  4096 May 21 13:48 /var/lib/
 drwxr-x---   2 root proxy 4096 May 21 13:37 /var/lib/xxx/

Hmm,,, it's a mystery.
What is the shell of user proxy's?
I want to take a look its source code. If you know where can I get the
source files, please tell me too.


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-05-27 Thread sfjro

o pre-announce
As I had announced a few months ago, the unionctl script will not be
supported.
The script the description about it in the aufs manual will be moved
from aufs_cvs/aufs/util to aufs_cvs/aufs/sample. 
And the symlink under aufs_cvs/aufs/ will not be created by removing
it from local.mk.

o news
- support unmounting after 'mount --bind', update the internal
  vfsmount pointer when unmounting after linux-2.6.18.

o misc
- refine overlap-test at adding a branch.
- refine dentry-d_parent with dget_parent() simply.
- testing linux-vserver, new abstract function do_vfsub_unlink().
- rename DEBUG_ON macro to AuDebugOn.
- add a note about the mode of a directory on the lower branch,
  suggested by Wolfgang Barth.
- execute mount(8) in a simple way, it depsends on its version.


Junjiro Okajima

--

Index: fs/aufs/branch.c
- rename DEBUG_ON macro to AuDebugOn.
- refine overlap-test at adding a branch.

Index: fs/aufs/cpup.c
Index: fs/aufs/export.c
Index: fs/aufs/f_op.c
Index: fs/aufs/file.c
Index: fs/aufs/i_op.c
Index: fs/aufs/i_op_add.c
Index: fs/aufs/i_op_del.c
Index: fs/aufs/whout.c
Index: fs/aufs/xino.c
- rename DEBUG_ON macro to AuDebugOn.
- refine dentry-d_parent with dget_parent() simply.

Index: fs/aufs/dcsub.c
- rename DEBUG_ON macro to AuDebugOn.
- new function ac_dcsub_pages_rev().

Index: fs/aufs/dcsub.h
- new function ac_dcsub_pages_rev().

Index: fs/aufs/debug.h
Index: fs/aufs/dentry.c
Index: fs/aufs/dinfo.c
Index: fs/aufs/dir.c
Index: fs/aufs/finfo.c
Index: fs/aufs/hinotify.c
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/iinfo.c
Index: fs/aufs/inode.c
Index: fs/aufs/inode.h
Index: fs/aufs/misc.c
Index: fs/aufs/misc.h
Index: fs/aufs/module.c
Index: fs/aufs/opts.c
Index: fs/aufs/plink.c
Index: fs/aufs/sbinfo.c
Index: fs/aufs/sysaufs.c
Index: fs/aufs/vdir.c
Index: fs/aufs/wkq.c
- rename DEBUG_ON macro to AuDebugOn.

Index: fs/aufs/super.c
- rename DEBUG_ON macro to AuDebugOn.
- support unmounting after 'mount --bind', update the internal
  vfsmount pointer when unmounting after linux-2.6.18.

Index: fs/aufs/vfsub.c
Index: fs/aufs/vfsub.h
- testing linux-vserver, new abstract function do_vfsub_unlink().

Index: util/aufs.in.5
- add a note about the mode of a directory on the lower branch,
  suggested by Wolfgang Barth

Index: util/unionctl
- execute mount(8) in a simple way, it depsends on its version.

Index: Kconfig.in
Index: README
Index: fs/aufs/super.h
Index: include/linux/aufs_type.h
Index: sample/diskless/diskless.6aufs
- less important changes.

-
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: aufs Monday release

2007-06-01 Thread sfjro

Hi Wilhelm,

Wilhelm Meier:
 FYI, aufs works without problems on linux-vserver with the patches I sent to 
 the list some times ago. And it would be very good to see a clean solution 
 for linux-vserver incorporated into aufs.

I can guess supporting the linux-vserver interface (or function
signature) is easy. But I am still considering about VSERVER_COWBL
Enable COW Immutable Link Breaking configuration.
Are you using with this enabled?

Your patch added a new local macro VSERVER. I am replacing it by
CONFIG_VSERVER which is introduced by linux-vserver.


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-06-03 Thread sfjro

o news
- the unionctl script is moved from util/ to sample/, and will not be
  supported any more.

o bugfix
- bugfix: support the moved root branch.

o misc
- testing is_subdir() kernel internal function.

Junjiro Okajima

--

Index: local.mk
- testing is_subdir() kernel internal function.
- the unionctl script is moved from util/ to sample/, and will not be
  supported any more.

Index: fs/aufs/aufs.h
Index: fs/aufs/branch.c
Index: fs/aufs/dcsub.c
Index: fs/aufs/dcsub.h
Index: fs/aufs/dinfo.c
Index: fs/aufs/sysaufs.c
- testing is_subdir() kernel internal function.

Index: fs/aufs/hinotify.c
- bugfix: support the moved root branch.

Index: fs/aufs/cpup.c
Index: fs/aufs/debug.c
Index: fs/aufs/debug.h
Index: fs/aufs/dentry.c
Index: fs/aufs/dir.c
Index: fs/aufs/file.c
Index: fs/aufs/finfo.c
Index: fs/aufs/i_op.c
Index: fs/aufs/i_op_add.c
Index: fs/aufs/i_op_del.c
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/iinfo.c
Index: fs/aufs/inode.c
Index: fs/aufs/inode.h
Index: fs/aufs/misc.c
Index: fs/aufs/misc.h
Index: fs/aufs/module.c
Index: fs/aufs/opts.c
Index: fs/aufs/sbinfo.c
Index: fs/aufs/super.c
Index: fs/aufs/super.h
Index: fs/aufs/sysaufs.h
Index: fs/aufs/vdir.c
Index: fs/aufs/vfsub.c
Index: fs/aufs/whout.c
Index: fs/aufs/wkq.c
Index: fs/aufs/wkq.h
Index: include/linux/aufs_type.h
Index: util/aufs.in.5
- less important changes.

-
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: What to enable to corner a problem I have?

2007-06-12 Thread sfjro

Hi,

Sandino Flores Moreno:
 I'm using aufs to compile.
:::
 The embedded file systems lives in another aufs (so I can have all the
 produced or installed files in within the changes branch for that system).

Do you mean you have two aufs mounted, like this?

# mount -t aufs -o br:/rwA:/roA none /aufsA
# mount -t aufs -o br:/rwB:/roB none /aufsB

And you cound not see a file under /aufsA, but the file must exist
there. If so, can you see the file directly on the branch filesystem?

If the file is created directly (bypassing aufs) and you didn't use
udba=inotify option, then you may not see the file. Refer to the aufs
manual to know what UDBA is.


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/


Re: Possible bug (?) - hard to reproduce

2007-06-12 Thread sfjro

Jrgen_P._Tjern:
 The thing that's acting up is a dir handle. I opendir() it, and I can
 read fine from it. A bit later in the programs execution, and readdir()
 returns NULL (right after I rewinddir()), and errno is not set.

So your application calls,
{
opendir();
readdir();
/* do something */
rewinddir();
readdir();  // returns NULL illegally
}


 I'm trying to figure out what's wrong, and I'm starting to consider two
 viable options: memory error or aufs. Could this be the doing of aufs?
 Any way to debug it on a bit lower level? Any suggestions?

First, you need to check whether the second readdir(3) issues
getdents(2) or not. Try strace. Also check it arguments, especially the
i/o position in the dir.

If getdents(2) is called and the potision is 0 (ie. rewinded correctly),
then try aufs debug output such like this.
You need to enable CONFIG_AUFS_DEBUG. It will print debug messages to
syslog.

fs/aufs/dir.c:
static int aufs_readdir(struct file *file, void *dirent, filldir_t filldir)
{
au_debug_on();
;;;
au_debug_off();
}


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/


Re: Possible bug (?) - hard to reproduce

2007-06-12 Thread sfjro

 You need to enable CONFIG_AUFS_DEBUG. It will print debug messages to
 syslog.

One more note,
You need to configure /etc/syslog.conf and /proc/sys/kernel/printk to
receive kernel debug message. For example,

# echo 8  /proc/sys/kernel/printk

(/etc/syslog.conf)
kern.debug /var/log/debug.log

# restart your_syslog_daemon


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/


Re: System hangs after mounting with aufs

2007-06-13 Thread sfjro

Hello Bertrand,

Bertrand D:
 Working on an embedded projet, i planned on using aufs. The linux kernel I 
 use is based on a 2.6.20.7 (it was cross-compiled). It uses the ppc branch 
 and not the powerpc one. The kernel works great with different kinds of 
 filesystems. No stability issues. Except when i use aufs. Compiled as a 
 module or built-in the kernel, everytime i try to mount anything via aufs the 
 system hangs. No callstack appears on the console, no oops, nothing. I tried 
 with two different mount components (busybox and coreutils). I activated the 
 CONFIG_AUFS_DEBUG option, used sometimes the mount.aufs script, tried with or 
 without a mtab file. Nothing changed. It's stuck (and so am i). I tried the 
 20070604 version.

If you can use MagicSysRq key, try these keys and send me the output. It
will show where aufs stopped.
Or try this patch which will produce some debug logs at mount-time.
Also you need to receive kernel debug log.

MagicSysRq key
'd' - Shows all locks that are held.
'q' - Will dump a list of all running timers.
't' - Will dump a list of current tasks and their information to your
  console.
'w' - Dumps tasks that are in uninterruptable (blocked) state.

--
Index: fs/aufs/super.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/super.c,v
retrieving revision 1.53
diff -u -p -r1.53 super.c
--- fs/aufs/super.c 4 Jun 2007 02:17:35 -   1.53
+++ fs/aufs/super.c 13 Jun 2007 06:44:41 -
@@ -677,7 +677,7 @@ static int aufs_fill_super(struct super_
struct opts opts;
char *arg = raw_data;
 
-   //au_debug_on();
+   au_debug_on();
if (unlikely(!arg || !*arg)) {
err = -EINVAL;
Err(no arg\n);
@@ -763,7 +763,7 @@ static int aufs_fill_super(struct super_
TraceErr(err);
err = cvt_err(err);
TraceErr(err);
-   //au_debug_off();
+   au_debug_off();
return err;
 }
 
--

To receive debug log
# echo 8  /proc/sys/kernel/printk

(/etc/syslog.conf)
kern.debug /var/log/debug.log

# restart your_syslog_daemon


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/


Re: Permission bug?

2007-06-14 Thread sfjro

Igor Karasynskyi:
 I'm use aufs as root filesystem in which I chrooted during boot and
 after this system run from there, my last branch is RW (index = 0) and
 all other is RO, on previous branch (index = 1) exist file /tmp/test
 (/tmp permissions is 777), owner of this file is common user, when I
 delete this file and try to execute shell command touch /tmp/test from
 user the command failed with this error:
 touch setting times of '/tmp/test': No such file or directory

So your situation is,

/ = /rw + /ro

$ ls /rw/tmp
- no 'test' file

$ ls /ro/tmp
- 'test' file exists, 0777, normal user/group

$ rm /tmp/test
- succeeds
- whiteout for 'test' is created.

$ touch /tmp/test
- unexpected error, No such file or directory


Will you check these things?
- after rm, check the whiteout by 'ls -l /rw/tmp/.wh.test'
- check the dir permission by 'ls -ld / /rw /ro /rw/tmp /ro/tmp'
- find the systemcall which returned the error by 'strace touch
  /tmp/test'

If there is another user on your system and the branch filesystems (/rw
and /ro in above example) are not hidden, someone else might change them
directly (bypassing aufs). In this case, you should use 'udba=inotify'
aufs mount option. Otherwise, aufs may behave differently as you expect.


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/


Re: Permission bug?

2007-06-14 Thread sfjro

Hi Igor,

Igor Karasynskyi:
  Do you mean,,,
  # mount -t aufs -o br:/rw:/ro none /aufs
  # mount -o remount,mod:/rw=ro /aufs
  and crashed?
 I can't find information about bug in /var/log/*, so I try do
 screenshot of this problem, on screenshot also steps that I do after
 system boot.

So what you did is,
# mount -t aufs -o br:/rw1:/ro1:/ro2 none /aufs
# mount -o remount,prepend:/rw0 /aufs
# mount -o remount,mod:/rw1=ro /aufs
and crashed.

Won't you try this patch which produce more detailed debug information
at remount time, and send me the debug log?
You meight need to change these things to receive kernel debug log.

# echo 8  /proc/sys/kernel/printk

(/etc/syslog.conf)
kern.debug /var/log/debug.log

# restart your_syslog_daemon

serial-console, netconsole or remote-syslog are recommended too.


Junjiro Okajima

--
--- branch.c2007/06/14 11:49:17 1.56
+++ branch.c2007/06/15 00:49:11
@@ -798,13 +798,16 @@ int br_mod(struct super_block *sb, struc
/* no need file_list_lock() since sbinfo is locked */
//file_list_lock();
list_for_each_entry(file, sb-s_files, f_u.fu_list) {
+   au_debug_on();
LKTRTrace(%.*s\n, DLNPair(file-f_dentry));
+   DbgFile(file);
fi_read_lock(file);
if (!S_ISREG(file-f_dentry-d_inode-i_mode)
|| !(file-f_mode  FMODE_WRITE)
|| fbstart(file) != bindex) {
FiMustNoWaiters(file);
fi_read_unlock(file);
+   au_debug_off();
continue;
}
 
@@ -812,8 +815,10 @@ int br_mod(struct super_block *sb, struc
hf = au_h_fptr(file);
hf-f_flags = au_file_roflags(hf-f_flags);
hf-f_mode = ~FMODE_WRITE;
+   //put_write_access(hf-f_dentry-d_inode);
FiMustNoWaiters(file);
fi_read_unlock(file);
+   au_debug_off();
}
//file_list_unlock();
 
--



-
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: Permission bug?

2007-06-15 Thread sfjro

Igor Karasynskyi:
 Yes you are right :) my first RO branch has 0777 and branches after
 that has 1777, this patch fixed this problem, thank you very much :)

God news!


 About this problem with remount branch as RO:
 1) I have image of Gentoo distributive (with 2.4 kernel)
 2) after that I mounted branch in which I'm upgraded this image to 2.6
 and other system software
 So as you see my system boot with 2.6 kernel with aufs and mount this
 braches, then chroot to them and start init. If I run system with
 upgraded software (to 2.6) all work's fine, but if I just boot system
 without (mounting branch with 2.6 upgrade) I receive error with
 remount, so problem occurred only in this situation.

Do you mean that you are running aufs in 2.4 kernel?
Aufs doesn't support linux-2.4.

--

 I apply your patch and repeat situation, netconsole log attached.

Thank you for your test.
There were sevral files are opened when you modify the branch
permission.

libc-2.3.4.so, libuuid.so.1.2, libblkid.so.1.0, ld-2.3.4.so, mount,
libnss_files-2.3.4.so, libnss_nis-2.3.4.so, libnsl-2.3.4.so,
libnss_compat-2.3.4.so, libc-2.3.4.so, libdl-2.3.4.so, ld-2.3.4.so,
bash, vcsa2

The trigger was last 'vcsa2.' Is this file executable or something?
And, most importantly, Is this file inside aufs?
All other files existed in aufs and on the branch which was indexed as
2. Does vcsa2 exist on the same branch?
(branches are indexed from 0. you can check them the line in
/proc/mounts or /sys/fs/aufs/brs, br:br0:br1:br2:...)


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/


Re: Permission bug?

2007-06-15 Thread sfjro

Igor Karasynskyi:
  Won't you try this patch?
 Didn't help, log attached

Sorry, I should write more.
Please remove the last debug patch which includes au_debug_on().


 I make mistake, error return not mkswap but swapon
:::
 stat64(/var/tmp/swap, {st_mode=S_IFREG|0644, st_size=10240, ...}) = 0
 swapon(/var/tmp/swap) = -1 EINVAL (Invalid argument)
 write(2, swapon: /var/tmp/swap: Invalid a..., 40swapon:
 /var/tmp/swap: Invalid argument
 ) = 40
 exit_group(-1)  = ?

Currently it is an expected behaviour since I am doubtful about swap in
aufs. Is it really needed? As you wrote, you can mkswap on a branch
filesystem directly and the swap file is no need to be stackable.


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/


Re: Permission bug?

2007-06-15 Thread sfjro

Igor Karasynskyi:
 No it not really needed, it much more clear when swap located outside of aufs

OK. Then I hope you had already read this description, too.

(from the aufs manual)
When you use aufs as root filesystem, it is recommended to consider to
exclude some directories. For example, /tmp and /var/log are not need
to stack in many cases. They don't usually need to copyup or to whiteout.


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-06-17 Thread sfjro

o bugfix
- bugfix: declare 'signed char', a portability problem reported by
  Bertrand D.
- bugfix: strict branch index check at the first adding, reported by
  Bertrand D.
- bugfix: unlink a whiteout under a dir who has a sticky bit, reported
  by Igor Karasynskyi.

o misc
- warn about overlapped branches when the top-dir is moved.
- remove unnecessary dget_parent(), restoring a part of last ci.
- testing 'imod' mount option.
- add a note about an empty file in cramfs.
- add a note about swapfile.


Junjiro Okajima

--

Index: fs/aufs/branch.c
- bugfix: strict branch index check at the first adding time, reported
  by Bertrand D.

Index: fs/aufs/hinotify.c
- warn about overlapped branches when the top-dir is moved.

Index: fs/aufs/i_op.c
Index: fs/aufs/i_op_add.c
Index: fs/aufs/i_op_del.c
- remove unnecessary dget_parent(), restoring a part of last ci.

Index: fs/aufs/opts.c
- testing 'imod' mount option.

Index: fs/aufs/vfsub.c
- bugfix: unlink a whiteout under a dir who has a sticky bit, reported
  by Igor Karasynskyi.

Index: fs/aufs/whout.c
- remove unnecessary dget_parent(), restoring a part of last ci.
- bugfix: unlink a whiteout under a dir who has a sticky bit, reported
  by Igor Karasynskyi.

Index: include/linux/aufs_type.h
- bugfix: declare 'signed char', a portability problem reported by
  Bertrand D.

Index: util/aufs.in.5
- add a note about an empty file in cramfs.
- add a note about swapfile.

Index: fs/aufs/aufs.h
Index: fs/aufs/branch.h
Index: fs/aufs/cpup.c
Index: fs/aufs/cpup.h
Index: fs/aufs/debug.c
Index: fs/aufs/debug.h
Index: fs/aufs/dentry.c
Index: fs/aufs/dentry.h
Index: fs/aufs/dinfo.c
Index: fs/aufs/dir.c
Index: fs/aufs/dir.h
Index: fs/aufs/export.c
Index: fs/aufs/f_op.c
Index: fs/aufs/file.c
Index: fs/aufs/file.h
Index: fs/aufs/i_op_ren.c
Index: fs/aufs/iinfo.c
Index: fs/aufs/inode.c
Index: fs/aufs/inode.h
Index: fs/aufs/misc.h
Index: fs/aufs/module.c
Index: fs/aufs/opts.h
Index: fs/aufs/plink.c
Index: fs/aufs/super.c
Index: fs/aufs/super.h
Index: fs/aufs/sysaufs.c
Index: fs/aufs/sysaufs.h
Index: fs/aufs/vdir.c
Index: fs/aufs/vfsub.h
Index: fs/aufs/wkq.c
Index: fs/aufs/wkq.h
Index: fs/aufs/xino.c
Index: sample/watchguard/probe/probe.c
Index: sample/watchguard/probe/probe.h
- less important changes.

-
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: au_new_inode: broken ino

2007-06-17 Thread sfjro

Jrgen_P._Tjern:
 Branch 0 would be the first branch on the /proc/mounts-line? If so,
 that's /vault/disk3, which is xfs. How do I find largest inode number?

Please send me the output of this script.
Set $path correctly before you execute it.

Junjiro Okajima

--
#!/bin/sh

path=/tmp
tmp=/tmp/$$

set -x
df -i $path
for i in 1 2
do
sudo find $path \
\( \( -name 3.Lbs \
-o -name libxtst6_1.0.1-3build1_i386.deb \
-o -name samba-common_3.0.22-1ubuntu4.2_i386.deb \) \
-fls $tmp.${i}a \) \
-o -printf '%i\n' |
sort -n  $tmp.$i
done

diff -u $tmp.[12]a
diff -u $tmp.[12]

cat $tmp.1a
tail $tmp.1
egrep -w '(805306524|134217865|134217862)' $tmp.[12]
rm -f $tmp.*

-
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: umount busy aufs

2007-06-17 Thread sfjro

Hi,

Tomas M:
 My goal is to properly save all filesystem modifications in the writable 
 branch. So first I tried to cleanly unmount the union, but it's busy and 
 can't be unmounted.

Your aufs is the root filesystem, isn't it?
Generally speaking, the root filesystem cannot be unmounted. It is
remounted as readonly at shutdown/reboot time.

How about this procedure instead of unmounting aufs?

mount -no remount,ro /aufs
for i in $writable_branches
do mount -no remount,ro $i
done
exit

If your xino files were on a hard drive, it is better to specify
'noxino' too.


 So, if the union can't be unmounted, I thought to remove the writable 
 branch from it, using 'mount -o remount,del:/mnt/changes aufs /union'. 
 Unfortunately this doesn't work either and there is no info in dmesg why 
 that failed.

That is strange.
When you executed remount, was your syslogd up and running?
The major reasons to reject deleting a branch are,
- there is only one branch left in aufs.
- a file or something is in use on the branch.
- a directory is in use (which lsof may not show), and the directory
  doesn't exist on any other branch.


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/


Re: au_new_inode: broken ino

2007-06-17 Thread sfjro

 Jrgen_P._Tjern:
  Branch 0 would be the first branch on the /proc/mounts-line? If so,
  that's /vault/disk3, which is xfs. How do I find largest inode number?

Sorry, please add one line.


 #!/bin/sh
 
 path=/tmp
 tmp=/tmp/$$
 
 set -x
 df -i $path
 for i in 1 2
 do

sudo mount -o remount $path

   sudo find $path \
   \( \( -name 3.Lbs \
:::


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/


Re: time delay before changes become visible

2007-06-18 Thread sfjro

Hello Michael,

Michael Towers:
 - I made a live cd using your latest larch scripts.
 - I booted into the live cd and did a pacman -Sl and pacman lists all
 packages in the repos, about 3925 packages.
 - I did a pacman -Syu and all my packages were up to date. Immediately
 after that I do a pacman -Sl again and nothing is listed anymore.
 - I wait about 1 minute and do a pacman -Sl and the 3925 packages are
 listed again.

Thank you for your report.
Are there any message left in your syslog?
Does your packman access only aufs, or a branch filesystem directly?
And please send me the output of 'strace pacman -Sl' which didn't show
the list. I need to know which systemcall returned what error.


 aufs version 20070611 (but also other versions, I think an earlier one
 was worse)

What was worse?


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/


Re: Hidden file bug

2007-06-18 Thread sfjro

Hi,

Igor Karasynskyi:
 after reboot and mounting aufs with new branch 4: br:4=rw:3=ro:2=ro:1=ro
 I don't see this file - OK, but if I do ls /install or cat /install
 then file exist.

Try 3=ro+wh, instead of 3=ro.

By the way, how about /dev/vcsa2 problem at remount,mod?
I hope you have succeeded if you remove the debug patch and apply the
last patch.


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/


Re: umount busy aufs

2007-06-18 Thread sfjro

Tomas M:
 I was just wondering if there is a way to see what resources 
 (files/directories/etc) are used by aufs (perhaps through /proc or 
 /sys). This would help very much. So please consider this as a feature 
 request for aufs sometime in the future :)

I have a plan to show the opened aufs files via sysfs.
In your case, the cause can be the current working directory of a
process. It is just referenced instead of opened.

This debug patch prints 'busy' dentries which represents filenames when
you invoke remount,del. If you don't get any filenames, then it means
you hit other minor reason.


Junjiro Okajima

--
diff -x CVS -x RCS -x .pdiff -rup ../../aufs.anon/aufs/fs/aufs/branch.c 
./fs/aufs/branch.c
--- ../../aufs.anon/aufs/fs/aufs/branch.c   2007-06-18 11:43:34.0 
+0900
+++ ./fs/aufs/branch.c  2007-06-18 22:07:56.069294432 +0900
@@ -592,7 +592,8 @@ static int test_children_busy(struct den
err = -EBUSY;
di_read_unlock(d, AUFS_I_RLOCK);
if (err)
-   LKTRTrace(%.*s\n, DLNPair(d));
+   //LKTRTrace(%.*s\n, DLNPair(d));
+   Dbg(%.*s\n, DLNPair(d));
}
}
di_write_lock_child(root); /* aufs_write_lock() calls ..._child() */

-
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: au_new_inode: broken ino

2007-06-18 Thread sfjro

Jrgen_P._Tjern:
 I removed 3.Lbs as it's not on the fs any more. I ran your script with
 the changes, produced a lot of output. See the attached file. :-)

Sorry, I should write more correctly.
The path you set is /storage and it is aufs mount point, isn't it?
It should be branch path. In your case, probably /vault/disk3 or
something.


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/


Re: au_new_inode: broken ino

2007-06-18 Thread sfjro

Jrgen_P._Tjern:
 I picked the most recent entry in my dmesg, and added that hi and fname
 to the commands. (added 536871063 to the egrep)
 Entry was:
 [1081101.429555] aufs au_new_inode:325:find[31722]: broken ino, b0,
 linux-meta/linux-image-generic_2.6.17.11_i386.deb, hi536871063, i50306.
 Try udba=inotify.
 
 Check attached file for output. :-)

I didn't know that xfs assigns such inode numbers.
Thank you for your tests.

Here is a debug patch to print more information when the message 'broken
ino' was produced. Please reproduce the message and send me the debug
log.


Junjiro Okajima

--
Index: fs/aufs/inode.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/inode.c,v
retrieving revision 1.25
diff -u -p -r1.25 inode.c
--- fs/aufs/inode.c 18 Jun 2007 01:47:16 -  1.25
+++ fs/aufs/inode.c 19 Jun 2007 02:30:16 -
@@ -320,6 +320,20 @@ struct inode *au_new_inode(struct dentry
Warn1(broken ino, b%d, %s, %.*s, hi%lu, i%lu. Try udba=inotify.\n,
  bstart, au_sbtype(h_dentry-d_sb), DLNPair(dentry), h_ino,
  xino.ino);
+   {
+   static unsigned char c;
+   if (!c++) {
+   struct dentry *d = d_find_alias(inode);
+   au_debug_on();
+   DbgDentry(dentry);
+   DbgInode(inode);
+   if (d) {
+   DbgDentry(d);
+   dput(d);
+   }
+   au_debug_off();
+   }
+   }
xino.ino = 0;
err = xino_write0(sb, bstart, h_ino);
if (!err) {

-
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: remount,del maybe doesn't free resources

2007-06-18 Thread sfjro

Hello,

Tomas M:
 But then, if I try to umount the branch (because the branch was a 
 loop-mounted filesystem), sometimes I can see in the dmesg:
 
 VFS: Busy inodes after unmount of loop3, Self=destruct in 5 seconds. 
 Have a nice day...
:::
 So my question is, does aufs completely free all the resources 
 associated with the branch after 'remount,del' is issued? Or does it 
 still use something?

Basically aufs frees all the resources associated with the removed
branch. If you didn't install /sbin/mount.aufs (and other scripts) and
you didn't specify 'noplink' mount option, then unflushed pseudo-linked
inode may still alive.

If you know how to reproduce this problem, try first one of these,
- install aufs scripts to /sbin
- specify noplink

Anyway aufs has something to fix.


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/


Re: remount,del maybe doesn't free resources

2007-06-18 Thread sfjro

Tomas M:
 I modified initrd in order to mount the entire aufs using 'noplink' 
 mount option from the beginning. It doesn't help, there is still the 
 same problem.

What you did is,
- mount -o remount,del:/squashfs /aufs
- umount /squashfs
- some operation
- aufs crashes

Please tell me how to reproduce this problem.
I want to reproduce your environment on my pc.


 I tried the patch you sent me, but it does nothing, or I can't see any 
 output in dmesg after remount,del, I'm sorry.

And EBUSY error returned?
Then it means,
- one or more files were opened on that branch.
or
- there is only one branch left in aufs.

Or can you receive the kernel debug log?
Try,
# echo 8  /proc/sys/kernel/printk
(/etc/syslog.conf)
kern.debug /var/log/debug.log
# restart your_syslog_daemon


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/


Re: remount,del maybe doesn't free resources

2007-06-19 Thread sfjro

Tomas M:
 The 'umount /squashfs' part sometimes causes the error message
 VFS: Busy inodes after unmount loop* ... etc, so I _think_ the loop
:::

About this problem, please test this patch.


 Hm it's hard :) My problem is that I usually can't reproduce it in a
 normal Linux environment, I'm still finding these things in Slax, which
 is a chrooted OS and makes things hard to debug.
 
 Nevertheless, you can download Slax from here
 http://www.slax.org/dl/slax6broken.iso

I will try after your uploading completes.


  I tried the patch you sent me, but it does nothing, or I can't see any 
  output in dmesg after remount,del, I'm sorry.
  
  And EBUSY error returned?
  Then it means,
  - one or more files were opened on that branch.
 
 This is possible but i'm unable to say, I don't know.
 I hope the feature to see this info through /sys
 will be implemented soon :)

Basically, /sys/fs/aufs//opened_files will be equivalent to lsof.
And then EBUSY is not depends upon only the opened files. 
You wrote that lsof reported /dev/initctl was opened.
Are your sure that the device file is NOT inside aufs?
If a process (init or something) invoked before you over-mount /dev, the
process still refers the device file.


Junjiro Okajima

--
diff -x CVS -x RCS -x .pdiff -rup ../../aufs.anon/aufs/fs/aufs/opts.c 
./fs/aufs/opts.c
--- ../../aufs.anon/aufs/fs/aufs/opts.c 2007-06-18 10:51:10.0 +0900
+++ ./fs/aufs/opts.c2007-06-19 15:24:33.679360152 +0900
@@ -764,7 +764,7 @@ static int au_do_opt_simple(struct super
  * minus: error
  */
 static int au_do_opt_br(struct super_block *sb, struct opt *opt, int remount,
-   int *do_refresh)
+   int *do_refresh, int *deleted)
 {
int err;
 
@@ -790,7 +790,7 @@ static int au_do_opt_br(struct super_blo
case Opt_idel:
err = br_del(sb, opt-del, remount);
if (!err)
-   *do_refresh = err = 1;
+   *deleted = *do_refresh = err = 1;
break;
 
case Opt_mod:
@@ -906,7 +906,7 @@ static int verify_opts(struct super_bloc
 
 int au_do_opts_mount(struct super_block *sb, struct opts *opts)
 {
-   int err, do_refresh;
+   int err, do_refresh, deleted;
struct inode *dir;
struct opt *opt;
unsigned int flags, given;
@@ -935,10 +935,11 @@ int au_do_opts_mount(struct super_block 
au_flag_clr(sb, AuFlag_XINO | AuFlag_DLGT);
udba_set(sb, AuFlag_UDBA_REVAL);
 
-   do_refresh = 0;
+   deleted = do_refresh = 0;
opt = opts-opt;
while (err = 0  opt-type != Opt_tail)
-   err = au_do_opt_br(sb, opt++, /*remount*/0, do_refresh);
+   err = au_do_opt_br(sb, opt++, /*remount*/0, do_refresh,
+  deleted);
if (err  0)
err = 0;
else if (unlikely(err  0))
@@ -996,7 +997,7 @@ int au_do_opts_mount(struct super_block 
 }
 
 int au_do_opts_remount(struct super_block *sb, struct opts *opts,
-  int *do_refresh, unsigned int *given)
+  int *do_refresh, unsigned int *given, int *deleted)
 {
int err, rerr;
struct inode *dir;
@@ -1012,7 +1013,7 @@ int au_do_opts_remount(struct super_bloc
//AuDebugOn(au_flag_test(sb, AuFlag_UDBA_INOTIFY));
 
err = 0;
-   *do_refresh = 0;
+   *deleted = *do_refresh = 0;
*given = 0;
dlgt = au_flag_test(sb, AuFlag_DLGT);
opt_xino = NULL;
@@ -1025,7 +1026,8 @@ int au_do_opts_remount(struct super_bloc
au_flag_clr(sb, AuFlag_DLGT);
 
if (!err)
-   err = au_do_opt_br(sb, opt, /*remount*/1, do_refresh);
+   err = au_do_opt_br(sb, opt, /*remount*/1, do_refresh,
+  deleted);
if (!err)
err = au_do_opt_xino(sb, opt, /*remount*/1, opt_xino);
 
diff -x CVS -x RCS -x .pdiff -rup ../../aufs.anon/aufs/fs/aufs/opts.h 
./fs/aufs/opts.h
--- ../../aufs.anon/aufs/fs/aufs/opts.h 2007-06-18 10:51:10.0 +0900
+++ ./fs/aufs/opts.h2007-06-19 15:38:47.967488616 +0900
@@ -90,7 +90,7 @@ void au_free_opts(struct opts *opts);
 int au_parse_opts(struct super_block *sb, char *str, struct opts *opts);
 int au_do_opts_mount(struct super_block *sb, struct opts *opts);
 int au_do_opts_remount(struct super_block *sb, struct opts *opts,
-  int *do_refresh, unsigned int *given);
+  int *do_refresh, unsigned int *given, int *deleted);
 
 #endif /* __KERNEL__ */
 #endif /* __AUFS_OPTS_H__ */
diff -x CVS -x RCS -x .pdiff -rup ../../aufs.anon/aufs/fs/aufs/super.c 
./fs/aufs/super.c
--- ../../aufs.anon/aufs/fs/aufs/super.c2007-06-18 10:53:21.0 
+0900
+++ ./fs/aufs/super.c   2007-06-19 15:40:42.172126872 +0900
@@ -432,6 +432,66 @@ 

Re: remount,del maybe doesn't free resources

2007-06-19 Thread sfjro

Tomas M:
 This was a different problem.
 Please consider our conversation about /dev/initctl resolved.
 
 I am working with two problems which are not related together:

I am afraid you are confusing my two patches. :-)


 One is the problem of unmounting union (which probably doesn't work 
 because init process is started from it). (please consider this resolved)

The last debug patch is for this problem, which include Dbg(...) line.
It just reports dentries in use.


 Second problem is I'm trying to remove branches while the system is 
 running KDE, and here I get the problem with busy inodes on loop.

The last patch which you are going to try is for this problem.


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/


Re: au_new_inode: broken ino

2007-06-22 Thread sfjro

Jrgen_P._Tjern:
 Here is the dmesg, it has only occured once after I applied the patch. I
 also updated to the newest aufs. :-) The machine isn't being used as
 regularly during summer, so use-pattern is a bit different now. :-)
 
 I hope this helps!

Thank you very much for your tests.
Currently I am considering about the bug in aufs inotify handler.
Do you know whether this file 'Simon and Garfunkel ... .mp3' has ever
been renamed or not?


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/


Re: au_new_inode: broken ino

2007-06-22 Thread sfjro

Hello Alexey,

Alexey Bazhin:
 I'm having same trouble, but i'm using udba=reval and have no
 modifications to branches or aufs at all... and i'm also using xfs...

Thank you for your report.
Then a bug probably lives outside inotify.

If you know how to reproduce this problem, let me know.


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-06-24 Thread sfjro

o current problem
- isolated inode survived deleting a branch (still testing).
- getdents(2) returns nothing.
- cpup_wh_file() failure.
- setting inode number which was previously assigned (broken ino
  msg).
- hang at reboot/shutdown (it may not be an aufs problem).

o bugfix
- bugfix: skip non-aufs files at chaging the branch permission,
  reported by Igor Karasynskyi.
- bugfix: test isolated inodes too at deleting branch, reported by
  Tomas M.
- bugfix: call iput() for the isolated inode on the deleted branch,
  reported by Tomas M.
- bugfix: detect newly appeared whiteout which exists on a inserted
  branch.
- bugfix: refresh all dentries and inodes when adding/modifying a
  whiteout-able branch, and deleting a branch.

o news
- temporary workaround for the inode number 1 on cramfs.
- note for discontigous inode numbers.

o misc
- refine option handling and some function arguments.
- stop firing inotify when rename_whtmp().
- restore iigen after fired inotify when rename dir.
- set 0 to bindex explicitly when prepending a branch.
- testing cpup, xino, MagicSysRq key.


Junjiro Okajima

--

Index: fs/aufs/branch.c
- bugfix: test isolated inodes too at deleting branch, reported by
  Tomas M.
- bugfix: skip non-aufs files at chaging the branch permission,
  reported by Igor Karasynskyi.

Index: fs/aufs/cpup.c
- testing cpup bug.

Index: fs/aufs/dentry.c
- bugfix: detect newly appeared whiteout which exists on a inserted
  branch.

Index: fs/aufs/i_op_del.c
- stop firing inotify when rename_whtmp().

Index: fs/aufs/i_op_ren.c
- restore iigen after fired inotify when rename dir.

Index: fs/aufs/inode.c
- bugfix: call iput() for the isolated inode on the deleted branch,
  reported by Tomas M.

Index: fs/aufs/inode.h
- bugfix: call iput() for the isolated inode on the deleted branch,
  reported by Tomas M.
- restore iigen after fired inotify when rename dir.

Index: fs/aufs/Makefile
Index: fs/aufs/aufs.h
Index: fs/aufs/module.c
Index: fs/aufs/module.h
Index: fs/aufs/sysaufs.c
Index: fs/aufs/sysaufs.h
- testing MagicSysRq key.

Index: fs/aufs/opts.c
- testing xino bitmap.
- set 0 to bindex explicitly when prepending a branch.
- refine option handling and some function arguments.
- bugfix: refresh all dentries and inodes when adding/modifying a
  whiteout-able branch, and deleting a branch.

Index: fs/aufs/opts.h
- testing xino bitmap.
- refine option handling and some function arguments.

Index: fs/aufs/sbinfo.c
- testing xino bitmap.

Index: fs/aufs/super.c
- testing xino bitmap.
- bugfix: call iput() for the isolated inode on the deleted branch,
  reported by Tomas M.
- bugfix: refresh all dentries and inodes when adding/modifying a
  whiteout-able branch, and deleting a branch.

Index: fs/aufs/super.h
- testing xino bitmap.
- temporary workaround for the inode number 1 on cramfs.

Index: fs/aufs/vdir.c
- testing readdir.

Index: fs/aufs/xino.c
- testing xino bitmap.

Index: util/aufs.in.5
- temporary workaround for the inode number 1 on cramfs.
- note for discontigous inode numbers.

Index: fs/aufs/file.c
Index: fs/aufs/iinfo.c
Index: include/linux/aufs_type.h
Index: sample/diskless/comount.sh
Index: sample/diskless/def.mk
- less important changes.

-
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: Not all files are deleted

2007-06-25 Thread sfjro

Hello Philippe,

Philippe Malinge:
 I wrote a script (Cf. end of mail) creating 16384 files in a dummy
 directory (aufs directory), named dummy.3312, without problem.
:::
 It seems that each round deletes only the half of number files.
 
 If I do the same on standard NFS directory, no problem : all files and
 directory are removed at #1 round.

Let me make sure,
- on nfs client, you have mounted the nfs with 'proto=tcp' option.
- it was nfs client where you executed the script and rm -fr.
- nobody (both on nfs-server and nfs-client) was accessing the files.
- when you export /diskless/cow/node2, the client succeeds rm -fr.
Am I right?

Just after you failed rm -fr, can you see the files named '.nfsXXX...?'


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/


Re: Not all files are deleted

2007-06-26 Thread sfjro

Hi,

Philippe Malinge:
  - it was nfs client where you executed the script and rm -fr.
 
 Yes, nfs client run : rm -fr /mnt/dummy.3312
:::
  Just after you failed rm -fr, can you see the files named '.nfsXXX...?'
 
 No, but dummy.3312 was created on a read-only fs, and I try to remove it
 from /mnt, I can see /diskless/cow/node2/dummy.3312/.wh. files. The
 number of those files equals the number of removed files but not all as
 expected (rm -fr /diskless/cow/node2/dummy.3312).

I think I am confused.
Do you mean you executed the script on nfs server? to the RO branch?
Or 'read-only fs' was just a typo?

Were the '.nfsXXX...' files left under client:/mnt/dummy.3312?

And do you mean that after rm -fr failure there left the whiteouts
(dummy.3312/.wh.) and the regular files (dummy.3312/)?
Won't you try strace to see the return value of unlink(2) to the children?


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/


Re: Not all files are deleted

2007-06-27 Thread sfjro

Hi Philippe,

Philippe Malinge:
 I guess below information will clarify the issue.

Now we have common recognition that the target dir in on writable branch
filesystem.
And I need to ask you the same question again,

  And do you mean that after rm -fr failure there left the whiteouts
  (dummy.3312/.wh.) and the regular files (dummy.3312/)?
  Won't you try strace to see the return value of unlink(2) to the children?

Shall we make these things clear by the output of strace?
- rm(1) got all the entries under the dir.
- rm(1) issued unlink(2) to all the gotten entries.
- all unlink(2) succeeded.

On my test environment, aufs on nfs-server can remove the dir who has
16384 children. Of course 'rm -fr' is executed on nfs-client.


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/


Re: Not all files are deleted

2007-06-27 Thread sfjro

Hi Philippe,

Philippe Malinge:
 please find attached strace files for each round of rm -fr dummy.3312
 executed on nfs-client side.
 strace files are named using the round number (1, 2, 3, 4, 5)

Thank you for your test.
I believe it is a known problem which was reported recently by a few
people.

Aufs readdir(3)/getdents(2) doesn't return the entry. There seems to be
a time-lag until all the entries visible from aufs.
Now I am preparing to dive into this problem.
Please wait for a while.

In your case, 'mount -o remount /your/aufs' just before 'rm -fr' may
help you.


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/


Re: RFC patch for porting aufs to rt kernel (2.6.21.5-rt17)

2007-06-27 Thread sfjro

Tapani_Rikknen:
 Andrew Burgess kirjoitti:
  To get aufs to cpmpile under 2.6.21.5-rt17
  I changed fs/aufs/misc.h from:
 I just compiled 2.6.21.5 with rt18 patch =
 
 (http://people.redhat.com/mingo/realtime-preempt/) WITHOUT CHANGING =
 
 ANYTHING and was surpised that it compiled fine! I have never succeeded =
 
 with -rt patch and unionfs or aufs before (perhaps leaving ISA support =
 
 out helped).

But the read-write semaphore in RT patch doesn't support downgrade which
means changing write-lock to read-lock.
I'd suggest RT users to begin with inserting this to aufs.h. (I have
never tried RT patch)
This macros make aufs to use (standard) compat_rw_semaphore, instead of
rt_rw_semaphore.

#ifdef CONFIG_PREEMPT_RT
#define rw_semaphorecompat_rw_semaphore
#define init_rwsem  compat_init_rwsem
#endif


 CC [M] fs/aufs/branch.o
 fs/aufs/branch.c: In function =91br_mod=92:
 fs/aufs/branch.c:884: warning: initialization from incompatible pointer =
 
 type
 fs/aufs/branch.c:884: warning: comparison of distinct pointer types =
 
 lacks a cast

Is your line 884 this?
list_for_each_entry(file, sb-s_files, f_u.fu_list) {


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/


Re: remount,del maybe doesn't free resources

2007-06-27 Thread sfjro

Tomas M:
 I didn't test the patch you sent me last time yet because I'm packing 
 some stuff and I'm leaving to holidays for 10 days. So no need to hurry, 
 take your time :)

Hi Tomas,

When you return from your vacation, please test the latest aufs (last
Monday release).


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/


Re: au_new_inode: broken ino

2007-07-02 Thread sfjro

Jrgen P. Tjern:
 [2297447.631266] aufs 20070702
 [2297509.899071] aufs au_new_inode:347:smbd[27416]: Un-notified UDBA or
 directly renamed dir, b0, xfs, Simon - Garfunkel - The Best Of Simon -
 Garfunkel - Song For The Asking.mp3, hi1610612893, i16.

 It's not an access directly to the underlying fs, so how come this
 happens? Is this anything like hte broken_ino?

It is equivalent to the old msg 'broken ino.'
And as I wrote, it is harmless basically.

I think I found the root cause.
Probably current aufs cannot handle 'too large inode number', in your
case 1610612893 on xfs.
The aufs xino file is indexed by the inode number on branch fs. If the
inode number is too large, it may exceed the file size limit.


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/


Re: au_new_inode: broken ino

2007-07-02 Thread sfjro

 Jrgen P. Tjern:
  [2297447.631266] aufs 20070702
  [2297509.899071] aufs au_new_inode:347:smbd[27416]: Un-notified UDBA or
  directly renamed dir, b0, xfs, Simon - Garfunkel - The Best Of Simon -
  Garfunkel - Song For The Asking.mp3, hi1610612893, i16.

Please show me your /sys/fs/aufs/*/xino file, if it exists.
And please try this patch.

Junjiro Okajima

--
Index: fs/aufs/xino.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/xino.c,v
retrieving revision 1.32
diff -u -p -r1.32 xino.c
--- fs/aufs/xino.c  2 Jul 2007 05:11:13 -   1.32
+++ fs/aufs/xino.c  2 Jul 2007 12:58:23 -
@@ -151,7 +151,8 @@ int xino_write(struct super_block *sb, a
 
br = stobr(sb, bindex);
AuDebugOn(!br || !br-br_xino);
-   pos = h_ino * sizeof(*xino);
+   pos = h_ino;
+   pos *= sizeof(*xino);
sz = xino_fwrite(stosi(sb)-si_xwrite, br-br_xino, xino, sizeof(*xino),
 pos);
//if (LktrCond) sz = 1;
@@ -358,7 +359,8 @@ int xino_read(struct super_block *sb, au
br = stobr(sb, bindex);
file = br-br_xino;
AuDebugOn(!file);
-   pos = h_ino * sizeof(*xino);
+   pos = h_ino;
+   pos *= sizeof(*xino);
if (i_size_read(file-f_dentry-d_inode)  pos + sizeof(*xino))
return 0; /* no ino */
 

-
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: Not all files are deleted

2007-07-02 Thread sfjro

Hello,

 Philippe Malinge:
  please find attached strace files for each round of rm -fr dummy.3312
  executed on nfs-client side.
  strace files are named using the round number (1, 2, 3, 4, 5)
 
 Thank you for your test.
 I believe it is a known problem which was reported recently by a few
 people.

I could reproduce your problem.
If your 'rm' command version is less than 'rm (GNU coreutils) 6.9+',
please try the latest 'rm.'

I will try aufs will work on older rm, but it may be hard.


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-09 Thread sfjro

o current problems
- setting inode number which was previously assigned (broken ino
  msg) (testing).
- getdents(2) returns nothing. this may involve two problems. (it was
  one. testing)
- cpup_wh_file() failure. (testing)

o bugfix
- bugfix: force rewind at re-initializing vdir, reported by Michael
  Towers, Jorgen P. Tjerno and Sandino Flores Moreno.
- bugfix: copyup unlinked file.
  + bug #1, the file may or may not be opened, aufs needs to hold the
copied-up temporary dentry, reported by Andreas Baetz.
  + bug #2, the file may be opened in multiple times.
  + stop dropping in cpup_regular().
  + revert AuDebugOn() from temporary WARN_ON().
  + move cpup_wh_file() in file.c to cpup.c as generic cpup_wh().
  + print wh_dentry in iinfo.
  + set wh_dentry in iifno.
  + call cpup_wh() when the file was removed.
- bugfix: overflow in multiply, reported by Jorgen P. Tjerno and Alexey
  Bazhin.
- bugfix: possible overflow in multiply.

o misc
- si_read/write_lock() supports AuLock_FLUSH which flushes the
  remaining hinotify hanlder.
- maintain the number of 'nowait' tasks.
- testing where si_read_trylock() should be called.
- testing CONFIG_AUFS_ROBR
- ksize.patch will be unnecessary after linux-2.6.22, kzrealloc() calls
  krealloc().
- extract a part of inode.h as a new file hinode.h.
- support lockdep at removing nfs branch.
- use hi_lock/unlock() for a hidden inodes, instead of i_lock/unlock().
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].
- rename i_lock/unlock() to vfsub_i_lock/unlock().
- rename filldir_ino_t to au_filldir_ino_t.
- rename AUFS_{DEBLK,NHASH}_SIZE to AuSize_{DEBLK,NHASH}.
- refine the message string.
- move au_hinotifyq to wkq.h as au_nowait_tasks, new inline functions
  au_nwt_{init,inc,dec,flush}().
- move read/writef_t to super.h.
- rename find_sb_locked() to find_sb_lock().
- extract a part of this file as vserver.patch.
- consolidate arguments of do_diropq() as flags.
- consolidate arguments of au_wkq_run() as flags.
- testing FaunOS.


Junjiro Okajima

--

Index: Kconfig.in
Index: fs/aufs/module.c
- ksize.patch will be unnecessary after linux-2.6.22.

Index: vserver.patch
- forgot to check-in last week.

Index: fs/aufs/aufs.h
- introduce a new header file hinode.h.

Index: fs/aufs/branch.c
- support lockdep at removing nfs branch.
- use hi_lock/unlock() for a hidden inodes, instead of i_lock/unlock().
- testing CONFIG_AUFS_ROBR
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].

Index: fs/aufs/cpup.c
- bugfix: copyup unlinked file.
  + bug #1, the file may or may not be opened, aufs needs to hold the
copied-up temporary dentry, reported by Andreas Baetz.
  + bug #2, the file may be opened in multiple times.
  + stop dropping in cpup_regular().
  + revert AuDebugOn() from temporary WARN_ON().
  + move cpup_wh_file() in file.c to cpup.c as generic cpup_wh().
- use hi_lock/unlock() for a hidden inodes, instead of i_lock/unlock().
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].

Index: fs/aufs/cpup.h
- bugfix: copyup unlinked file.
  + move cpup_wh_file() in file.c to cpup.c as generic cpup_wh().

Index: fs/aufs/debug.c
- rename AUFS_NHASH_SIZE to AuSize_NHASH.
- bugfix: copyup unlinked file.
  + print wh_dentry in iinfo.

Index: fs/aufs/dentry.c
- testing CONFIG_AUFS_ROBR
- use hi_lock/unlock() for a hidden inodes, instead of i_lock/unlock().
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].
- si_read/write_lock() supports AuLock_FLUSH which flushes the
  remaining hinotify hanlder.

Index: fs/aufs/dinfo.c
Index: fs/aufs/i_op_del.c
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].

Index: fs/aufs/dir.c
- si_read/write_lock() supports AuLock_FLUSH which flushes the
  remaining hinotify hanlder.
- rename i_lock/unlock() to vfsub_i_lock/unlock().
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].
- rename filldir_ino_t to au_filldir_ino_t.

Index: fs/aufs/dir.h
- use typedef instead of macro.
- rename AUFS_{DEBLK,NHASH}_SIZE to AuSize_{DEBLK,NHASH}.

Index: fs/aufs/export.c
- rename filldir_ino_t to au_filldir_ino_t.
- rename i_lock/unlock() to vfsub_i_lock/unlock().
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].
- si_read/write_lock() supports AuLock_FLUSH which flushes the
  remaining hinotify hanlder.
- testing CONFIG_AUFS_ROBR

Index: fs/aufs/f_op.c
- si_read/write_lock() supports AuLock_FLUSH which flushes the
  remaining hinotify hanlder.
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].
- rename i_lock/unlock() to vfsub_i_lock/unlock().
- testing CONFIG_AUFS_ROBR
- use hi_lock/unlock() for a hidden inodes, instead of i_lock/unlock().

Index: fs/aufs/file.c
- use hi_lock/unlock() for a hidden inodes, instead of i_lock/unlock().
- si_read/write_lock() supports AuLock_FLUSH which flushes the
  remaining hinotify hanlder.
- rename AUFS_[ID]_[RW]LOCK to AuLock_[ID][RW].
- bugfix: copyup unlinked file.
  + move cpup_wh_file() in file.c to cpup.c as generic cpup_wh().
  + set wh_dentry in iifno.

Index: 

Re: umount busy aufs

2007-07-09 Thread sfjro

Hello Tomas,
Do you remember this mail?

Tomas M:
 I was just wondering if there is a way to see what resources 
 (files/directories/etc) are used by aufs (perhaps through /proc or 
 /sys). This would help very much. So please consider this as a feature 
 request for aufs sometime in the future :)

Currently I am planning to print these things on memory. Do you think
more things?
- mounted superblock
- root dentry
- root inode
- inode without dentry

The last thing in the above list was the trigger of our previous
problem, the inode which was set inotify by KDE.
Generally, lsof command shows the opend files. So I don't think they are
necessary here.


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/


Re: bug in kernel 2.6.22 with removing branches

2007-07-11 Thread sfjro

Hello Chris,

chris rogers:
 I try removing a branch and it crash the kernel 2.6.22. So the kernel 2.6.22 
 should not be supported yet. Add branches have no problems. It works like 
 normal. So i think its cause of the new mount option trunc_xib and 
 notrunc_xib that this is happen. But if its only in kernel 2.6.22 as far as 
 know. 
 
 I will test aufs with my old kernel 2.6.21.5 to see if happens again.

Thank you for your reports.
I will build 2.6.22 on my pc, but it will take a time since my harddrive
is almost full.
Will you send me the kernel stack trace when it crashed?


 I hope this will get fix in the next week.

I'll try, but I am not sure I can fix it.


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/


Re: mount aufs test_add

2007-07-12 Thread sfjro

Tomas M:
 As I can read aufs/branch.c, line 377, there is a test if inode-i_nlink 
 ... nevertheless 'stat /mnt' outputs Links: 4. I have no idea if this 
 information is relevant though :)
 
 Should the posixovl filesystem be fixed, or should aufs be fixed?

I tried adding a branch which is mounted by
FUSE_CVS/fuse/example/fusexmp.c, and succeeded.
If you try fusexmp and it succeeds, then the posixovl should be fixed.

Just a guess, executing 'stat /mnt' before mounting aufs may affect the
result.


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/


Re: mount aufs test_add

2007-07-12 Thread sfjro

Tomas M:
  I tried adding a branch which is mounted by
  FUSE_CVS/fuse/example/fusexmp.c, and succeeded.
  If you try fusexmp and it succeeds, then the posixovl should be fixed.
 
 Thank you for the answer.

I noticed that you may be misunderstanding what I wrote.
It may depends upon the fuse version, kernel version or something else.
If you try fusexmp or another fuse and it succeeds, then you can check
the difference between the one and the posixovl.


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/


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-16 Thread sfjro

 I guess fuse lookup will be called if you override it.
 That's why I suggest it.
 Additionally, mount.posixovl needs to initialize its root inode, since
 the root inode is always in cache and lookup for it will not be called.

Note:
- 'the root inode' here means the root of posixovl fs.
- in your case, at least, intializing root inode will solve the problem.


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/


Re: posixovl+aufs again

2007-07-17 Thread sfjro

Tomas M:
 Just for the case somebody is interested, here is the patch which should 
 fix the problem in kernel:

Interesting fixing.
Will find(1) on this fuse complain about the dir nlink?


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/


Re: Inclusion in the kernel?

2007-07-18 Thread sfjro

Hello Russell,

Russell Harmon:
 I was just wondering, has anyone tried to get aufs included in the
 kernel? If not, why not?

Currently, I don't have a plan to ask kernel people to include aufs.
But someday I will try it.


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/


Re: fuse+aufs

2007-07-18 Thread sfjro

Miklos Szeredi:
 Basically yes.  Accessing the file type in inode-i_mode is OK, but
 for all other fields getattr() needs to be called.
 
  If it is true, current linux lookup routines are totally broken since
  they check inode.i_mode so often without vfs_getattr().
 
 They only check the file type.

When you create/remove something, lookup operation involves accessing
inode-i_uid, i_gid, permission bits in i_mode, i_ino and i_flags.

For example,
- lookup involves permission check which uses i_flags. i_flags is
  handled by ioctl generally. in this case, ioctl(GETFLAGS) or something
  is necessary too?
- may_open() checks inode-i_uid.
- unlink(2) and rmdir(2) check the sticky bit and inode-i_uid.
- notify_change() which is called by chmod family is checking i_[ug]id.
- find_inode_number() searches the cached inode by its name and returns
  i_ino.
- vfs_quota_on() calls path_lookup() and then write back the gotten
  inode by vfs_quota_on_inode() and write_inode_now(). It involves
  referenccing and updating inode members.
- while I don't know whether fuse supports NFS-export or not, nfsd
  depends upon inode-i_ino in many cases (before NFS GETATTR
  operation).

Are they all wrong too?
Or i_nlink is the exception?


 It wouldn't help.  The problem is that fuse doesn't (and cannot)
 initialize the fields of the root inode at mount time.

What I meant is, for example, to issue stat(2) just after fuse_main().
Is it unavialbe too?


 Note, that relying on cached attribute values is wrong anyway, in
 network filesystems the attributes can become stale and need to be
 refreshed before being used.

Yes, that's why d_revalidate and FS_REVAL_DOT exists.
But revalidating or refreshing doesn't involve getattr I think.


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/


Re: fuse+aufs

2007-07-19 Thread sfjro

Miklos Szeredi:
  But I could understand that you are still asserting getattr is
  necessary even in the cases of may_open() or something, and that is a
  VFS lookup bug.
  Am I right?
 
 Yes :)

It is very hard for me that they are VFS lookup bug.
If they are really VFS lookup bug, you or Tomas should ask for kernel
people to fix them.


 That would just be papering over the real problem, a race would still
 be there, and the use of stale meta-data for network filesystems (fuse
 or non-fuse) would still be there.

The network filesystems should have their dentry/inode caches and reuse
them within the specified period as their lifetime. After the period
expired, the dentry should be revalidated and lookup (and refresh its
attribute) if needed. Within the period, the staleness will be allowed
since they are remote.


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/


Re: fuse+aufs

2007-07-19 Thread sfjro

Miklos Szeredi:
  It is very hard for me that they are VFS lookup bug.
 
 Why?  What has the sticky check or the O_NOATIME check to do with
 aufs?

If it was VFS bug, it must be a generic problem, not specific to aufs.
While you have mentioned about the race problem, the permission check in
lookup is done without i_mutex/i_lock held. Do you think it is a bug
too?

But I gave up discussing about lookup and getattr with you.
Now FUSE becomes very special thing to me and aufs. For users, aufs will
call vfs_getattr in case of the branch is FUSE.


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/


Re: fuse+aufs

2007-07-19 Thread sfjro

Tomas M:
 I prefer to just mention this problem in aufs documentation, so people 
 will 'stat' a fuse-based filesystem's mountpoint before adding it as 
 aufs branch.

It is not enough since Miklos thinks getattr is necessary for every VFS
lookup. Of course, I don't agree.


 I don't understand whether FUSE does the right think or AUFS does it the 
 right way, nevertheless I prefer to keep aufs code clean, that means, 
 don't implement any workarounds for special filesystems.

I am feeling it is time to handle FUSE specially.
It will be rough or imcomplete and tiny handling. Because according to
him, the bug is in VFS. It means a lower filesystem hardly fix it.


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/


Re: [fuse-devel] fuse+aufs

2007-07-19 Thread sfjro

Miklos Szeredi:
 You misunderstand.  What I think is:
 
 To be able to correctly perform permission checks based on cached
 inode attributes, those attributes may need to be refreshed before
 making the permission checks.

You seem to be replacing the problem.
The problem is more generic, not only permission check.
What you wrote is,
- in order to refer any inode attributes except file type in i_mode, the
  caller have to update the inode.
- the caller must not rely on the inode attributes in a positive dentry
  which is returned by path_lookup().
isn't it?
The two cases you mentioned (sticky bit and may_open()) is a part of
the list I wrote as example where VFS accesses inode attributes.
And I don't have a paticular opinion about judging those are bugs.

I already decided to add a special handling for fuse into aufs.
Because you wrote,
- you are the one who expected to fix VFS about this issue.
- you have another thing more important.


 Let's take a concrete example:
:::
 Should that rmdir succeed?  Surely not, the sticky check would fail.
 But if the stale attributes are used, than it _will_ succeed.

I thought we have already agreed about the staleness of cached nfs
inode including REVAL_DOT.


Junjiro Okajima

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/


Re: fuse+aufs

2007-07-22 Thread sfjro

Tomas M:
   Now FUSE becomes very special thing to me and aufs.
   For users, aufs will call vfs_getattr in case of the branch is FUSE.
 
 I prefer to just mention this problem in aufs documentation, so people 
 will 'stat' a fuse-based filesystem's mountpoint before adding it as 
 aufs branch.

Tomas,

I have implemented a workaround for fuse in today's aufs release.
While it is still testing on my pc, will you try enabling
CONFIG_AUFS_WORKAROUND_FUSE and add your fuse-fs as an aufs branch?

Thanx in advance.
Junjiro Okajima

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/


Re: Makefile?

2007-07-24 Thread sfjro

 It is better to post it to the ML since I think who needs this makefile
 is aufs users instead of me.

Oh, I didn't realize that his mail was sent to the ML.
Sorry.

Junjiro Okajima

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/


  1   2   3   4   5   6   7   8   9   10   >