Commit 9bebf114 authored by Chrysostomos Nanakos's avatar Chrysostomos Nanakos
Browse files

pithos: Remove 'create' flag from RADOS blocker/mapper

RADOS blocker and mapper do not use the 'create' flag to specify
the access mode to RADOS objects.
parent 77cf954f
......@@ -83,9 +83,9 @@ class RadosBlocker(object):
def _pad(self, block):
return block + ('\x00' * (self.blocksize - len(block)))
def _get_rear_block(self, blkhash, create=0):
def _get_rear_block(self, blkhash):
name = hexlify(blkhash)
return RadosObject(name, self.ioctx, create)
return RadosObject(name, self.ioctx)
def _check_rear_block(self, blkhash):
filename = hexlify(blkhash)
......
......@@ -65,9 +65,9 @@ class RadosMapper(object):
self.mappool = mappool
self.ioctx = RadosMapper.get_rados_ctx(mappool)
def _get_rear_map(self, maphash, create=0):
def _get_rear_map(self, maphash):
name = hexlify(maphash)
return RadosObject(name, self.ioctx, create)
return RadosObject(name, self.ioctx)
def _check_rear_map(self, maphash):
name = hexlify(maphash)
......@@ -90,10 +90,10 @@ class RadosMapper(object):
hashes = list(rmap.sync_read_chunks(namelen, nr, blkoff))
return hashes
def map_stor(self, maphash, hashes=(), blkoff=0, create=1):
def map_stor(self, maphash, hashes=(), blkoff=0):
"""Store hashes in the given hashes map."""
namelen = self.namelen
if self._check_rear_map(maphash):
return
with self._get_rear_map(maphash, 1) as rmap:
with self._get_rear_map(maphash) as rmap:
rmap.sync_write_chunks(namelen, blkoff, hashes, None)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment