From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] 9p questions From: rog@vitanuova.com In-Reply-To: <8db6ea68d1cba1bc0b101c4471e45e32@yourdomain.dom> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 23 Jul 2003 15:59:30 +0100 Topicbox-Message-UUID: 019017c8-eacc-11e9-9e20-41e7f4b1d025 > So, when wstat updates a file's name does 9p place a > restriction on wether the file is open or not? no - you can wstat whether the file is open or not (fwstat, wstat). you could always return an error if a rename was attempted when the file was open. presumably the file can be currently open by another user, so i'd assume doing a close/rename/reopen is unlikely to be sufficient in general. i don't know if much plan 9 infrastructure relies on being able to use fwstat to rename a file (the most likely candidate, upas, doesn't use fwstat to rename the mbox, but then again it might easily be holding another fd open on it). > Netware has similar restrictions on deleteing files/dirs so > I am closing then also, but I cannot imagine any side > effects from this. remove is a clunk anyway, so no problems there (apart from if another process has it open, as above, but nothing you can do there). > Using lib9p is it OK to change fid->qid in wstat, under the > libraries feet so to speak? this is fairly dodgy; the only times AFAIK that a qid corresponding to a fid can be changed are attach, create, open and walk, and all these return the new qid in the rmsg. > Also, will it mess up plan9 clients? good question... 'cos i know it's difficult verging on impossible to manufacture a proper qid space for some imported filesystems. i know that inferno used a hash of the filename for its ntfs filesystem under windows for quite a while, and most things worked ok. i think it still does the same thing, with the exception that a file which has been walked to keeps the same qid for as long as there's a reference to it. this ensures that a bind onto a directory stays put even though the directory has been renamed, but it's not perfect. i may be wrong about this too, as i didn't have anything to do with the changes. cheers, rog.