Skip to content

Commit

Permalink
Merge pull request #315 from NERSC/autoclear
Browse files Browse the repository at this point in the history
"Autoclear" option does not work with the mount command in newer kernels.
  • Loading branch information
scanon authored Dec 4, 2021
2 parents e42745a + 0fe14da commit 7438479
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shifter_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
#include <linux/version.h>

#include <sys/types.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -1428,7 +1429,11 @@ int loopMount(const char *imagePath, const char *loopMountPath, ImageFormat form
fprintf(stderr, "ERROR: no apparent support for squashfs!");
goto _loopMount_unclean;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
useAutoclear = 0;
#else
useAutoclear = 1;
#endif
ready = 1;
imgType = "squashfs";
} else if (format == FORMAT_XFS) {
Expand Down

0 comments on commit 7438479

Please sign in to comment.