git: sbin/hammer: Properly break from cache flush loop

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Mar 14 12:56:27 PDT 2015


commit d75d1dc9e556527b1784e6addb219fd9f4ff5168
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sun Mar 15 03:55:48 2015 +0900

    sbin/hammer: Properly break from cache flush loop
    
    - hammer_cache_flush() needs to keep track of the first element
      that was pushed back to tail of the list (ref!=0), and break from
      the loop if it hits that element for the second time.
    
    - It's currently working without above check because it breaks from
      the loop after it has accomplished 'target'. If this function was
      changed to release unlimited number of cache then it'll loop
      forever unless tracking those that can't be released (ref!=0).

Summary of changes:
 sbin/hammer/cache.c | 5 +++++
 1 file changed, 5 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d75d1dc9e556527b1784e6addb219fd9f4ff5168


-- 
DragonFly BSD source repository


More information about the Commits mailing list