summaryrefslogtreecommitdiff
path: root/src/shared/btrfs-util.c
AgeCommit message (Collapse)Author
2015-06-11build-sys: split internal basic/ library from shared/Kay Sievers
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/
2015-04-22btrfs-util: support recursive removal of read-only subvolumesLennart Poettering
When deleting a read-only subsvolume with a sub-subvolume, we need to mark it writable first, otherwise the removal will not work.
2015-04-22btrfs-util: fix creating recursive read-only snapshotsLennart Poettering
When creating recursive read-only snapshots we need to mark the snapshot writable immediately before creating subsnapshots within it, otherwise the operation for it will fail.
2015-04-22btrfs-util: be more careful when invoking btrfs file system ioctlsLennart Poettering
If we get passed an fd that does not refer to a regular file or directory, we should not issue btrfs ioctls on it, since it might end up in a device driver or similar (note that DRM for example uses the same ioctl numbers as some file system ioctls). Hence, let's make sure to always check if something is a regular file or directory, or is on btrfs before invoking the respective ioctls. It's better to be safe than sorry.
2015-04-22btrfs-util: introduce btrfs_is_filesystem() and make use of it where appropriateLennart Poettering
Let's unify the code that checks whether an fd is on btrfs a bit. (Also, rename btrfs_is_snapshot() to btrfs_is_subvol(), since that's usually how this is referred to in our code)
2015-04-06btrfs: add support for recursive btrfs snapshottingLennart Poettering
2015-04-06btrfs: missing endian conversion fixLennart Poettering
2015-04-06btrfs: make btrfs_subvol_snapshot() parameters a flags fieldLennart Poettering
2015-04-06btrfs: support recursively removing btrfs snapshotsLennart Poettering
2015-03-27fix gcc warnings about uninitialized variablesHarald Hoyer
like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
2015-03-10shared: the btrfs quota field is called "referenced" not "referred"Lennart Poettering
2015-03-09importd: add API for exporting container/VM imagesLennart Poettering
Also, expose it in machinectl.
2015-03-03importd: automatically grow /var/lib/machines/ loopback filesystem during ↵Lennart Poettering
downloads If /var/lib/machines is mounted as btrfs loopback file system in /var/lib/machines.raw with this change we automatically grow the file system as it fills up. After each 10M we write to it during imports, we check the free disk space, and if the fill level grows beyond 66% we increase the size of the file system to 3x the fill level (thus lowering it to 33%).
2015-02-26machined: if /var/lib/machines is backed by a loop file, resize it on ↵Lennart Poettering
"machinectl set-limit" When the pool size limit is altered with "machinectl set-limit", then not only set the subvolume quota of the /var/lib/machine subvolume, but also resize the backing loop file and the btrfs file system on it dynamically.
2015-02-25machined,machinectl: add calls for changing container/VM quotasLennart Poettering
2015-02-24importd: enable btrfs quota in /var/lib/machines, if necessaryLennart Poettering
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-01-20import: port pull-raw to helper tools implemented for pull-tarLennart Poettering
This allows us to reuse a lot more code, and simplify pull-raw drastically.
2015-01-19qcow2: when dissecting qcow2, use btrfs clone ioctls for reflinking blocks ↵Lennart Poettering
to target
2015-01-07btrfs-util: rework how we iterate through the results of the TREE_SEARCH resultsLennart Poettering
Let's introduce some syntactic sugar with iteration macros, and add correct key increment calls.
2015-01-06journald: whenever we rotate a file, btrfs defrag itLennart Poettering
Our write pattern is quite awful for CoW file systems (btrfs...), as we keep updating file parts in the beginning of the file. This results in fragmented journal files. Hence: when rotating files, defragment them, since at that point we know that no further write accesses will be made.
2014-12-28machined: add support for reporting image size via btrfs quotaLennart Poettering
2014-12-28tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering
2014-12-25machined: beef up machined image listing with creation/modification times of ↵Lennart Poettering
subvolumes We make use of the btrfs subvol crtime for this, and for gpt images of a manually managed xattr, if we can.
2014-12-19machined/machinectl: add logic to show list of available imagesLennart Poettering
This adds a new bus call to machined that enumerates /var/lib/container and returns all trees stored in it, distuingishing three types: - GPT disk images, which are files suffixed with ".gpt" - directory trees - btrfs subvolumes
2014-12-18machinectl: add new commands for copying files from/to containersLennart Poettering
2014-12-12shared: add new btrfs-util.[ch] helpers for doing common btrfs operationLennart Poettering