From 3fc07dea01795b31c37dcd093ec73d190a1e188a Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 16 Sep 2020 18:53:24 -0700 Subject: First part of change to remove LLVFS from the Viewer. Consists of code changes to remove LLVFS and LLVFSThread classes along with the associated source files. The existing llvfs folder is renamed to llcache. Also includes changes to CMake script in many places to reflect changes. Eventually, llvfile source file and class will be renamed but that is not in this change. --- indra/newview/llviewerassetupload.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llviewerassetupload.cpp') diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index d53cc3f745..d14b6b0568 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -466,13 +466,13 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() setAssetType(assetType); - // copy this file into the vfs for upload + // copy this file into the cache for upload S32 file_size; LLAPRFile infile; infile.open(filename, LL_APR_RB, NULL, &file_size); if (infile.getFileHandle()) { - LLVFile file(gVFS, getAssetId(), assetType, LLVFile::WRITE); + LLVFile file(getAssetId(), assetType, LLVFile::WRITE); file.setMaxSize(file_size); @@ -506,7 +506,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType: mContents(buffer), mInvnFinishFn(finish), mTaskFinishFn(nullptr), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); setAssetType(assetType); @@ -520,7 +520,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLPointerrenameFile(getAssetId(), assetType, newAssetId, assetType); + LLVFile::renameFile(getAssetId(), assetType, newAssetId, assetType); } if (mTaskUpload) -- cgit v1.2.3 From 2e6f5164116e084fe35f952180c3f7092ad8350f Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 16 Sep 2020 21:12:53 -0700 Subject: Renamed the references to LLVFile and llvfile.* source code plus cmake scripts to use a different name - lldiskcache - since that more closely resembles what it is (or will be) now that the VFA is no more --- indra/newview/llviewerassetupload.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerassetupload.cpp') diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index d14b6b0568..d62962514c 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -45,7 +45,7 @@ #include "llviewerassetupload.h" #include "llappviewer.h" #include "llviewerstats.h" -#include "llvfile.h" +#include "lldiskcache.h" #include "llgesturemgr.h" #include "llpreviewnotecard.h" #include "llpreviewgesture.h" @@ -472,7 +472,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() infile.open(filename, LL_APR_RB, NULL, &file_size); if (infile.getFileHandle()) { - LLVFile file(getAssetId(), assetType, LLVFile::WRITE); + LLDiskCache file(getAssetId(), assetType, LLDiskCache::WRITE); file.setMaxSize(file_size); @@ -565,7 +565,7 @@ LLSD LLBufferedAssetUploadInfo::prepareUpload() if (getAssetId().isNull()) generateNewAssetId(); - LLVFile file(getAssetId(), getAssetType(), LLVFile::APPEND); + LLDiskCache file(getAssetId(), getAssetType(), LLDiskCache::APPEND); S32 size = mContents.length() + 1; file.setMaxSize(size); @@ -597,7 +597,7 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result) if (mStoredToCache) { LLAssetType::EType assetType(getAssetType()); - LLVFile::renameFile(getAssetId(), assetType, newAssetId, assetType); + LLDiskCache::renameFile(getAssetId(), assetType, newAssetId, assetType); } if (mTaskUpload) -- cgit v1.2.3 From 6be1f88a5ef99e1e40bb5701a250ba0728f56005 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 24 Sep 2020 14:45:39 -0700 Subject: Complete the change from lldiskcache -> llfilesystem and then addition of new lldiskcache implementation --- indra/newview/llviewerassetupload.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerassetupload.cpp') diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index d62962514c..fb3ca69d5d 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -45,7 +45,7 @@ #include "llviewerassetupload.h" #include "llappviewer.h" #include "llviewerstats.h" -#include "lldiskcache.h" +#include "llfilesystem.h" #include "llgesturemgr.h" #include "llpreviewnotecard.h" #include "llpreviewgesture.h" @@ -472,7 +472,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() infile.open(filename, LL_APR_RB, NULL, &file_size); if (infile.getFileHandle()) { - LLDiskCache file(getAssetId(), assetType, LLDiskCache::WRITE); + LLFileSystem file(getAssetId(), assetType, LLFileSystem::WRITE); file.setMaxSize(file_size); @@ -565,7 +565,7 @@ LLSD LLBufferedAssetUploadInfo::prepareUpload() if (getAssetId().isNull()) generateNewAssetId(); - LLDiskCache file(getAssetId(), getAssetType(), LLDiskCache::APPEND); + LLFileSystem file(getAssetId(), getAssetType(), LLFileSystem::APPEND); S32 size = mContents.length() + 1; file.setMaxSize(size); @@ -597,7 +597,7 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result) if (mStoredToCache) { LLAssetType::EType assetType(getAssetType()); - LLDiskCache::renameFile(getAssetId(), assetType, newAssetId, assetType); + LLFileSystem::renameFile(getAssetId(), assetType, newAssetId, assetType); } if (mTaskUpload) -- cgit v1.2.3 From 3092aa8aae496803707980eb456cddbb9960ef1c Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 6 Oct 2020 17:16:53 -0700 Subject: Add in the C++ filesystem based cache and clean up some indempotent functions in llfilesystem --- indra/newview/llviewerassetupload.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llviewerassetupload.cpp') diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index fb3ca69d5d..67ee06e255 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -474,8 +474,6 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() { LLFileSystem file(getAssetId(), assetType, LLFileSystem::WRITE); - file.setMaxSize(file_size); - const S32 buf_size = 65536; U8 copy_buf[buf_size]; while ((file_size = infile.read(copy_buf, buf_size))) @@ -568,7 +566,6 @@ LLSD LLBufferedAssetUploadInfo::prepareUpload() LLFileSystem file(getAssetId(), getAssetType(), LLFileSystem::APPEND); S32 size = mContents.length() + 1; - file.setMaxSize(size); file.write((U8*)mContents.c_str(), size); mStoredToCache = true; -- cgit v1.2.3