Commit graph

48 commits

Author SHA1 Message Date
Simon Frei
b148a366fe fuse: Separate creation of filesystem from implementation of llfuse funcs (#3042)
fuse: Separate creation of filesystem from implementation of llfuse funcs
2017-11-01 03:02:25 +01:00
Thomas Waldmann
6f94949a36 migrate locks to child PID when daemonize is used
also:

increase platform api version due to change in get_process_id behaviour.
2017-08-08 03:46:44 +02:00
Milkey Mouse
6ef5c9c960
Use archive creation time as mtime for FUSE mount (fixes #2834) 2017-07-18 15:07:59 -07:00
Marian Beermann
9a856533ba fuse: versions view, linear numbering by archive time 2017-07-03 12:38:10 +02:00
Thomas Waldmann
51458b6b58 FUSE versions view: keep original file extension at end, fixes #2769
some tools depend on seeing the correct file extension to operate
correctly, so put our version to the left of the file extension.
2017-07-02 19:11:24 +02:00
Thomas Waldmann
7ebad4f803 FUSE vs. fuse 2017-06-24 01:24:14 +02:00
Marian Beermann
2766693706 fuse: update comments 2017-06-15 23:50:17 +02:00
Marian Beermann
3b928a4558 fuse: refactor ItemCache 2017-06-14 13:58:09 +02:00
Marian Beermann
9fd79a9e56 fuse: decrypted cache 2017-06-14 13:35:07 +02:00
Marian Beermann
f04119c246 fuse: ItemCache on top of object cache 2017-06-14 13:35:07 +02:00
Marian Beermann
ec532304d2 fuse: remove unnecessary normpaths 2017-06-14 13:34:34 +02:00
enkore
8e477414ee Merge pull request #2675 from enkore/f/fusecache
fuse: instrumentation
2017-06-14 09:31:55 +02:00
Marian Beermann
ff05895b7e fuse: don't keep all Archive() instances around
they're only needed inside process_archive, and not needed in general
for pending_archives.
2017-06-13 23:16:28 +02:00
Marian Beermann
879f72f227 fuse: log process_archive timing
the easier alternative to "/bin/time stat mountpoint/<archive>/..."
2017-06-13 23:16:28 +02:00
Marian Beermann
c791921951 fuse: instrument caches
note: signal processing can be arbitrarily delayed;
Python processes signals as soon as the code returns into the interpreter
loop, which doesn't happen unless libfuse returns control, i.e.
some request has been sent to the file system.
2017-06-13 23:16:28 +02:00
Thomas Waldmann
ccd066f0af FUSE: fix negative uid/gid crash, fixes #2674
they could come into archives e.g. when backing up
external drives under cygwin.
2017-06-13 19:51:37 +02:00
Marian Beermann
cb98cb838d fuse: fix read(2) caching data in metadata cache
The OS page cache is responsible for handling this and is much more
empowered to do a good job at that than Borg.
2017-06-02 17:43:15 +02:00
Marian Beermann
c6309b148b fuse: fix crash if empty (None) xattr is read 2017-05-20 18:50:10 +02:00
Thomas Waldmann
8f769a9b24 implement and use hardlinkable() helper 2017-04-05 13:38:27 +02:00
Marian Beermann
2ff75d58f2 remove Chunk() 2017-04-04 00:16:15 +02:00
Thomas Waldmann
50068c596d rename Item.file_size -> get_size
file_size is misleading here because one thinks of on-disk file size,
but for compressed=True, there is no such on-disk file.
2017-02-23 21:27:05 +01:00
Thomas Waldmann
ae6742fb34 fuse: use precomputed size from Item 2017-02-23 21:24:37 +01:00
Thomas Waldmann
fe8e14cb2c fuse: get rid of chunk accounting
the chunk accounting code tried to reflect repo space usage via the st_blocks of the files.
so, a specific chunk that was shared between multiple files [inodes] was only accounted for one specific file.
thus, the overall "du" of everything in the fuse mounted repo was maybe correctly reflecting the repo space usage,
but the decision which file has the chunk (the space) was kind of arbitrary and not really useful.

otoh, a simple fuse getattr() was rather expensive due to this as it needed to iterate over the chunks list
to compute the st_blocks value. also it needed quite some memory for the accounting.

thus, st_blocks is now just ceil(size / blocksize).

also: fixed bug that st_blocks was a floating point value previously.

also: preparing for further optimization of size computation (see next cs)
2017-02-23 21:24:37 +01:00
Thomas Waldmann
a52b54dc3c archived file items: add size metadata
if an item has a chunk list, pre-compute the total size and store it into "size" metadata entry.

this speeds up access to item size (e.g. for regular files) and could also be used to verify the validity of the chunks list.

note about hardlinks: size is only stored for hardlink masters (only they have an own chunk list)
2017-02-23 21:24:37 +01:00
Thomas Waldmann
c0dc644ef6 Merge branch '1.0-maint' into merge-1.0-maint
# Conflicts:
#	MANIFEST.in
#	Vagrantfile
#	docs/changes.rst
#	docs/usage/mount.rst.inc
#	src/borg/archiver.py
#	src/borg/fuse.py
#	src/borg/repository.py
2017-01-29 05:49:53 +01:00
Thomas Waldmann
b5f9858055 move first/last/sort_by-multiple functionality into Manifest.list
also: rename list_filtered to list_considering
2016-10-15 01:04:56 +02:00
Thomas Waldmann
694c3978a1 refactor Archiver._get_filtered_archives -> Archives.list_filtered
it did not belong into Archiver class (did not use "self"), but in into Archives.
2016-10-15 01:03:16 +02:00
Thomas Waldmann
26e6ac4fea borg mount --first / --last / --sort / --prefix, fixes #1542
also: use consider_part_files when dealing with multiple archives / whole repo mount
2016-10-15 01:03:16 +02:00
Thomas Waldmann
260ef31728 fuse: refactor for less encoding dance 2016-09-16 16:38:08 +02:00
Thomas Waldmann
39170479aa fuse: fix hardlinks in versions view, fixes #1599 2016-09-16 16:38:08 +02:00
Thomas Waldmann
001500ab99 fuse: refactor file versioning code 2016-09-16 16:38:08 +02:00
Thomas Waldmann
5d22078f35 fuse: add parameter check to ItemCache.get to make potential failures more clear 2016-09-16 16:38:08 +02:00
Thomas Waldmann
dd89181062 fuse: refactor / optimize process_inner 2016-09-01 06:26:33 +02:00
Thomas Waldmann
6f50cc3413 fuse: simplify path segments loop 2016-09-01 05:18:10 +02:00
Thomas Waldmann
d64ccff1c4 fuse: remove unneeded function definition
code only had 1 caller, so just inline it.
2016-09-01 04:57:11 +02:00
Thomas Waldmann
34eb475463 fuse: remove unneeded safe_encode
fsencode will happen in _find_inode()
2016-09-01 04:33:42 +02:00
Thomas Waldmann
8b5372b54c fuse: slightly refactor shadowing detection
if it is not a directory, the old code was a NOP, so we can just check that first.
2016-09-01 04:30:55 +02:00
Thomas Waldmann
1f04820d9d fuse: implement versions view
all archives, all items are read to build a unified view.
files are represented by a same-name directory with the versions of the file.
A filename suffix computed by adler32(chunkids) is used to disambiguate the versions.

also: refactor code a little, create methods for leaves, inner nodes.
2016-08-27 23:17:57 +02:00
Thomas Waldmann
1f056d9e8a more safe interface for manifest.archives 2016-08-15 15:03:05 +02:00
Thomas Waldmann
c8922c8b3d use ArchiveItem 2016-08-15 01:11:33 +02:00
Thomas Waldmann
dbe862f3d8 Merge branch '1.0-maint' into merge-1.0-maint 2016-08-06 01:24:22 +02:00
Thomas Waldmann
3baa8a3728 Merge branch '1.0-maint'
# Conflicts:
#	docs/changes.rst
#	docs/usage/mount.rst.inc
#	src/borg/archive.py
#	src/borg/archiver.py
#	src/borg/fuse.py
#	src/borg/testsuite/archiver.py
2016-07-11 01:23:27 +02:00
Thomas Waldmann
fe627246e4 Merge branch '1.0-maint' 2016-07-08 12:13:52 +02:00
Thomas Waldmann
75244ea6d1 fuse: simplify timestamp processing 2016-06-04 17:34:03 +02:00
Thomas Waldmann
60da32123a refactor to use Item class, fixes #1071 2016-06-04 17:24:55 +02:00
Thomas Waldmann
d3deec9fc9 cleanup / reorder imports
import stdlib
from stdlib import x

import 3rd party

import borg stuff
2016-05-31 01:18:03 +02:00
Thomas Waldmann
49484d6d67 split helpers import into multiple ones 2016-05-31 00:33:13 +02:00
Thomas Waldmann
d1ea925a5b move borg package to src/ 2016-05-05 20:19:50 +02:00
Renamed from borg/fuse.py (Browse further)