{"action":"closed","issue":{"url":"https://api.github.com/repos/borgbackup/borg/issues/1254","repository_url":"https://api.github.com/repos/borgbackup/borg","labels_url":"https://api.github.com/repos/borgbackup/borg/issues/1254/labels{/name}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/1254/comments","events_url":"https://api.github.com/repos/borgbackup/borg/issues/1254/events","html_url":"https://github.com/borgbackup/borg/issues/1254","id":163583636,"number":1254,"title":"Mostly lockless borg mount","user":{"login":"verygreen","id":625925,"avatar_url":"https://avatars.githubusercontent.com/u/625925?v=3","gravatar_id":"","url":"https://api.github.com/users/verygreen","html_url":"https://github.com/verygreen","followers_url":"https://api.github.com/users/verygreen/followers","following_url":"https://api.github.com/users/verygreen/following{/other_user}","gists_url":"https://api.github.com/users/verygreen/gists{/gist_id}","starred_url":"https://api.github.com/users/verygreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verygreen/subscriptions","organizations_url":"https://api.github.com/users/verygreen/orgs","repos_url":"https://api.github.com/users/verygreen/repos","events_url":"https://api.github.com/users/verygreen/events{/privacy}","received_events_url":"https://api.github.com/users/verygreen/received_events","type":"User","site_admin":false},"labels":[{"id":454180508,"url":"https://api.github.com/repos/borgbackup/borg/labels/cmd:%20mount","name":"cmd: mount","color":"112233","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-07-03T22:45:58Z","updated_at":"2017-01-26T14:36:27Z","closed_at":"2017-01-26T14:36:27Z","body":"There are multiple tickets like #768 and #1243 and probably many more complaining about how borg mount interferes with other borg operations (modifying ones).\n\nI believe this could be avoided without any expensive/extensive and risky changes to locking protocols just by rethinking the borg mount operations.\nCurrent approach is: borg mount spawns a borg serve instance that's always there and keeps a shared lock.\n\nAlternative approach is to only access (and lock!) the repo once per request from fuse. Here's an example of operations:\n\nbasically once you mount it at say /mnt and do ls /mnt, it runs borg list underneath that terminates.\nnow the repo is free for all until the next command comes, say it's ls /mnt/somearchive\nagain borg list is spawned, briefly locks the repo to get the files list and terminates.\nwhen you do cat /mnt/somearchive/somefile - again borg extract is spawned, file is fetched and repo is again unlocked.\nIf something in the middle came and killed some archives - you'll get ENOENT on some of your commands and that's a very valid race on any fs.\n\nThis could be done with separate commands (think of tarfs where every command runs a tar on the archive) or I imagine current code could be reused to great extent, with only adding repo close/repo open in between the distinct commands.\n\nOne more area to consider is the lock timeouts, we don't want any errors so lock timeouts probably need to be made indefinite to be able to wait out any parallel modifying operation if necessary.\n"}}
{"actor":{"display_login":"enkore"}}