1
0
mirror of https://github.com/Zygo/bees.git synced 2025-06-16 09:36:17 +02:00

Skip nocow files to speed up processing

If you have a lot of or a few big nocow files (like vm images) which
contain a lot of potential deduplication candidates, bees becomes
incredibly slow running through a lot "invalid operation" exceptions.

Let's just skip over such files to get more bang for the buck. I did no
regression testing as this patch seems trivial (and I cannot imagine any
pitfalls either). The process progresses much faster for me now.
This commit is contained in:
Kai Krakow
2017-09-12 02:09:22 +02:00
parent 703bb7c1a3
commit a5e2bdff47
3 changed files with 22 additions and 0 deletions

View File

@ -13,6 +13,10 @@
#include <sys/stat.h>
#include <fcntl.h>
// ioctl
#include <sys/ioctl.h>
#include <linux/fs.h>
// socket
#include <sys/socket.h>
@ -141,6 +145,8 @@ namespace crucible {
Stat &lstat(const string &filename);
};
int ioctl_iflags_get(int fd);
string st_mode_ntoa(mode_t mode);
// Because it's not trivial to do correctly