diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-25 05:35:04 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-25 16:25:46 +0900 |
commit | 4117366a283657295264723e559d7ead79a7cfd3 (patch) | |
tree | ed1dd5bb0c262d0223fd62083e139e3cc97db8b6 /src/basic/fd-util.c | |
parent | 876d7e0b4fe3e40e2567e3c21d35ce6fd2861979 (diff) | |
download | systemd-4117366a283657295264723e559d7ead79a7cfd3.tar.gz |
btrfs-util: move btrfs_defrag_fd() from fd-util.[ch]
After d71ece3f0b85c7a3decc50143b68ac07fc5831ae, the function is not used
in libbasic or libsystemd anymore. Let's move it to more appropriate
place.
Diffstat (limited to 'src/basic/fd-util.c')
-rw-r--r-- | src/basic/fd-util.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c index 6c85a34896..cee20a9a81 100644 --- a/src/basic/fd-util.c +++ b/src/basic/fd-util.c @@ -2,7 +2,6 @@ #include <errno.h> #include <fcntl.h> -#include <linux/btrfs.h> #if WANT_LINUX_FS_H #include <linux/fs.h> #endif @@ -779,20 +778,6 @@ int read_nr_open(void) { return 1024 * 1024; } -/* This is here because it's fd-related and is called from sd-journal code. Other btrfs-related utilities are - * in src/shared, but libsystemd must not link to libsystemd-shared, see docs/ARCHITECTURE.md. */ -int btrfs_defrag_fd(int fd) { - int r; - - assert(fd >= 0); - - r = fd_verify_regular(fd); - if (r < 0) - return r; - - return RET_NERRNO(ioctl(fd, BTRFS_IOC_DEFRAG, NULL)); -} - int fd_get_diskseq(int fd, uint64_t *ret) { uint64_t diskseq; |