You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by SolidWallOfCode <gi...@git.apache.org> on 2016/10/28 19:54:52 UTC

[GitHub] trafficserver pull request #996: TS-4834 Expose bad disk and disk access fai...

Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/996#discussion_r85598778
  
    --- Diff: iocore/cache/CacheDisk.cc ---
    @@ -23,6 +23,35 @@
     
     #include "P_Cache.h"
     
    +void
    +CacheDisk::incrErrors(const AIOCallback *io)
    +{
    +  if (0 == this->num_errors) {
    +    /* This it the first read/write error on this span since ATS started.
    +     * Move the newly failing span from "online" to "failing" bucket. */
    +    RecIncrGlobalRawStat(cache_rsb, (int)(cache_span_online_stat), -1);
    +    RecIncrGlobalRawStat(cache_rsb, (int)(cache_span_failing_stat), 1);
    +  }
    +  this->num_errors++;
    +
    +  int opcode   = io->aiocb.aio_lio_opcode;
    +  char *opname = (char *)"unknown";
    --- End diff --
    
    Why not declare this as `const char*` instead of casting?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---