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