Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Determine top-level projection state and pass to libprojfs at mount time #20

Closed
chrisd8088 opened this issue May 13, 2019 · 1 comment
Closed
Assignees

Comments

@chrisd8088
Copy link

chrisd8088 commented May 13, 2019

See details in github/libprojfs#71, particularly:

To determine the value of this flag will be an interesting effort, since we do not want to set it on every gvfs mount operation, only the first one. Two options present themselves:

  1. Perform a call to StartVirtualizationInstance() at the end of gvfs clone, perhaps in the TryPrepareFolderForCallbacks() method which is run at the very end of the CloneVerb process.
  2. At the start of the gvfs mount process, check whether the .gvfs/lower directory contains only .git and .gitattributes, and if so, set the "initial mount" flag to the StartVirtualizationInstance() call.

I am personally inclined toward the second option, as it effectively lifts the "is this directory empty" logic up to the client program's level, where it can determine if the directory is empty according to its own rules (in this case, if it only has the expected post-clone contents), and because it should avoid the need for a full mount/unmount cycle at the end of the cloning step, which feels like a more fragile solution overall.

@chrisd8088 chrisd8088 changed the title [DRAFT] Set initial projection state on backing store at first mount Set initial projection state on backing store at first mount May 13, 2019
@chrisd8088 chrisd8088 changed the title Set initial projection state on backing store at first mount Determine top-level projection state and pass to libprojfs at mount time May 13, 2019
@kivikakk kivikakk self-assigned this May 20, 2019
@kivikakk
Copy link

#24 merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants