Skip to content

Commit

Permalink
Assume all filesystems support reflinks
Browse files Browse the repository at this point in the history
This is a hack that lets me make reflinks on NFS mounts using NFS v4.2
server-side copy support.
  • Loading branch information
cebtenzzre authored and intelfx committed Mar 9, 2023
1 parent d300387 commit b1b9e85
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions lib/utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,21 +751,8 @@ static RmMountEntry *rm_mount_list_next(RmMountEntries *self) {
}
}

static bool fs_supports_reflinks(char *fstype, char *mountpoint) {
if(strcmp(fstype, "btrfs") == 0) {
return true;
}
if(strcmp(fstype, "ocfs2") == 0) {
return true;
}
if(strcmp(fstype, "xfs") == 0) {
/* xfs *might* support reflinks...*/
char *cmd = g_strdup_printf("xfs_info '%s' | grep -q 'reflink=1'", mountpoint);
int res = system(cmd);
g_free(cmd);
return (res == 0);
}
return false;
static bool fs_supports_reflinks(_UNUSED char *fstype, _UNUSED char *mountpoint) {
return true;
}

static RmMountEntries *rm_mount_list_open(RmMountTable *table) {
Expand Down

0 comments on commit b1b9e85

Please sign in to comment.