Closed jcbmao closed 8 months ago
Thank you for the report. I was able reproduce the crash when wrapfs is mounted on top of a local xfs directory on centos-7.9. When wrapfs is mounted on top of a nfsv3 mount like on our production servers file renames work fine.
I will take a look at how to fix that.
Thank you for your response.The issue has been resolved,Please provide a detailed description of the specific cause.
Have the issue been fixed?
It's not obvious why an invalid dentry param is passed there. I have to take a deeper look next week.
Has this issue been resolved?
The crash is fixed now. This occured only on redhat7 kernels, because redhat intruduced an inode_operations_wrapper struct to backport some inode operations from newer kernels. An illegal function pointer was called in vfs_rename when the S_IOPS_WRAPPER flag of an underlying inode did not match the layout of the wrapfs iops struct.
The crash did only happen when the virtual filesystem was mounted on top of a filesystem using the S_IOPS_WRAPPER layout (btrfs,cifs,ext2,ext4,fuse,gfs2,xfs).
This crash happens also with the original wrapfs implementation and the ecryptfs module included in the redhat kernel tree. The redhat7 overlayfs kernel module is compatible with the wrapper layout.
Is there a solution to the problem of data loss occurring when copying files to the /home/test directory and executing the command “mount -t wrapfs /home/test /home/test” to mount wrapfs, causing the file copying to be interrupted?
Code branch is “intercept_modify”.
When mounting wrapfs using the command “mount -t wrapfs /home/test /home/test” and then executing “mv /home/test/file /home/test/file1”, it causes a kernel coredump. The line of code causing the crash is “lower_dentry = wrapfs_get_lower_dentry(dentry);” in the “wrapfs_readlink” function of “inode.c”.What could be the issue?
os version: centos7.6