Bug 1724624
Summary: | LINK does not invalidate metadata cache of parent directory | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | homma |
Component: | upcall | Assignee: | bugs <bugs> |
Status: | CLOSED UPSTREAM | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | mainline | CC: | bugs, khiremat, skoduri |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-12 12:44:09 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
homma
2019-06-27 12:30:10 UTC
I saw the source code, and found that in up_link_cbk(), upcall_cache_invalidate() is called with flags=UP_UPDATE_CLIENT for the parent directory. When upcall_cache_invalidate() is called with flags=UP_UPDATE_CLIENT (equals to UP_ATIME), cache-invalidation notification is not sent to the clients. It also applies to up_unlink_cbk(), up_rename_cbk(), and up_rmdir_cbk(). In all cases, upcall_cache_invalidate() is called with UP_PARENT_DENTRY_FLAGS for the inode that is created/deleted/renamed, but notification will never be sent to clients that have cache entry of only the parent directory. I have confirmed that the problem persists on release 6.3. On release 6, metadata cache of directories are refreshed by 'ls -l' for 1-way distributed volumes, because of dht pass-through. In that case, the problem is reproduced by the following steps: On client#1: stat dir1 dir2 On client#2: stat dir1 dir2 On client#1: echo test > dir1/test On client#1: ln dir1/test dir2/test On client#1: rm dir1/test On client#1: stat dir1 dir2 On client#2: stat dir1 dir2 On client#2, mtime and ctime of dir2 are not updated until expiration of metadata cache. This bug is moved to https://github.com/gluster/glusterfs/issues/933, and will be tracked there from now on. Visit GitHub issues URL for further details |