search for: os_create_reflink

Displaying 1 result from an estimated 1 matches for "os_create_reflink".

2013 Oct 16
0
[BUG] Reflinking fails for files >2GB on 32-bit platform
...ports rep) Anything missing? I´m happy to provide additional input! ====snip===demo program source======= #include <iostream> #include <errno.h> #include <stdio.h> #include <sys/types.h> #include <fcntl.h> #include <sys/ioctl.h> #include <unistd.h> bool os_create_reflink(const char* linkname, const char* fname) { int src_desc=open(fname, O_RDONLY); if( src_desc<0) return false; int dst_desc=open(linkname, O_WRONLY | O_CREAT | O_EXCL, S_IRWXU | S_IRWXG); if( dst_desc<0 ) { close(src_desc); return false; } #define BTRFS_IOCTL_MAGIC 0x94...