-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symlinks not properly persisted even with checksums+parity enabled #124
Comments
Can you provide the repro steps? Thanks. |
Use the following shell script to reproduce. set -ex
mount -tNOVA -oinit /dev/pmem0 /mnt
echo -n test > /mnt/myfile
ln -s /mnt/myfile /mnt/symlink
ls -l /mnt
sync
cat /dev/pmem0 > bak
umount /mnt
cp bak corrupted
index=`strings -t d bak | grep /mnt/myfile | cut -f1,1 -d\ ` && echo "$index"
dd if=/dev/zero of=corrupted bs=1 seek=$((index+10)) count=1 conv=notrunc
cat corrupted > /dev/pmem0
mount -tNOVA -oro /dev/pmem0 /mnt
ls -l /mnt Output:
At the end, "symlink" points to |
Thanks for the repo steps. Looks like symlink has protection for write entry, but no protection for the data (symlink names). So data csum/parity does not work for symlinks. |
When creating a symlink to target
/mnt/myfile
, multiple crash states can be observed after the symlink operation has completed:The targets
/mnt/myfile
,/mnt/myfil
,/mnt/myfi
and/mnt/myf
are possible.This originates from the same bug as #105 (as
nova_block_symlink
usesmemcpy_to_pmem_nocache
).However what is interesting, is that these failure states are even observed with data parity turned on (
nova.metadata_csum=1 nova.data_csum=1 nova.data_parity=1
).The crash states in #105 (where a normal file and not a symlink is written) do not occur with these protection features, as NOVA is able to detect and recover the unpersisted bytes.
However, it appears that symlink targets are not protected by checksum or parity features, so when recovering from such a crash, NOVA does not detect nor repair the symlink targets.
The text was updated successfully, but these errors were encountered: