This is the mail archive of the
mailing list for the Cygwin project.
Re: FUSE for Cygwin - was: Re: Fork and Windows Heap
- From: Bill Zissimopoulos <billziss at navimatics dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Sat, 18 Jun 2016 20:42:06 +0000
- Subject: Re: FUSE for Cygwin - was: Re: Fork and Windows Heap
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp dot mailfrom=billziss at navimatics dot com;
- References: <D389A1FE dot 92E9%billziss at navimatics dot com> <20160618080235 dot GA3332 at calimero dot vinschen dot de> <D38AF058 dot 932F%billziss at navimatics dot com> <718a7fe8-bd18-2c9b-3d7f-a0fdf1159955 at secure-endpoints dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 6/18/16, 1:19 PM, "Jeffrey Altman" <email@example.com on behalf
of firstname.lastname@example.org> wrote:
>On 6/18/2016 4:03 PM, Bill Zissimopoulos wrote:
>> * A directory cannot be renamed if it or any of its subdirectories
>> contains a file that has open handles (except in the batch-oplock case
>> described earlier).
>> In particular the third bullet point mandates that the FSD keeps
>> information not only about files that are open, but also of their
>> hierarchical relationships. The easiest way to do this on Windows is to
>> maintain a mapping of file names to open files.
>This is not how my file system redirector enforces the rule. The file
>control block (representing the handle) for an open file maintains a
>reference to the directory object through which it was opened. As long
>as the directory object has outstanding references the redirector fails
>the rename request.
Thank you for your very useful pointer. I have a question. In your file
system redirector if the file "\comp1\comp2\name.extâ gets opened, do you
also open (internally) the directories "\comp1" and "\comp1\comp2â? It
sounds like you do.
I understand that this is what UNIX VFS does, but it is my understanding
that Windows does not require this. WinFsp avoids it so that it will not
send extraneous requests to the user mode file system. WinFsp only knows
about files that have been explicitly opened using IRP_MJ_CREATE.
But perhaps I misunderstand what you are suggesting. Apologies for being
thick, but can you please elaborate?
>File path maps to specific files in fact do not work because the file
>can be hard linked into more than one directory. Only the directory
>that was used to create a file handle is restricted from renaming.
I agree. But my FSD does not currently support hard links. If/when it does
I will have to revisit this design.
Many thanks for your insight. BTW, if your redirector is public/opensource
I would love to take a look.