Skip to content

Commit

Permalink
Merge pull request #277 from liulanzheng/v2_uploader
Browse files Browse the repository at this point in the history
update regitsryfs v2 and use v2 as default
  • Loading branch information
yuchen0cc authored Oct 13, 2023
2 parents 6a3c768 + faa421c commit 4afecd1
Show file tree
Hide file tree
Showing 5 changed files with 366 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMake/Findphoton.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(FETCHCONTENT_QUIET false)
FetchContent_Declare(
photon
GIT_REPOSITORY https://github.com/alibaba/PhotonLibOS.git
GIT_TAG v0.6.10
GIT_TAG v0.6.11
)

if(BUILD_TESTING)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Default configure file `overlaybd.json` is installed to `/etc/overlaybd/`.
| enableAudit | Enable audit or not. |
| enableThread | Enable overlaybd device run in seprate thread or not. Note `cacheType` should be `ocf`. `false` is default. |
| auditPath | The path for audit file, `/var/log/overlaybd-audit.log` is the default value. |
| registryFsVersion | registry client version, 'v1' libcurl based, 'v2' is photon http based. 'v1' is the default value. |
| registryFsVersion | registry client version, 'v1' libcurl based, 'v2' is photon http based. 'v2' is the default value. |
| prefetchConfig.concurrency | Prefetch concurrency for reloading trace, `16` is default |

> NOTE: `download` is the config for background downloading. After an overlaybd device is lauched, a background task will be running to fetch the whole blobs into local directories. After downloading, I/O requests are directed to local files. Unlike other options, download config is reloaded when a device launching.
Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ struct GlobalConfig : public ConfigUtils::Config {
APPCFG_PARA(p2pConfig, P2PConfig);
APPCFG_PARA(exporterConfig, ExporterConfig);
APPCFG_PARA(auditPath, std::string, "/var/log/overlaybd-audit.log");
APPCFG_PARA(registryFsVersion, std::string, "v1");
APPCFG_PARA(registryFsVersion, std::string, "v2");
APPCFG_PARA(cacheConfig, CacheConfig);
APPCFG_PARA(gzipCacheConfig, GzipCacheConfig);
APPCFG_PARA(logConfig, LogConfig);
Expand Down
7 changes: 6 additions & 1 deletion src/overlaybd/registryfs/registryfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@ photon::fs::IFileSystem *new_registryfs_v1(PasswordCB callback,
photon::fs::IFileSystem *new_registryfs_v2(PasswordCB callback,
const char *caFile = nullptr,
uint64_t timeout = -1);
}

photon::fs::IFile* new_registry_uploader(photon::fs::IFile *lfile,
std::string &upload_url,
std::string &username, std::string &password,
uint64_t timeout,
ssize_t upload_bs = -1);
}
Loading

0 comments on commit 4afecd1

Please sign in to comment.