@@ -91,7 +91,7 @@ static IntRange CalBlockIndex(uint64_t block_size, uint64_t chunk_offset, const
9191void CleanDelSliceTask::Run () {
9292 auto status = CleanDelSlice ();
9393 if (!status.ok ()) {
94- DINGO_LOG (ERROR) << fmt::format (" [gc.delslice] clean deleted slice fail, {}" , status.error_str ());
94+ DINGO_LOG (ERROR) << fmt::format (" [gc.delslice.{} ] clean deleted slice fail, {}" , ino_ , status.error_str ());
9595 }
9696
9797 // forget task
@@ -112,7 +112,7 @@ Status CleanDelSliceTask::CleanDelSlice() {
112112 cache::BlockKey block_key (slice.fs_id (), slice.ino (), slice.slice_id (), block_index,
113113 slice_range.compaction_version ());
114114
115- DINGO_LOG (INFO) << fmt::format (" [gc.delslice] delete block key({})." , block_key.StoreKey ());
115+ DINGO_LOG (INFO) << fmt::format (" [gc.delslice.{} ] delete block key({})." , ino_ , block_key.StoreKey ());
116116 keys.push_back (block_key.StoreKey ());
117117 }
118118 }
@@ -140,15 +140,15 @@ Status CleanDelSliceTask::CleanDelSlice() {
140140 return status;
141141 }
142142
143- DINGO_LOG (INFO) << fmt::format (" [gc.delslice] clean slice finish, slice({})." , slice_id_trace);
143+ DINGO_LOG (INFO) << fmt::format (" [gc.delslice.{} ] clean slice finish, slice({})." , ino_ , slice_id_trace);
144144
145145 return Status::OK ();
146146}
147147
148148void CleanDelFileTask::Run () {
149149 auto status = CleanDelFile (attr_);
150150 if (!status.ok ()) {
151- DINGO_LOG (ERROR) << fmt::format (" [gc.delfile] clean delfile fail, status({})." , status.error_str ());
151+ DINGO_LOG (ERROR) << fmt::format (" [gc.delfile.{} ] clean delfile fail, status({})." , attr_. ino () , status.error_str ());
152152 }
153153
154154 // forget task
@@ -176,7 +176,7 @@ static Status GetChunks(OperationProcessorSPtr operation_processor, uint32_t fs_
176176}
177177
178178Status CleanDelFileTask::CleanDelFile (const AttrEntry& attr) {
179- DINGO_LOG (INFO) << fmt::format (" [gc.delfile] clean delfile, ino({}) nlink({}) len({}) version({})." , attr.ino (),
179+ DINGO_LOG (INFO) << fmt::format (" [gc.delfile.{} ] clean delfile, nlink({}) len({}) version({})." , attr.ino (),
180180 attr.nlink (), attr.length (), attr.version ());
181181 // get file chunks
182182 std::vector<ChunkEntry> chunks;
@@ -194,7 +194,7 @@ Status CleanDelFileTask::CleanDelFile(const AttrEntry& attr) {
194194 for (uint32_t block_index = range.start ; block_index < range.end ; ++block_index) {
195195 cache::BlockKey block_key (attr.fs_id (), attr.ino (), slice.id (), block_index, slice.compaction_version ());
196196
197- DINGO_LOG (INFO) << fmt::format (" [gc.delfile] delete block key({})." , block_key.StoreKey ());
197+ DINGO_LOG (INFO) << fmt::format (" [gc.delfile.{} ] delete block key({})." , attr. ino () , block_key.StoreKey ());
198198 keys.push_back (block_key.StoreKey ());
199199 }
200200 }
@@ -216,7 +216,7 @@ Status CleanDelFileTask::CleanDelFile(const AttrEntry& attr) {
216216 return status;
217217 }
218218
219- DINGO_LOG (INFO) << fmt::format (" [gc.delfile] clean file({}/{}) finish." , attr.fs_id (), attr.ino ());
219+ DINGO_LOG (INFO) << fmt::format (" [gc.delfile.{} ] clean file({}/{}) finish." , attr. ino () , attr.fs_id (), attr.ino ());
220220
221221 return Status::OK ();
222222}
@@ -335,7 +335,7 @@ Status GcProcessor::ManualCleanDelSlice(Trace& trace, uint32_t fs_id, Ino ino, u
335335
336336 ScanDelSliceOperation operation (
337337 trace, fs_id, ino, chunk_index, [&](const std::string& key, const std::string& value) -> bool {
338- auto task = CleanDelSliceTask::New (operation_processor_, block_accessor, nullptr , key, value);
338+ auto task = CleanDelSliceTask::New (operation_processor_, block_accessor, nullptr , ino, key, value);
339339 auto status = task->CleanDelSlice ();
340340 if (!status.ok ()) {
341341 LOG (ERROR) << fmt::format (" [gc.delslice] clean delfile fail, status({})." , status.error_str ());
@@ -525,7 +525,7 @@ void GcProcessor::ScanDelSlice(const FsInfoEntry& fs_info) {
525525 }
526526
527527 task_memo_->Remember (key);
528- if (!Execute (ino, CleanDelSliceTask::New (operation_processor_, block_accessor, task_memo_, key, value))) {
528+ if (!Execute (ino, CleanDelSliceTask::New (operation_processor_, block_accessor, task_memo_, ino, key, value))) {
529529 task_memo_->Forget (key);
530530 return false ;
531531 }
0 commit comments