|
|
17b94a |
From 8267e5e97327633bf21fd02df8d52e3a97f0f9ea Mon Sep 17 00:00:00 2001
|
|
|
17b94a |
From: Ashish Pandey <aspandey@redhat.com>
|
|
|
17b94a |
Date: Wed, 4 Dec 2019 17:06:18 +0530
|
|
|
17b94a |
Subject: [PATCH 421/449] Improve logging in EC, client and lock translator
|
|
|
17b94a |
|
|
|
17b94a |
BUG: 1787294
|
|
|
17b94a |
> Upstream patch: https://review.gluster.org/#/c/glusterfs/+/23814/
|
|
|
17b94a |
> Change-Id: I98af8672a25ff9fd9dba91a2e1384719f9155255
|
|
|
17b94a |
> Fixes: bz#1779760
|
|
|
17b94a |
|
|
|
17b94a |
Change-Id: I5cb04993f12d6248f2349a0c5a9e2c0ceecaf528
|
|
|
17b94a |
Reviewed-on: https://code.engineering.redhat.com/gerrit/202533
|
|
|
17b94a |
Tested-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
17b94a |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
17b94a |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
17b94a |
---
|
|
|
17b94a |
xlators/cluster/ec/src/ec-combine.c | 5 +++--
|
|
|
17b94a |
xlators/cluster/ec/src/ec-common.c | 2 +-
|
|
|
17b94a |
xlators/features/locks/src/inodelk.c | 12 ++++++++----
|
|
|
17b94a |
3 files changed, 12 insertions(+), 7 deletions(-)
|
|
|
17b94a |
|
|
|
17b94a |
diff --git a/xlators/cluster/ec/src/ec-combine.c b/xlators/cluster/ec/src/ec-combine.c
|
|
|
17b94a |
index c5af2ab..99e5534 100644
|
|
|
17b94a |
--- a/xlators/cluster/ec/src/ec-combine.c
|
|
|
17b94a |
+++ b/xlators/cluster/ec/src/ec-combine.c
|
|
|
17b94a |
@@ -179,13 +179,14 @@ ec_iatt_combine(ec_fop_data_t *fop, struct iatt *dst, struct iatt *src,
|
|
|
17b94a |
"links: %u-%u, uid: %u-%u, gid: %u-%u, "
|
|
|
17b94a |
"rdev: %" PRIu64 "-%" PRIu64 ", size: %" PRIu64 "-%" PRIu64
|
|
|
17b94a |
", "
|
|
|
17b94a |
- "mode: %o-%o)",
|
|
|
17b94a |
+ "mode: %o-%o), %s",
|
|
|
17b94a |
dst[i].ia_ino, src[i].ia_ino, dst[i].ia_nlink,
|
|
|
17b94a |
src[i].ia_nlink, dst[i].ia_uid, src[i].ia_uid, dst[i].ia_gid,
|
|
|
17b94a |
src[i].ia_gid, dst[i].ia_rdev, src[i].ia_rdev,
|
|
|
17b94a |
dst[i].ia_size, src[i].ia_size,
|
|
|
17b94a |
st_mode_from_ia(dst[i].ia_prot, dst[i].ia_type),
|
|
|
17b94a |
- st_mode_from_ia(src[i].ia_prot, dst[i].ia_type));
|
|
|
17b94a |
+ st_mode_from_ia(src[i].ia_prot, dst[i].ia_type),
|
|
|
17b94a |
+ ec_msg_str(fop));
|
|
|
17b94a |
|
|
|
17b94a |
return 0;
|
|
|
17b94a |
}
|
|
|
17b94a |
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
|
|
|
17b94a |
index 5cae37b..e580bfb 100644
|
|
|
17b94a |
--- a/xlators/cluster/ec/src/ec-common.c
|
|
|
17b94a |
+++ b/xlators/cluster/ec/src/ec-common.c
|
|
|
17b94a |
@@ -2240,7 +2240,7 @@ ec_unlocked(call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
|
|
|
17b94a |
|
|
|
17b94a |
if (op_ret < 0) {
|
|
|
17b94a |
gf_msg(this->name, GF_LOG_WARNING, op_errno, EC_MSG_UNLOCK_FAILED,
|
|
|
17b94a |
- "entry/inode unlocking failed (%s)", ec_fop_name(link->fop->id));
|
|
|
17b94a |
+ "entry/inode unlocking failed :(%s)", ec_msg_str(link->fop));
|
|
|
17b94a |
} else {
|
|
|
17b94a |
ec_trace("UNLOCKED", link->fop, "lock=%p", link->lock);
|
|
|
17b94a |
}
|
|
|
17b94a |
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c
|
|
|
17b94a |
index df00ede..a9c42f1 100644
|
|
|
17b94a |
--- a/xlators/features/locks/src/inodelk.c
|
|
|
17b94a |
+++ b/xlators/features/locks/src/inodelk.c
|
|
|
17b94a |
@@ -502,22 +502,26 @@ static pl_inode_lock_t *
|
|
|
17b94a |
__inode_unlock_lock(xlator_t *this, pl_inode_lock_t *lock, pl_dom_list_t *dom)
|
|
|
17b94a |
{
|
|
|
17b94a |
pl_inode_lock_t *conf = NULL;
|
|
|
17b94a |
+ inode_t *inode = NULL;
|
|
|
17b94a |
+
|
|
|
17b94a |
+ inode = lock->pl_inode->inode;
|
|
|
17b94a |
|
|
|
17b94a |
conf = find_matching_inodelk(lock, dom);
|
|
|
17b94a |
if (!conf) {
|
|
|
17b94a |
gf_log(this->name, GF_LOG_ERROR,
|
|
|
17b94a |
" Matching lock not found for unlock %llu-%llu, by %s "
|
|
|
17b94a |
- "on %p",
|
|
|
17b94a |
+ "on %p for gfid:%s",
|
|
|
17b94a |
(unsigned long long)lock->fl_start,
|
|
|
17b94a |
(unsigned long long)lock->fl_end, lkowner_utoa(&lock->owner),
|
|
|
17b94a |
- lock->client);
|
|
|
17b94a |
+ lock->client, inode ? uuid_utoa(inode->gfid) : "UNKNOWN");
|
|
|
17b94a |
goto out;
|
|
|
17b94a |
}
|
|
|
17b94a |
__delete_inode_lock(conf);
|
|
|
17b94a |
gf_log(this->name, GF_LOG_DEBUG,
|
|
|
17b94a |
- " Matching lock found for unlock %llu-%llu, by %s on %p",
|
|
|
17b94a |
+ " Matching lock found for unlock %llu-%llu, by %s on %p for gfid:%s",
|
|
|
17b94a |
(unsigned long long)lock->fl_start, (unsigned long long)lock->fl_end,
|
|
|
17b94a |
- lkowner_utoa(&lock->owner), lock->client);
|
|
|
17b94a |
+ lkowner_utoa(&lock->owner), lock->client,
|
|
|
17b94a |
+ inode ? uuid_utoa(inode->gfid) : "UNKNOWN");
|
|
|
17b94a |
|
|
|
17b94a |
out:
|
|
|
17b94a |
return conf;
|
|
|
17b94a |
--
|
|
|
17b94a |
1.8.3.1
|
|
|
17b94a |
|