Comments (2)
Can you post the reproduce steps? Thanks.
from linux-nova.
Reproduce
Lines 435 to 440 in 976a4d1
Add return 0
after remove the dentry
to simulate a crash.
update_dir.tail = 0;
update_dir.alter_tail = 0;
retval = nova_remove_dentry(dentry, 0, &update_dir, epoch_id, false);
if (retval)
goto out;
# simulate a crash
return 0;
# rebuild after the modification
insmod nova.ko metadata_csum=1 data_csum=1 data_parity=1 dram_struct_csum=1
mount -t NOVA -o init,data_cow,dbgmask=255 /dev/pmem0 /mnt/pmem0
touch /mnt/pmem0/foo
ln /mnt/pmem0/foo /mnt/pmem0/bar
# stat will show both foo and bar have two links
stat /mnt/pmem0/foo
stat /mnt/pmem0/bar
# unlink function will trigger the modification in the source code, simulating a crash
unlink /mnt/pmem0/foo
# store the crash image
cat /dev/pmem0 > image
# umount and remount the crash image
umount /mnt/pmem0
cat image > /dev/pmem0
sudo mount -t NOVA -o data_cow,dbgmask=255 /dev/pmem0 /mnt/pmem0
# stat will show foo is gone, but the link count of bar is still 2
stat /mnt/pmem0/foo
stat /mnt/pmem0/bar
Reason
The removal of the dentry
is conducted in-place, before updating the link count. Thus, if a crash occurs after the removal, we cannot see the dentry
but the link is outdated.
Fix
Disable the in-place update option for unlink.
from linux-nova.
Related Issues (20)
- File metadata/contents differ between mounts after modifying using multiple file descriptors HOT 3
- Double Flush and Fence issues HOT 1
- Issue with fallocate after remount HOT 2
- Incorrect epoch_id after restoring snapshot entries HOT 1
- Failed checksum checking for nova_range_node HOT 1
- Ignored NEXT_PAGE flag in the function nova_background_clean_snapshot_list HOT 3
- CoW not enabled by default and `inplace_data_updates` option does not exist
- What is different from f2fs HOT 1
- Proper size of NOVA not reflected when mounting on a partition HOT 4
- Read Fault when init inode list from inode in case of a crash
- Incorrect inode number emitted from nova_readdir_fast
- DEntry is staill visible after unlink and rmdir in case of crashes
- Unsafe read of user buf in procfs
- Possible issues when allocate page-sized memory in snapshot management
- Inconsistent i_blocks before and after unmount after ftruncate
- Data leak if crash during truncate
- Inconsistent attributes of symlink before and after umount
- Out-of-order execution bug when setting alter pages
- Mounting error when use cmd mount -t NOVA -o init,dax,data_cow /dev/pmem0/mnt /data
- Fix kernel hang when snapshot cleaner thread is not stopped properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-nova.