mirror of
https://github.com/TurboGit/hubicfuse.git
synced 2026-08-02 02:42:00 +02:00
Document that segment_above must be below 5Gb.
And add corresponding test. Also enfore a segment_size below segment_above.
This commit is contained in:
@@ -81,6 +81,8 @@ USE AS NON-ROOT:
|
||||
|
||||
BUGS/SHORTCOMINGS:
|
||||
|
||||
* A segment size is limited to 5Gb (this is not hubicfuse limit, but HubiC implementation).
|
||||
So segment_above should never exceed 5Gb.
|
||||
* rename() doesn't work on directories (and probably never will).
|
||||
* When reading and writing files, it buffers them in a local temp file.
|
||||
* It keeps an in-memory cache of the directory structure, so it may not be
|
||||
|
||||
+15
@@ -872,6 +872,21 @@ int main(int argc, char** argv)
|
||||
cache_timeout = atoi(options.cache_timeout);
|
||||
segment_size = atoll(options.segment_size);
|
||||
segment_above = atoll(options.segment_above);
|
||||
|
||||
// check consistency
|
||||
const unsigned long FiveGb = (unsigned long)5 * (unsigned long)(1 << 30);
|
||||
|
||||
if (segment_above > FiveGb)
|
||||
{
|
||||
printf ("A segment cannot be larger than 5Gb\n");
|
||||
return 1;
|
||||
}
|
||||
if (segment_size > segment_above)
|
||||
{
|
||||
printf ("segment_size must be smaller than segment_above\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// this is ok since main is on the stack during the entire execution
|
||||
override_storage_url = options.storage_url;
|
||||
public_container = options.container;
|
||||
|
||||
Reference in New Issue
Block a user