summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-08 01:22:29 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-08 01:22:29 +0100
commit11689d2a021d95a8447d938180e0962cd9439763 (patch)
tree83e4e1a10a219bd6344e995f445b4fe95ed54acb /src/shared/util.h
parent3c4230a5afb27faec2176d4642c0e2e145971b5c (diff)
journald: turn off COW for journal files on btrfs
btrfs' COW logic results in heavily fragment journal files, which is detrimental for perfomance. Hence, turn off COW for journal files as we create them. Turning off COW comes at the cost of data integrity guarantees, but this should be acceptable, given that we do our own checksumming, and generally have a pretty conservative write pattern. Also see discussion on linux-btrfs: http://www.spinics.net/lists/linux-btrfs/msg41001.html
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 4b7e12e628..31103e957f 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -1071,3 +1071,6 @@ int path_getcrtime(const char *p, usec_t *usec);
int fd_getcrtime_at(int dirfd, const char *name, usec_t *usec, int flags);
int same_fd(int a, int b);
+
+int chattr_fd(int fd, bool b, int mask);
+int chattr_path(const char *p, bool b, int mask);