Github user jpeach commented on a diff in the pull request:
    --- Diff: iocore/cache/ ---
    @@ -2000,6 +2000,12 @@ CacheProcessor::mark_storage_offline(CacheDisk *d 
///< Target disk
       uint64_t total_dir_delete   = 0;
       uint64_t used_dir_delete    = 0;
    +  /* Don't mark it again, it will invalidate the stats! */
    +  if (d->offline) {
    +    return this->has_online_storage();
    +  }
    +  d->offline = true;
    --- End diff --
    @gtenev and I discussed this. The problem is that in the common case, the 
disk is already bad when ``mark_storage_offline`` is called, so we can't depend 
on the good->bad state transition to know when to update the accounting.
    @gtenev This looks fine to me, but I'd suggest calling the flag ``online`` 
so that we avoid the double negatives.

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 or file a JIRA ticket
with INFRA.

Reply via email to