[ARVADOS] updated: fea4d2ba4ab741daff3fd17d910b72539a50a447
git at public.curoverse.com
git at public.curoverse.com
Mon May 18 10:09:49 EDT 2015
Summary of changes:
sdk/python/arvados/arvfile.py | 7 ++++---
services/fuse/arvados_fuse/__init__.py | 8 +++-----
services/fuse/arvados_fuse/fusefile.py | 6 ++++--
services/fuse/bin/arv-mount | 2 ++
4 files changed, 13 insertions(+), 10 deletions(-)
via fea4d2ba4ab741daff3fd17d910b72539a50a447 (commit)
from 2403cd9fd5a508252fe4570d6eed9c9c4efa366a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit fea4d2ba4ab741daff3fd17d910b72539a50a447
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon May 18 10:10:26 2015 -0400
3198: writeto() notifies with WRITE instead of MOD. WRITE doesn't invalidate the inode.
Move llfuse.lock_released down one level into individual fusefile and fusedir methods.
Add big_writes option, improves write speed by 2x!
diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py
index 835e53e..792c81f 100644
--- a/sdk/python/arvados/arvfile.py
+++ b/sdk/python/arvados/arvfile.py
@@ -18,6 +18,7 @@ from ._ranges import locators_and_ranges, replace_range, Range
from .retry import retry_method
MOD = "mod"
+WRITE = "write"
_logger = logging.getLogger('arvados.arvfile')
@@ -574,7 +575,8 @@ class _BlockManager(object):
for k,v in items:
# flush again with wait=True to remove committed bufferblocks from
# the segments.
- v.owner.flush(True)
+ if v.owner:
+ v.owner.flush(True)
def block_prefetch(self, locator):
@@ -840,7 +842,7 @@ class ArvadosFile(object):
replace_range(self._segments, offset, len(data), self._current_bblock.blockid, self._current_bblock.write_pointer - len(data))
- self.parent.notify(MOD, self.parent, self.name, (self, self))
+ self.parent.notify(WRITE, self.parent, self.name, (self, self))
return len(data)
@@ -864,7 +866,6 @@ class ArvadosFile(object):
for s in to_delete:
self.parent._my_block_manager().delete_bufferblock(s)
- self.parent.notify(MOD, self.parent, self.name, (self, self))
@must_be_writable
@synchronized
diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index 9df9429..fc81087 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -366,10 +366,9 @@ class Operations(llfuse.Operations):
self.inodes.touch(handle.obj)
try:
- with llfuse.lock_released:
- return handle.obj.readfrom(off, size, self.num_retries)
+ return handle.obj.readfrom(off, size, self.num_retries)
except arvados.errors.NotFoundError as e:
- _logger.warning("Block not found: " + str(e))
+ _logger.error("Block not found: " + str(e))
raise llfuse.FUSEError(errno.EIO)
@catch_exceptions
@@ -385,8 +384,7 @@ class Operations(llfuse.Operations):
self.inodes.touch(handle.obj)
- with llfuse.lock_released:
- return handle.obj.writeto(off, buf, self.num_retries)
+ return handle.obj.writeto(off, buf, self.num_retries)
@catch_exceptions
def release(self, fh):
diff --git a/services/fuse/arvados_fuse/fusefile.py b/services/fuse/arvados_fuse/fusefile.py
index 77b70f5..d09b1f0 100644
--- a/services/fuse/arvados_fuse/fusefile.py
+++ b/services/fuse/arvados_fuse/fusefile.py
@@ -48,10 +48,12 @@ class FuseArvadosFile(File):
return self.arvfile.size()
def readfrom(self, off, size, num_retries=0):
- return self.arvfile.readfrom(off, size, num_retries, exact=True)
+ with llfuse.lock_released:
+ return self.arvfile.readfrom(off, size, num_retries, exact=True)
def writeto(self, off, buf, num_retries=0):
- return self.arvfile.writeto(off, buf, num_retries)
+ with llfuse.lock_released:
+ return self.arvfile.writeto(off, buf, num_retries)
def stale(self):
return False
diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index 5a3e021..49874da 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -156,6 +156,8 @@ From here, the following directories are available:
opts = [optname for optname in ['allow_other', 'debug']
if getattr(args, optname)]
+ opts += ["big_writes", "max_read=131072"]
+
if args.exec_args:
# Initialize the fuse connection
llfuse.init(operations, args.mountpoint, opts)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list