projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c82670
)
servermap.py: add size_of_version(), to retrieve the size of a mutable file version
author
Brian Warner
<warner@allmydata.com>
Mon, 19 May 2008 21:16:02 +0000
(14:16 -0700)
committer
Brian Warner
<warner@allmydata.com>
Mon, 19 May 2008 21:16:02 +0000
(14:16 -0700)
src/allmydata/mutable/servermap.py
patch
|
blob
|
history
diff --git
a/src/allmydata/mutable/servermap.py
b/src/allmydata/mutable/servermap.py
index 0bf8e9d74f97499191c2597bb10d32ead5b702f8..4fbb83f40ac06fe1c1f0dcda37d4f331bd158518 100644
(file)
--- a/
src/allmydata/mutable/servermap.py
+++ b/
src/allmydata/mutable/servermap.py
@@
-258,6
+258,13
@@
class ServerMap:
return recoverable[-1]
return None
+ def size_of_version(self, verinfo):
+ """Given a versionid (perhaps returned by best_recoverable_version),
+ return the size of the file in bytes."""
+ (seqnum, root_hash, IV, segsize, datalength, k, N, prefix,
+ offsets_tuple) = verinfo
+ return datalength
+
def unrecoverable_newer_versions(self):
# Return a dict of versionid -> health, for versions that are
# unrecoverable and have later seqnums than any recoverable versions.