Lines Matching defs:gc
65 * chfs_gc_trigger - wakes up GC thread, if it should run
71 struct garbage_collector_thread *gc = &chmp->chm_gc_thread;
73 if (gc->gcth_running &&
75 cv_signal(&gc->gcth_wakeup);
85 struct garbage_collector_thread *gc = &chmp->chm_gc_thread;
87 dbg_gc("[GC THREAD] thread started\n");
90 while (gc->gcth_running) {
107 cv_timedwait_sig(&gc->gcth_wakeup,
112 dbg_gc("[GC THREAD] thread stopped\n");
116 /* chfs_gc_thread_start - starts GC */
120 struct garbage_collector_thread *gc = &chmp->chm_gc_thread;
122 cv_init(&gc->gcth_wakeup, "chfsgccv");
124 gc->gcth_running = true;
126 NULL, chfs_gc_thread, chmp, &gc->gcth_thread,
130 /* chfs_gc_thread_stop - stops GC */
134 struct garbage_collector_thread *gc = &chmp->chm_gc_thread;
137 if (gc->gcth_running) {
138 gc->gcth_running = false;
142 cv_signal(&gc->gcth_wakeup);
143 dbg_gc("[GC THREAD] stop signal sent\n");
145 kthread_join(gc->gcth_thread);
150 cv_destroy(&gc->gcth_wakeup);
154 * chfs_gc_thread_should_wake - checks if GC thread should wake up
156 * Returns 1, if GC should wake up and 0 else.
203 /* Everything is OK, GC shouldn't run. */
215 /* chfs_gc_fetch_inode - assign the given inode to the GC */
344 /* find_gc_block - finds the next block for GC */
359 dbg_gc("Picking block from erase_pending_queue to GC next\n");
362 dbg_gc("Picking block from very_dirty_queue to GC next\n");
365 dbg_gc("Picking block from dirty_queue to GC next\n");
368 dbg_gc("Picking block from clean_queue to GC next\n");
371 dbg_gc("Picking block from dirty_queue to GC next"
375 dbg_gc("Picking block from very_dirty_queue to GC next"
379 dbg_gc("Picking block from erase_pending_queue to GC next"
391 " blocks to GC from! Where are they all?\n");
405 /* Set GC block. */
407 /* Set GC node. */
419 /* chfs_gcollect_pass - this is the main function of GC */
487 dbg_gc("VNO_STATE GC or CHECKING\n");
488 panic("CHFS BUG - vc state gc or checking\n");
522 /* Get GC block. */
544 /* Get GC node. */
606 " checking or gc (vno #%llu, num #%d)\n",
677 /* Check the state of GC block. */
680 dbg_gc("Block at leb #%u completely obsoleted by GC, "
861 dbg_gc("GC block is no longer gcblock. Restart.\n");
866 dbg_gc("node to be GC'd was obsoleted in the meantime.\n");
944 * with GC's space allocation */