Skip to content

Commit

Permalink
#22 Store size as long
Browse files Browse the repository at this point in the history
  • Loading branch information
denismo committed Aug 3, 2013
1 parent 24a0d8e commit 6864104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dynamofuse/records/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def writeData(self, startOffset, dataSlice):
@staticmethod
def getBlockItem(accessor, path, getData=False, forUpdate=False):
try:
blockItem = accessor.blockTable.get_item(os.path.dirname(path), int(os.path.basename(path)),
blockItem = accessor.blockTable.get_item(os.path.dirname(path), long(os.path.basename(path)),
attributes_to_get=(BlockRecord.BLOCK_ALL_ATTRS if getData else BlockRecord.BLOCK_ATTRS))
except DynamoDBKeyNotFoundError:
blockItem = None
Expand Down
4 changes: 2 additions & 2 deletions dynamofuse/records/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create(self, accessor, path, attrs):

if not "blockId" in attrs:
attrs["blockId"] = str(self.accessor.allocUniqueId())
attrs["st_ino"] = int(attrs["blockId"])
attrs["st_ino"] = long(attrs["blockId"])

BaseRecord.create(self, accessor, path, attrs)

Expand Down Expand Up @@ -83,7 +83,7 @@ def link(self):
def getattr(self):
block = self.getFirstBlock()
block["st_blocks"] = (block["st_size"] + self.record["st_blksize"] - 1) / self.record["st_blksize"]
block["st_ino"] = int(self.record["blockId"])
block["st_ino"] = long(self.record["blockId"])
return block

def delete(self, duringMove=False):
Expand Down

0 comments on commit 6864104

Please sign in to comment.