Revision 0fe82655

b/pithos/backends/hashfilerback.py
541 541
    @backend_method(autocommit=0)
542 542
    def put_block(self, data):
543 543
        hashes, absent = self.hf.block_stor((data,))
544
        #XXX: why hexlify hashes?
545 544
        return hexlify(hashes[0])
546 545

  
547 546
    @backend_method(autocommit=0)
548 547
    def update_block(self, blkhash, data, offset=0):
548
        if offset == 0 and len(data) == self.block_size:
549
            return self.put_block(data)
549 550
        h, e = self.hf.block_delta(unhexlify(blkhash), ((offset, data),))
550 551
        return hexlify(h)
551

  
b/pithos/lib/hashfiler/blocker.py
1 1
#!/usr/bin/env python
2 2

  
3
from sqlite3 import connect, OperationalError
4
from os import chdir, makedirs, fsync, SEEK_CUR, SEEK_SET, unlink
3
from os import makedirs
5 4
from os.path import isdir, realpath, exists, join
6 5
from hashlib import new as newhasher
7
from binascii import hexlify, unhexlify
8
from time import time
6
from binascii import hexlify
9 7

  
10
from pithos.lib.hashfiler.context_file import ContextFile
8
from pithos.lib.hashfiler.context_file import ContextFile, file_sync_read_chunks
11 9

  
12 10

  
13 11
class Blocker(object):
b/pithos/lib/hashfiler/filer.py
150 150

  
151 151
    def file_increment(self, serial, size=None):
152 152
        """Alias for node_increment()."""
153
        return self.node_increment(serial, size=None)
153
        return self.node_increment(serial, size)
154 154

  
155 155
    def file_list_attributes(self, parent):
156 156
        """List file attributes. Alias for node_attr_list_keys()."""

Also available in: Unified diff