Coda File System

Re: a rename() bug?

From: Peter J. Braam <braam_at_cs.cmu.edu>
Date: Sat, 4 Jul 1998 20:43:25 -0400 (EDT)
Bruce,

Thanks a lot -- I was aware of this.  This is exactly the same code idea
as the one in NFS's rename, and you cannot rename an open file at the
moment.   

The dentry stuff is tricky, but we'll find a better way.  

Have you seen any "still has aliases" messages?  It was my target to first
get those under control and then fix this issue.

Thanks again!

Peter


On Sun, 5 Jul 1998, Bruce Janson wrote:

>     From braam_at_cs.cmu.edu Mon Jun 29 03:07:46 1998
>     ..
>     you too can do massive testing particularly of rename and unlink as well
>     ..
> 
> Linux 2.1.107 + Coda 4.6.0.
> 
> The following program:
> 
> 	static char	*src	= "/coda/src";
> 	static char	*dest	= "/coda/dest";
> 
> 	void
> 	fail(char *p)
> 	{
> 		perror(p);
> 		exit(1);
> 	}
> 
> 	main()
> 	{
> 		int	fd;
> 
> 		(void)unlink(dest);
> 
> 		if ((fd = creat(src, 0600)) == -1)
> 			fail("creat()");
> 
> 		if (rename(src, dest) == -1)
> 			fail("rename()");
> 	}
> 
> when executed as root should succeed silently but instead,
> fails with:
> 
> 	rename(): Device or resource busy
> 
> This came up while trying to determine why "crontab -e" was
> failing on our dataless Coda client.
> 
> Regards,
> bruce.
> 
Received on 1998-07-04 20:45:14