masaori335 commented on code in PR #11945:
URL: https://github.com/apache/trafficserver/pull/11945#discussion_r2149014582


##########
src/iocore/cache/CacheDir.cc:
##########
@@ -217,41 +217,41 @@ dir_bucket_loop_check(Dir *start_dir, Dir *seg)
 // adds all the directory entries
 // in a segment to the segment freelist
 void
-dir_init_segment(int s, Stripe *stripe)
+dir_init_segment(int s, Directory *directory)
 {
-  stripe->directory.header->freelist[s] = 0;
-  Dir *seg                              = stripe->directory.get_segment(s);
+  directory->header->freelist[s] = 0;
+  Dir *seg                       = directory->get_segment(s);
   int  l, b;
-  memset(static_cast<void *>(seg), 0, SIZEOF_DIR * DIR_DEPTH * 
stripe->directory.buckets);
+  memset(static_cast<void *>(seg), 0, SIZEOF_DIR * DIR_DEPTH * 
directory->buckets);
   for (l = 1; l < DIR_DEPTH; l++) {
-    for (b = 0; b < stripe->directory.buckets; b++) {
+    for (b = 0; b < directory->buckets; b++) {
       Dir *bucket = dir_bucket(b, seg);
-      dir_free_entry(dir_bucket_row(bucket, l), s, stripe);
+      directory->free_entry(dir_bucket_row(bucket, l), s);
     }
   }
 }
 
 // break the infinite loop in directory entries
 // Note : abuse of the token bit in dir entries
 int
-dir_bucket_loop_fix(Dir *start_dir, int s, Stripe *stripe)
+dir_bucket_loop_fix(Dir *start_dir, int s, Directory *directory)

Review Comment:
   Can we make this function a member of `Directory` too?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to