NVSL / PMFS-new

Porting PMFS to the latest Linux kernel
15 stars 25 forks source link

Bug in file system initialization #4

Closed hayley-leblanc closed 3 years ago

hayley-leblanc commented 3 years ago

Hi,

I'm not sure if this repo is still maintained, but I have a bug to report in the pmfs_init() function in super.c. When the directory entries in the root directory are set up around line 452, the "." entry is never explicitly flushed to PM. If the system loses power before this entry becomes durable, the root directory is inaccessible on the next mount and attempting to ls it causes the fs to hang. This issue is fixed by adding one flush after setting the values of this entry; I can submit a PR with a patch in a bit.

Andiry commented 3 years ago

I think ".." entry is flushed, but "." seems not. So this does look like a bug to me. PR is welcome.

On Sun, Jan 31, 2021 at 8:08 AM hayley-leblanc notifications@github.com wrote:

Hi,

I'm not sure if this repo is still maintained, but I have a bug to report in the pmfs_init() function in super.c. When the directory entries in the root directory are set up around line 452, the "." entry is never explicitly flushed to PM. If the system loses power before this entry becomes durable, the root directory is inaccessible on the next mount and attempting to ls it causes the fs to hang. This issue is fixed by adding one flush after setting the values of this entry; I can submit a PR with a patch in a bit.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/NVSL/PMFS-new/issues/4__;!!Mih3wA!Wst9V0kmYj8D5jeHDxmVvE5q0xtDVJUy-V7mUWlPettq5KbbSyapzNF0cIjMGUsbDRbj$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAKBYEAOTPVNAYYVF4UALJTS4V6BNANCNFSM4W3PMKXQ__;!!Mih3wA!Wst9V0kmYj8D5jeHDxmVvE5q0xtDVJUy-V7mUWlPettq5KbbSyapzNF0cIjMGQMinF43$ .