commit | e239d04fe118d34bd89800cb3458fa329e66f02c | [log] [tgz] |
---|---|---|
author | Jeuk Kim <jeuk20.kim@samsung.com> | Mon Dec 06 22:34:48 2021 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 06 22:34:48 2021 +0000 |
tree | d9668b52f858360de531c82ecd00a3870eb78a4b | |
parent | 20ac710ac3580664836a27f255c4b514efdfa799 [diff] |
[f2fs] Fix tracking i_pino during inline directory rename Previously, inline directory rename causes i_pino inconsistency. In the case of the following scenario, a bug can occur. Let's suppose there are three directories, "/a", "/b", and "/a/c". - pino of "/a/c" is DIR_A_INO. Then, 1. Rename "/a/c" to "/b/c" 2. Remount The parent inode number of "/b/c" should be DIR_B_INO, but it is still DIR_A_INO. It is because Dir::Rename has old_dir_page(the page having ".." dentry of target directory) and ipage(the inode page of target directory) simultaneously. Once Dir::Rename is called, it updates i_pino of ipage and flushes it. Then, it updates ".." dentry of old_dir_page and flushes it. When target directory supports inline directory entry, old_dir_page becomes same to inode page. So, old_dir_page overwrites i_pino information of inode page and rolls back to the previous parent inode number. To fix it, i_pino is updated only in vnode, and updated to the page later. Change-Id: Id82a36e3188954a1e6307920ad096cad386dd9df Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/613550 Commit-Queue: Chris Suter <csuter@google.com> Reviewed-by: Chris Suter <csuter@google.com>
Fuchsia an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.