opts = [optname for optname in ['allow_other', 'debug']
if getattr(args, optname)]
+ # Increase default read/write size from 4KiB to 128KiB
+ opts += ["big_writes", "max_read=131072"]
+
if args.exec_args:
# Initialize the fuse connection
llfuse.init(operations, args.mountpoint, opts)
+ # Subscribe to change events from API server
+ operations.listen_for_events(api)
+
t = threading.Thread(None, lambda: llfuse.main())
t.start()
pass
finally:
subprocess.call(["fusermount", "-u", "-z", args.mountpoint])
+ operations.destroy()
exit(rc)
else:
try:
llfuse.init(operations, args.mountpoint, opts)
+
+ # Subscribe to change events from API server
+ operations.listen_for_events(api)
+
llfuse.main()
except Exception as e:
logger.exception('arv-mount: exception during mount')
exit(getattr(e, 'errno', 1))
+ finally:
+ operations.destroy()