Skip to content

Commit 2797fbb

Browse files
committed
Major updates:
* Switched over to use the Windows Projected File System (ProjFS) optional feature on RS4 and later. ProjFS is the new name for the GvFlt driver and its associated user mode library. * The local file size cache was migrated from ESENT to SQLite * Git commands are now allowed to delete an empty directory * Many other reliability improvements in interactions between GVFS and the file system, and between GVFS and git Perf improvements: * Better memory management in git, creating a savings of up to half a second on commands that parse the index * Added a new mutli-pack index file to git, allowing it to become much more efficient at finding an object when there are a large number of local packfiles * Added a git config setting to disable the calculations for detecting force pushes during 'git fetch' and 'git pull'. That calculation can take 10's of seconds on a large graph, and users can now opt out of it. * Due to the transition to SQLite, the file sizes cache can now live in the volume-wide .gvfsCache folder and be shared by multiple repos, causing fewer round trips to the server while enumerating files * The post-command step to update placeholder files now batches its size requests to the server, resulting in significant speedups in situations where many placeholder files needed to be updated * The client will now also query the /gvfs/sizes endpoint on a cache server that implements that endpoint, reducing the latency on those requests even further * Sped up GVFS's parsing of the git index, shaving off 2-3 seconds for a large index file
1 parent 2db0c03 commit 2797fbb

249 files changed

Lines changed: 7256 additions & 7346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

