Bug 1313852
| Summary: | Locks xl must use unique keys when filling in lock_count, dom_lock_count etc requested | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Krutika Dhananjay <kdhananj> |
| Component: | locks | Assignee: | Krutika Dhananjay <kdhananj> |
| Status: | CLOSED DEFERRED | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | mainline | CC: | bugs |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-02-06 11:40:01 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: | |||
Issue still seems to exist. Do we plan to fix it? (In reply to Yaniv Kaul from comment #1) > Issue still seems to exist. Do we plan to fix it? That's true. The issue does still exist. I need to check if there are any consumers today that will request multiple such counts as part of the same fop. And then again, it also needs to be fixed in a backward-compatible way since the key-requesting translators will be on the client side and their values are served by locks translator which sits on the server side. I just found this while reading code and raised it a while ago. Let me check if we need this. Keeping the needinfo on me intact until then. -Krutika In the current scheme of things, this change won't be necessary. Closing the bz. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |
Description of problem: 12 void 11 pl_set_xdata_response (xlator_t *this, pl_local_t *local, inode_t *parent, 10 inode_t *inode, char *name, dict_t *xdata) 9 { 8 if (!xdata || !local) 7 return; 6 5 if (local->parent_entrylk_req && parent && name && strlen (name)) 4 pl_parent_entrylk_xattr_fill (this, parent, name, xdata); 3 2 if (local->entrylk_count_req && inode) 1 pl_entrylk_xattr_fill (this, inode, xdata); 0 1 if (local->inodelk_dom_count_req && inode) 2 pl_inodelk_xattr_fill (this, inode, xdata, 3 data_to_str (local->inodelk_dom_count_req)); 4 5 if (local->inodelk_count_req && inode) 6 pl_inodelk_xattr_fill (this, inode, xdata, NULL); 7 8 if (local->posixlk_count_req && inode) 9 pl_posixlk_xattr_fill (this, inode, xdata); 10 } 4 void 5 pl_inodelk_xattr_fill (xlator_t *this, inode_t *inode, dict_t *dict, 6 char *domname) 7 { 8 int32_t count = 0; 9 int ret = -1; 10 11 12 count = get_inodelk_count (this, inode, domname); 13 14 ret = dict_set_int32 (dict, GLUSTERFS_INODELK_COUNT, count); <====== bad, because the same key is used to set multiple requested options, overwriting the previous value. 15 if (ret < 0) { 16 gf_log (this->name, GF_LOG_DEBUG, "Failed to set count for " 17 "key %s", GLUSTERFS_INODELK_COUNT); 18 } 19 20 return; 21 } Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: