Skip to content

Commit

Permalink
Turn flush_local into async function.
Browse files Browse the repository at this point in the history
Fixes: s3ql#159
  • Loading branch information
Nikratio committed Apr 3, 2020
1 parent 06ac78a commit 3ac82f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
UNRELEASED CHANGES

* Fixed mount.s3ql "NoneType can't be used in 'await' expression" crash.


2020-03-19, S3QL 3.4.0

* There have been significant changes in the internal implementation. Asynchronous I/O
Expand Down
4 changes: 2 additions & 2 deletions src/s3ql/block_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,15 +845,15 @@ async def remove(self, inode, start_no, end_no=None):

log.debug('finished')

def flush_local(self, inode, blockno):
async def flush_local(self, inode, blockno):
"""Flush buffers for given block"""

try:
el = self.cache[(inode, blockno)]
except KeyError:
return

el.flush()
await el.flush()

async def start_flush(self, inode=None):
"""Initiate upload of all dirty blocks
Expand Down

0 comments on commit 3ac82f3

Please sign in to comment.