You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo insmod nova.ko
sudo mount -t NOVA -o init,dbgmask=255 /dev/pmem0 /mnt/pmem0
sudo mkdir /mnt/pmem/dir
# assuming the executable C code is a.out
./a.out /mnt/pmem0
# the output is:# ., 1# .., 33# dir, 33# The syslog shows the inode number for the `..` file and the `dir` entry is correct.
if (prev_entry&& !dir_emit(ctx, prev_entryc->name,
prev_entryc->name_len, ino,
IF2DT(le16_to_cpu(prev_child_pi->i_mode))))
return0;
In the above code snippet, the inode number passed to dir_emit is incorrect. It should be prev_entryc->ino rather than ino. This explains why the .. file's inode is 33 and dir's inode is still 33.
Fix
Simply modify the ino as prev_entryc->ino as the below code shows.
Issue
The inode number is incorrect when
readdir
.Reproduce
The blow C code is used to read the directory and print out the
d_ino
.Reason
linux-nova/fs/nova/dir.c
Lines 708 to 713 in 976a4d1
linux-nova/fs/nova/dir.c
Lines 728 to 731 in 976a4d1
In the above code snippet, the inode number passed to
dir_emit
is incorrect. It should beprev_entryc->ino
rather thanino
. This explains why the..
file's inode is 33 anddir
's inode is still 33.Fix
Simply modify the
ino
asprev_entryc->ino
as the below code shows.The text was updated successfully, but these errors were encountered: