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

    https://github.com/apache/trafficserver/pull/1028#discussion_r79424573
  
    --- Diff: iocore/cache/Cache.cc ---
    @@ -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 --
    
    Why do yo introduce a new flag rather than making the code conditional on 
the ``DISK_BAD`` check? e.g.
    ```C
    if (!DISK_BAD(d)) {
      SET_DISK_BAD(d);
    
      // Do all the other stuff ...
    }
    ```


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

Reply via email to