Sorry, perhaps we are missing any point. 

I was testing exporting XFS, and now I've repeated
the test with ext2. (using my /boot ;) )

I can't imagine what is wrong:

[EMAIL PROTECTED]:/# exportfs -o no_root_squash localhost:/boot
[EMAIL PROTECTED]:/# mount localhost:/boot /mnt
[EMAIL PROTECTED]:/# mount |grep mnt
localhost:/boot on /mnt type nfs (rw,addr=127.0.0.1)
[EMAIL PROTECTED]:/# cd /mnt
[EMAIL PROTECTED]:/mnt# mkdir A; touch A/B; ln A/B B; tail -f A/B &
[1] 9267
[EMAIL PROTECTED]:/mnt# rm A/B; rmdir A
rmdir: A: Directory not empty
[EMAIL PROTECTED]:/mnt# echo AAAA >> B
[EMAIL PROTECTED]:/mnt# AAAA

With aufs the exactly same test has a diferent behaviour, 

But in your tests, the "rm A/B" is truncating the file? Even
existing the hard link?

Thanks,

Bona

p.s.: The problem is that I would like to export via NFS an
AUFS root including the /tmp. Actually I export a readonly 
root, then mount the new root using aufs and chroot to it. 
But with a /tmp being AUFS exported via NFS, mutt and 
some other apps didn't work correctly.

The test was extracted "stracing" mutt lock:

open("/tmp/.muttIOAHhM/mutt-bowmore-1413-22816-0", 
O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE|O_NOFOLLOW, 0600) = 4
link("/tmp/.muttIOAHhM/mutt-bowmore-1413-22816-0", 
"/tmp/mutt-bowmore-1413-22816-0") = 0
stat64("/tmp/.muttIOAHhM/mutt-bowmore-1413-22816-0", {st_mode=S_IFREG|0600, 
st_size=0, ...}) = 0
stat64("/tmp/mutt-bowmore-1413-22816-0", {st_mode=S_IFREG|0600, st_size=0, 
...}) = 0
unlink("/tmp/.muttIOAHhM/mutt-bowmore-1413-22816-0") = 0
unlink("/tmp/.muttIOAHhM/mutt-bowmore-1413-22816-0") = -1 ENOENT (No such file 
or directory)
rmdir("/tmp/.muttIOAHhM")               = -1 ENOTEMPTY (Directory not empty)
lstat64("/tmp/mutt-bowmore-1413-22816-0", {st_mode=S_IFREG|0600, st_size=0, 
...}) = 0
fstat64(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fcntl64(4, F_GETFL)                     = 0x28001 (flags 
O_WRONLY|O_LARGEFILE|O_NOFOLLOW)
fstat64(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb741c000
_llseek(4, 0, [0], SEEK_CUR)            = 0
_llseek(3, 0, [62540613], SEEK_CUR)     = 0




On Tue, Oct 09, 2007 at 11:02:59AM +0900, [EMAIL PROTECTED] wrote:
> 
> "Luis Carlos Erpen de Bona":
> > > What will happen if you export ext2 instead of aufs, execute tail and
> > > rm? Is the behaviour is different?
> > Yes. Even in NFS it works correctly. If the file still
> > existing (with a hard link, the inode count is not 0 when
> > you delete A/B) the file descriptor should stay working.
> 
> What is the behaivour you expected in 'Even in NFS it works correctly'?
> I've tested your command sequence (of course, including 'ln') on nfs
> which is exported ext2. And the behaviour is equal to the exported aufs.
> 
> 
> 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/

Reply via email to