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
here is a workflow that can reproduce this problem,
mount_1 │ mount_2
──────────────────────────┼───────────────────────────
│
1. echo "a" > file │
│
2. cat file │
> a │
│ 3. cat file
│ > a
│
4. echo "a" >> file │
│
│
│ 5. cat file
│ > a
│
6. cat file │
> a │
a │
│ 7. cat file
│ > a
│
8. umount & remount │
│
│
9. cat file │
> a │
step 9 should output double a like step 6, but it doesn't, because file's length is still 2 instead of 4.
The reason is:
we mount a filesystem twice but disable close-to-open guarantee
cat file makes the inode dirty in the cache, which means it will update metadata to metaserver, and this leads to the inode's length changing from 4 to 2 in metaserver.
Describe the bug (描述bug)
The length of the file written by the mount point is not updated
To Reproduce (复现方法)
1、mount fs1 -> test1 fs1 -> test2
2、echo a > test1/a
3、cat test2/a -> a
4、echo b >> test1/a
sleep 5mins
5、cat test2/a -> a
6、umount test5 test6 / mount test5 test6
Expected behavior (期望行为)
Versions (各种版本)
OS:
Compiler:
branch:
commit id:
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: