diff options
author | Ashish Pandey <aspandey@redhat.com> | 2017-01-19 18:20:44 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-02-07 08:29:49 -0500 |
commit | 66cc803f1134016a34e3b8d9f55254029877df53 (patch) | |
tree | 2fde5c15c7f46b1b4eda6184f6413c3f71311f41 /xlators/cluster | |
parent | 2e176d46b574af2672688410393ba20a9ad72acf (diff) |
cluster/disperse: Do not log fop failed for lockless fops
Problem: Operation failed messages are getting logged
based on the callbacks of lockless fop's. If a fop does
not take a lock, it is possible that it will get some
out of sync xattr, iatts. We can not depend on these
callback to psay that the fop has failed.
Solution: Print failed messages only for locked fops.
However, heal would still be triggered.
> Change-Id: I4427402c8c944c23f16073613caa03ea788bead3
> BUG: 1414287
> Signed-off-by: Ashish Pandey <aspandey@redhat.com>
> Reviewed-on: http://review.gluster.org/16435
> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Change-Id: I8728109d5cd93c315a5ada0a50b1f0f158493309
BUG: 1419824
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Reviewed-on: https://review.gluster.org/16550
Tested-by: Xavier Hernandez <xhernandez@datalab.es>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/ec/src/ec-common.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index 3a17b749fcc..5e1efe381d4 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -108,18 +108,19 @@ void ec_check_status(ec_fop_data_t * fop) } } - gf_msg (fop->xl->name, GF_LOG_WARNING, 0, - EC_MSG_OP_FAIL_ON_SUBVOLS, - "Operation failed on %d of %d subvolumes.(up=%s, mask=%s, " - "remaining=%s, good=%s, bad=%s)", - gf_bits_count(ec->xl_up & ~(fop->remaining | fop->good)), ec->nodes, - ec_bin(str1, sizeof(str1), ec->xl_up, ec->nodes), - ec_bin(str2, sizeof(str2), fop->mask, ec->nodes), - ec_bin(str3, sizeof(str3), fop->remaining, ec->nodes), - ec_bin(str4, sizeof(str4), fop->good, ec->nodes), - ec_bin(str5, sizeof(str5), - ec->xl_up & ~(fop->remaining | fop->good), ec->nodes)); - + if (fop->lock_count > 0) { + gf_msg (fop->xl->name, GF_LOG_WARNING, 0, + EC_MSG_OP_FAIL_ON_SUBVOLS, + "Operation failed on %d of %d subvolumes.(up=%s, mask=%s, " + "remaining=%s, good=%s, bad=%s)", + gf_bits_count(ec->xl_up & ~(fop->remaining | fop->good)), ec->nodes, + ec_bin(str1, sizeof(str1), ec->xl_up, ec->nodes), + ec_bin(str2, sizeof(str2), fop->mask, ec->nodes), + ec_bin(str3, sizeof(str3), fop->remaining, ec->nodes), + ec_bin(str4, sizeof(str4), fop->good, ec->nodes), + ec_bin(str5, sizeof(str5), + ec->xl_up & ~(fop->remaining | fop->good), ec->nodes)); + } if (fop->use_fd) { if (fop->fd != NULL) { |