From owner-freebsd-fs Wed Sep 27 12:10: 7 2000 Delivered-To: freebsd-fs@freebsd.org Received: from pedigree.cs.ubc.ca (pedigree.cs.ubc.ca [142.103.6.50]) by hub.freebsd.org (Postfix) with ESMTP id 81F6237B422 for ; Wed, 27 Sep 2000 12:09:59 -0700 (PDT) Received: from cascade.cs.ubc.ca (dima@cascade.cs.ubc.ca [142.103.7.7]) by pedigree.cs.ubc.ca (8.8.8/8.6.9) with ESMTP id MAA23112 for ; Wed, 27 Sep 2000 12:09:54 -0700 (PDT) From: Dmitry Brodsky Received: (dima@localhost) by cascade.cs.ubc.ca (8.9.3/8.6.12) id MAA13804 for freebsd-fs@freebsd.org; Wed, 27 Sep 2000 12:09:54 -0700 (PDT) Message-Id: <200009271909.MAA13804@cascade.cs.ubc.ca> Subject: stackable fs & rename problem To: freebsd-fs@freebsd.org Date: Wed, 27 Sep 2000 12:09:54 -0700 (PDT) X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I am building a stackable FS using nullfs as a template; this is under FreeBSD 4.0-RELEASE. When rename is called the files being renamed are backed up. So if in a directory you have a files A and B and you do rename( A, B ), the files will first be backed up and copies will be made of A and B. The problem I am having is the following: If we have just one file A and we do rename( A, B ) then everything works as it should. If we also have B and we do rename( A, B ) then after the call completes and I do an ls on the fs I get: ls: B: Bad file descriptor This only occurrs if B exists. Now if I do rename( B, C ), the command completes without any complaints and C exists and contains the contents of A as it should. Does anybody have any idea what might be going on. It seems that if A and B exists and I do an vn_open on A or B then things will get messed up. I looked in the code for rename in kern/vfs_syscalls.c and I don't see much of a difference in terms of paths taken in the rename function. Note, I do the same thing in remove without any problems. Thanks for any help ttyl Dima -- Dima Brodsky dima@cs.ubc.ca http://www.cs.ubc.ca/~dima 201-2366 Main Mall (604) 822-6179 (Office) Department of Computer Science (604) 822-2895 (DSG Lab) University of British Columbia, Canada (604) 822-5485 (FAX) Computers are like Old Testament gods; lots of rules and no mercy. (Joseph Campbell) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message