-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update USN journal entries for projected folders #1664
Merged
derrickstolee
merged 8 commits into
microsoft:master
from
derrickstolee:usn-folder-update
May 27, 2020
Merged
Update USN journal entries for projected folders #1664
derrickstolee
merged 8 commits into
microsoft:master
from
derrickstolee:usn-folder-update
May 27, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To update the USN journal entries for a projected folder, we previously computed the new hash based on the contained files and their contents. Let's also include the file and folder names. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
force-pushed
the
usn-folder-update
branch
2 times, most recently
from
May 26, 2020 12:40
644e051
to
00b7983
Compare
derrickstolee
changed the title
Usn folder update
Update USN journal entries for projected folders
May 26, 2020
kewillford
approved these changes
May 26, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good. Just a couple of clean up comments. I'm going to be out the rest of this week but will approve knowing you will consider the suggested changes.
GVFS/GVFS.Virtualization/Projection/GitIndexProjection.FolderData.cs
Outdated
Show resolved
Hide resolved
GVFS/GVFS.Virtualization/Projection/GitIndexProjection.FolderData.cs
Outdated
Show resolved
Hide resolved
GVFS/GVFS.Virtualization/Projection/GitIndexProjection.FolderData.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Add new "usn.updateDirectories" boolean config option. This is set in the system-wide config, and requires remounting for the config to take effect. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
derrickstolee
force-pushed
the
usn-folder-update
branch
from
May 26, 2020 16:54
00b7983
to
fb75a70
Compare
I got final testing from the Office folks. Merging now. |
This was referenced May 28, 2020
derrickstolee
added a commit
that referenced
this pull request
Jun 2, 2020
Includes the following pull requests: * #1663: Update Git to v2.27.0 * #1669: Docs: more troubleshooting and FAQs * #1668: ProductUPgradeTimer: remove unacceptable Environment.Exit() * #1664: Update USN journal entries for projected folders * #1666: Docs: start basic template * #1658: ProjFSFilter: Be more robust to missing PowerShell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces #1648.
BuildXL was having issues detecting that a folder had changes when the projection changed because VFSForGit was simply updating its in memory projection and not doing anything with the file system that would trigger and update to the USN. It would hand back the new items in the directory when ProjFS would ask for the items for enumeration the next time an enumeration happened.
This change is to make the folder get a new USN when VFSForGit determines that a folder has changed. This is done by keeping a SHA1 hash of all the names of the folder entries that are in the projection. When the projection changes, calculate the new SHA for the folder and compare with what it had before. If it changed, then write and delete a file in the folder to trigger the USN update.
Note: We don't need any upgrade step because we are already storing the SHA for the folder in the placeholder database but it is currently
null
for all folders so the first time there is a projection change it will cause all the folders to get the calculated SHA for the folder and update the placeholder database.Tasks:
fsutil usn readdata <path>
command isn't working in CI. Tested locally.)