projects
/
cumulus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6fc3c86
)
Use larger metadata blocks, and don't output type field twice.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 11 May 2007 21:46:53 +0000
(14:46 -0700)
committer
Michael Vrable
<mvrable@turin.ucsd.edu>
Fri, 11 May 2007 21:46:53 +0000
(14:46 -0700)
scandir.cc
patch
|
blob
|
history
diff --git
a/scandir.cc
b/scandir.cc
index
702fce2
..
2570be5
100644
(file)
--- a/
scandir.cc
+++ b/
scandir.cc
@@
-33,6
+33,8
@@
static TarSegmentStore *tss = NULL;
static const int LBS_BLOCK_SIZE = 1024 * 1024;
static char *block_buf;
static const int LBS_BLOCK_SIZE = 1024 * 1024;
static char *block_buf;
+static const int LBS_METADATA_BLOCK_SIZE = 65536;
+
/* Contents of the root object. This will contain a set of indirect links to
* the metadata objects. */
std::ostringstream metadata_root;
/* Contents of the root object. This will contain a set of indirect links to
* the metadata objects. */
std::ostringstream metadata_root;
@@
-263,13
+265,12
@@
void scanfile(const string& path)
}
file_info["type"] = string(1, inode_type);
}
file_info["type"] = string(1, inode_type);
- metadata << "type: " << inode_type << "\n";
dict_output(metadata, file_info);
metadata << "\n";
// Break apart metadata listing if it becomes too large.
dict_output(metadata, file_info);
metadata << "\n";
// Break apart metadata listing if it becomes too large.
- if (metadata.str().size() >
4096
)
+ if (metadata.str().size() >
LBS_METADATA_BLOCK_SIZE
)
metadata_flush();
// If we hit a directory, now that we've written the directory itself,
metadata_flush();
// If we hit a directory, now that we've written the directory itself,