Skip to content

Commit

Permalink
Add metacopy support
Browse files Browse the repository at this point in the history
Fixes #127

Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Dec 24, 2024
1 parent a8ba40a commit 9ac8c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zram-config
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ createZdir() {
mkdir -p "${ZDIR}/zram${RAM_DEV}"
mount --types "$dirFSType" -o "$dirMountOpt" "/dev/zram${RAM_DEV}" "${ZDIR}/zram${RAM_DEV}/" &> /dev/null || retVal=1
mkdir -p "${ZDIR}/zram${RAM_DEV}/upper" "${ZDIR}/zram${RAM_DEV}/workdir" "$TARGET_DIR"
mount --types overlay -o "redirect_dir=on,lowerdir=${ZDIR}${BIND_DIR},upperdir=${ZDIR}/zram${RAM_DEV}/upper,workdir=${ZDIR}/zram${RAM_DEV}/workdir" "overlay${RAM_DEV}" "$TARGET_DIR" &> /dev/null || retVal=1
mount --types overlay -o "redirect_dir=on,metacopy=on,lowerdir=${ZDIR}${BIND_DIR},upperdir=${ZDIR}/zram${RAM_DEV}/upper,workdir=${ZDIR}/zram${RAM_DEV}/workdir" "overlay${RAM_DEV}" "$TARGET_DIR" &> /dev/null || retVal=1
chown "${dirUser}:${dirGroup}" "${ZDIR}/zram${RAM_DEV}/upper" "${ZDIR}/zram${RAM_DEV}/workdir" "$TARGET_DIR" &> /dev/null || retVal=1
chmod "$dirPerm" "${ZDIR}/zram${RAM_DEV}/upper" "${ZDIR}/zram${RAM_DEV}/workdir" "$TARGET_DIR" &> /dev/null || retVal=1
if [[ $retVal -ne 0 ]]; then
Expand Down

0 comments on commit 9ac8c51

Please sign in to comment.