GVFS.sln

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1616
EndProject
1717
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GVFS", "GVFS", "{2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}"
1818
ProjectSection(SolutionItems) = preProject
19-
GVFS\GvLib.NativeBinaries.props = GVFS\GvLib.NativeBinaries.props
2019
GVFS\LibGit2Sharp.NativeBinaries.props = GVFS\LibGit2Sharp.NativeBinaries.props
20+
GVFS\ProjectedFSLib.NativeBinaries.props = GVFS\ProjectedFSLib.NativeBinaries.props
2121
EndProjectSection
2222
EndProject
2323
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.GVFlt", "GVFS\GVFS.GVFlt\GVFS.GVFlt.csproj", "{1118B427-7063-422F-83B9-5023C8EC5A7A}"
2424
EndProject
25-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GvLib.Managed", "GVFS\GVFS.GvFltWrapper\GvLib.vcxproj", "{FB0831AE-9997-401B-B31F-3A065FDBEB20}"
26-
ProjectSection(ProjectDependencies) = postProject
27-
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
28-
{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09} = {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}
29-
EndProjectSection
30-
EndProject
3125
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Common", "GVFS\GVFS.Common\GVFS.Common.csproj", "{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}"
3226
ProjectSection(ProjectDependencies) = postProject
3327
{A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
@@ -107,9 +101,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitHooksLoader", "GitHooksL
107101
EndProject
108102
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Installer", "GVFS\GVFS.Installer\GVFS.Installer.csproj", "{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}"
109103
ProjectSection(ProjectDependencies) = postProject
104+
{2F63B22B-EE26-4266-BF17-28A9146483A1} = {2F63B22B-EE26-4266-BF17-28A9146483A1}
110105
{32220664-594C-4425-B9A0-88E0BE2F3D2A} = {32220664-594C-4425-B9A0-88E0BE2F3D2A}
111106
EndProjectSection
112107
EndProject
108+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.SignFiles", "GVFS\GVFS.SignFiles\GVFS.SignFiles.csproj", "{2F63B22B-EE26-4266-BF17-28A9146483A1}"
109+
ProjectSection(ProjectDependencies) = postProject
110+
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
111+
{07F2A520-2AB7-46DD-97C0-75D8E988D55B} = {07F2A520-2AB7-46DD-97C0-75D8E988D55B}
112+
{1118B427-7063-422F-83B9-5023C8EC5A7A} = {1118B427-7063-422F-83B9-5023C8EC5A7A}
113+
{32220664-594C-4425-B9A0-88E0BE2F3D2A} = {32220664-594C-4425-B9A0-88E0BE2F3D2A}
114+
{798DE293-6EDA-4DC4-9395-BE7A71C563E3} = {798DE293-6EDA-4DC4-9395-BE7A71C563E3}
115+
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
116+
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
117+
{BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
118+
{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09} = {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}
119+
{93B403FD-DAFB-46C5-9636-B122792A548A} = {93B403FD-DAFB-46C5-9636-B122792A548A}
120+
EndProjectSection
121+
EndProject
113122
Global
114123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
115124
Debug|x64 = Debug|x64
@@ -120,10 +129,6 @@ Global
120129
{1118B427-7063-422F-83B9-5023C8EC5A7A}.Debug|x64.Build.0 = Debug|x64
121130
{1118B427-7063-422F-83B9-5023C8EC5A7A}.Release|x64.ActiveCfg = Release|x64
122131
{1118B427-7063-422F-83B9-5023C8EC5A7A}.Release|x64.Build.0 = Release|x64
123-
{FB0831AE-9997-401B-B31F-3A065FDBEB20}.Debug|x64.ActiveCfg = Debug|x64
124-
{FB0831AE-9997-401B-B31F-3A065FDBEB20}.Debug|x64.Build.0 = Debug|x64
125-
{FB0831AE-9997-401B-B31F-3A065FDBEB20}.Release|x64.ActiveCfg = Release|x64
126-
{FB0831AE-9997-401B-B31F-3A065FDBEB20}.Release|x64.Build.0 = Release|x64
127132
{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Debug|x64.ActiveCfg = Debug|x64
128133
{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Debug|x64.Build.0 = Debug|x64
129134
{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Release|x64.ActiveCfg = Release|x64
@@ -188,13 +193,16 @@ Global
188193
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug|x64.Build.0 = Debug|x64
189194
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Release|x64.ActiveCfg = Release|x64
190195
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Release|x64.Build.0 = Release|x64
196+
{2F63B22B-EE26-4266-BF17-28A9146483A1}.Debug|x64.ActiveCfg = Debug|x64
197+
{2F63B22B-EE26-4266-BF17-28A9146483A1}.Debug|x64.Build.0 = Debug|x64
198+
{2F63B22B-EE26-4266-BF17-28A9146483A1}.Release|x64.ActiveCfg = Release|x64
199+
{2F63B22B-EE26-4266-BF17-28A9146483A1}.Release|x64.Build.0 = Release|x64
191200
EndGlobalSection
192201
GlobalSection(SolutionProperties) = preSolution
193202
HideSolutionNode = FALSE
194203
EndGlobalSection
195204
GlobalSection(NestedProjects) = preSolution
196205
{1118B427-7063-422F-83B9-5023C8EC5A7A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
197-
{FB0831AE-9997-401B-B31F-3A065FDBEB20} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
198206
{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
199207
{32220664-594C-4425-B9A0-88E0BE2F3D2A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
200208
{07F2A520-2AB7-46DD-97C0-75D8E988D55B} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
@@ -211,5 +219,9 @@ Global
211219
{93B403FD-DAFB-46C5-9636-B122792A548A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
212220
{A4984251-840E-4622-AD0C-66DFCE2B2574} = {AB0D9230-3893-4486-8899-F9C871FB5D5F}
213221
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
222+
{2F63B22B-EE26-4266-BF17-28A9146483A1} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
223+
EndGlobalSection
224+
GlobalSection(ExtensibilityGlobals) = postSolution
225+
SolutionGuid = {24FCF9D2-C868-48AB-A1E8-6D4D8E75F7D5}
214226
EndGlobalSection
215227
EndGlobal

GVFS/FastFetch/App.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
55
</startup>
6-
</configuration>
6+
</configuration>

GVFS/FastFetch/FastFetch.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>FastFetch</RootNamespace>
1111
<AssemblyName>FastFetch</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1515
<NuGetPackageImportStamp>
@@ -43,8 +43,8 @@
4343
<HintPath>..\..\..\packages\CommandLineParser.2.1.1-beta\lib\net45\CommandLine.dll</HintPath>
4444
<Private>True</Private>
4545
</Reference>
46-
<Reference Include="Microsoft.Diagnostics.Tracing.EventSource">
47-
<HintPath>..\..\..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.28\lib\net40\Microsoft.Diagnostics.Tracing.EventSource.dll</HintPath>
46+
<Reference Include="Microsoft.Diagnostics.Tracing.EventSource, Version=1.1.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
47+
<HintPath>..\..\..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.28\lib\net46\Microsoft.Diagnostics.Tracing.EventSource.dll</HintPath>
4848
<Private>True</Private>
4949
</Reference>
5050
<Reference Include="System" />

GVFS/FastFetch/GitEnlistment.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ private GitEnlistment(string repoRoot, string gitBinPath)
1616
flushFileBuffersForPacks: false)
1717
{
1818
this.GitObjectsRoot = Path.Combine(repoRoot, GVFSConstants.DotGit.Objects.Root);
19+
this.LocalObjectsRoot = this.GitObjectsRoot;
1920
this.GitPackRoot = Path.Combine(this.GitObjectsRoot, GVFSConstants.DotGit.Objects.Pack.Name);
2021
}
2122

2223
public override string GitObjectsRoot { get; protected set; }
2324

25+
public override string LocalObjectsRoot { get; protected set; }
26+
2427
public override string GitPackRoot { get; protected set; }
2528

2629
public string FastFetchLogRoot

GVFS/FastFetch/Jobs/BatchObjectDownloadJob.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected override void DoWork()
7878
Interlocked.Increment(ref this.activeDownloadCount);
7979

8080
EventMetadata metadata = new EventMetadata();
81-
metadata.Add("PackId", request.PackId);
81+
metadata.Add("RequestId", request.RequestId);
8282
metadata.Add("ActiveDownloads", this.activeDownloadCount);
8383
metadata.Add("NumberOfObjects", request.ObjectIds.Count);
8484

@@ -90,7 +90,7 @@ protected override void DoWork()
9090
RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.InvocationResult result = this.objectRequestor.TryDownloadObjects(
9191
() => request.ObjectIds.Except(successfulDownloads),
9292
onSuccess: (tryCount, response) => this.WriteObjectOrPack(request, tryCount, response, successfulDownloads),
93-
onFailure: RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.StandardErrorHandler(activity, request.PackId, DownloadAreaPath),
93+
onFailure: RetryWrapper<GitObjectsHttpRequestor.GitObjectTaskResult>.StandardErrorHandler(activity, request.RequestId, DownloadAreaPath),
9494
preferBatchedLooseObjects: true);
9595

9696
if (!result.Succeeded)

GVFS/FastFetch/Jobs/Data/BlobDownloadRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class BlobDownloadRequest
1010
public BlobDownloadRequest(IReadOnlyList<string> objectIds)
1111
{
1212
this.ObjectIds = objectIds;
13-
this.PackId = Interlocked.Increment(ref requestCounter);
13+
this.RequestId = Interlocked.Increment(ref requestCounter);
1414
}
1515

1616
public static int TotalRequests
@@ -23,6 +23,6 @@ public static int TotalRequests
2323

2424
public IReadOnlyList<string> ObjectIds { get; }
2525

26-
public int PackId { get; }
26+
public int RequestId { get; }
2727
}
2828
}

GVFS/FastFetch/Jobs/IndexPackJob.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ protected override void DoWork()
4141
while (this.availablePacks.TryTake(out request, Timeout.Infinite))
4242
{
4343
EventMetadata metadata = new EventMetadata();
44-
metadata.Add("PackId", request.DownloadRequest.PackId);
44+
metadata.Add("RequestId", request.DownloadRequest.RequestId);
4545
using (ITracer activity = this.tracer.StartActivity(IndexPackAreaPath, EventLevel.Informational, Keywords.Telemetry, metadata))
4646
{
4747
GitProcess.Result result = this.gitObjects.IndexTempPackFile(request.TempPackFile);
4848
if (result.HasErrors)
4949
{
5050
EventMetadata errorMetadata = new EventMetadata();
51-
errorMetadata.Add("PackId", request.DownloadRequest.PackId);
51+
errorMetadata.Add("RequestId", request.DownloadRequest.RequestId);
5252
activity.RelatedError(errorMetadata, result.Errors);
5353
this.HasFailures = true;
5454
}

GVFS/FastFetch/packages.config

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="CommandLineParser" version="2.1.1-beta" targetFramework="net452" />
4-
<package id="LibGit2Sharp.NativeBinaries" version="1.0.165" targetFramework="net452" />
5-
<package id="Microsoft.Diagnostics.Tracing.EventRegister" version="1.1.28" targetFramework="net452" />
6-
<package id="Microsoft.Diagnostics.Tracing.EventSource" version="1.1.28" targetFramework="net452" />
7-
<package id="Microsoft.Diagnostics.Tracing.EventSource.Redist" version="1.1.28" targetFramework="net452" />
8-
<package id="StyleCop.Error.MSBuild" version="1.0.0" targetFramework="net452" />
9-
<package id="StyleCop.MSBuild" version="4.7.54.0" targetFramework="net452" developmentDependency="true" />
3+
<package id="CommandLineParser" version="2.1.1-beta" targetFramework="net461" />
4+
<package id="LibGit2Sharp.NativeBinaries" version="1.0.165" targetFramework="net461" />
5+
<package id="Microsoft.Diagnostics.Tracing.EventRegister" version="1.1.28" targetFramework="net461" />
6+
<package id="Microsoft.Diagnostics.Tracing.EventSource" version="1.1.28" targetFramework="net461" />
7+
<package id="Microsoft.Diagnostics.Tracing.EventSource.Redist" version="1.1.28" targetFramework="net461" />
8+
<package id="StyleCop.Error.MSBuild" version="1.0.0" targetFramework="net461" />
9+
<package id="StyleCop.MSBuild" version="4.7.54.0" targetFramework="net461" developmentDependency="true" />
1010
</packages>

GVFS/GVFS.Build/GVFS.PreBuild.csproj

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<AppDesignerFolder>Properties</AppDesignerFolder>
99
<RootNamespace>GVFS.PreBuild</RootNamespace>
1010
<AssemblyName>GVFS.PreBuild</AssemblyName>
11-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
</PropertyGroup>
1414
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
@@ -32,12 +32,16 @@
3232
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3333
</PropertyGroup>
3434
<ItemGroup>
35+
<Compile Include="GenerateApplicationManifests.cs" />
3536
<Compile Include="GenerateVersionInfo.cs" />
3637
</ItemGroup>
3738
<ItemGroup>
3839
<None Include="GVFS.props">
3940
<SubType>Designer</SubType>
4041
</None>
42+
<None Include="ProjFS.props">
43+
<SubType>Designer</SubType>
44+
</None>
4145
</ItemGroup>
4246
<Target Name="GetTargetFrameworkProperties" />
4347
<Target Name="GetNativeManifest" />
@@ -51,17 +55,27 @@
5155
<Code Type="Class" Source="GenerateVersionInfo.cs" />
5256
</Task>
5357
</UsingTask>
58+
<UsingTask TaskName="GenerateApplicationManifests" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
59+
<ParameterGroup>
60+
<Version ParameterType="System.String" Required="true" />
61+
<BuildOutputPath ParameterType="System.String" Required="true" />
62+
</ParameterGroup>
63+
<Task>
64+
<Code Type="Class" Source="GenerateApplicationManifests.cs" />
65+
</Task>
66+
</UsingTask>
5467
<Target Name="Build">
5568
<CallTarget Targets="GenerateAll" />
5669
</Target>
5770
<Target Name="Rebuild">
5871
<CallTarget Targets="GenerateAll" />
5972
</Target>
6073
<Target Name="Clean">
61-
<RemoveDir Directories="$(BuildOutputPath)\GVFS.Build" />
62-
<Delete Files="$(BuildOutputPath)\CommonAssemblyVersion.cs;$(BuildOutputPath)\CommonVersionHeader.h" />
74+
<RemoveDir Directories="$(BuildOutputDir)\$(MSBuildProjectName)" />
75+
<Delete Files="$(BuildOutputDir)\CommonAssemblyVersion.cs;$(BuildOutputDir)\CommonVersionHeader.h" />
6376
</Target>
6477
<Target Name="GenerateAll">
6578
<GenerateVersionInfo Version="$(GVFSVersion)" BuildOutputPath="$(BuildOutputDir)" />
79+
<GenerateApplicationManifests Version="$(GVFSVersion)" BuildOutputPath="$(BuildOutputDir)" />
6680
</Target>
6781
</Project>

GVFS/GVFS.Build/GVFS.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup Label="Parameters">
4-
<GVFSVersion>1.0.18026.1</GVFSVersion>
5-
<G4WPackageVersion>2.4882590</G4WPackageVersion>
6-
<BuildInstaller>true</BuildInstaller>
4+
<GVFSVersion>1.0.18115.1</GVFSVersion>
75
</PropertyGroup>
86
<PropertyGroup Label="DefaultSettings">
97
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -15,4 +13,4 @@
1513
<OutDir>$(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
1614
<IntDir>$(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\</IntDir>
1715
</PropertyGroup>
18-
</Project>
16+
</Project>

0 commit comments

Comments
 (0)