@@ -6,7 +6,7 @@ use std::{
6
6
rc:: Rc ,
7
7
} ;
8
8
9
- use log:: debug ;
9
+ use log:: trace ;
10
10
use xxhash_rust:: xxh32:: xxh32;
11
11
use zerocopy:: { Immutable , IntoBytes } ;
12
12
@@ -130,18 +130,18 @@ impl InodeXAttrs {
130
130
131
131
fn write ( & self , output : & mut impl Output ) {
132
132
if self . filter != 0 {
133
- debug ! ( " write xattrs block" ) ;
133
+ trace ! ( " write xattrs block" ) ;
134
134
output. write_struct ( format:: InodeXAttrHeader {
135
135
name_filter : ( !self . filter ) . into ( ) ,
136
136
shared_count : self . shared . len ( ) as u8 ,
137
137
..Default :: default ( )
138
138
} ) ;
139
139
for idx in & self . shared {
140
- debug ! ( " shared {} @{}" , idx, output. len( ) ) ;
140
+ trace ! ( " shared {} @{}" , idx, output. len( ) ) ;
141
141
output. write ( & output. get_xattr ( * idx) . to_le_bytes ( ) ) ;
142
142
}
143
143
for attr in & self . local {
144
- debug ! ( " local @{}" , output. len( ) ) ;
144
+ trace ! ( " local @{}" , output. len( ) ) ;
145
145
attr. write ( output) ;
146
146
}
147
147
}
@@ -157,15 +157,15 @@ impl<'a> Directory<'a> {
157
157
let mut n_bytes = 0 ;
158
158
let mut nlink = 0 ;
159
159
160
- debug ! ( "Directory with {} items" , entries. len( ) ) ;
160
+ trace ! ( "Directory with {} items" , entries. len( ) ) ;
161
161
162
162
// The content of the directory is fixed at this point so we may as well split it into
163
163
// blocks. This lets us avoid measuring and re-measuring.
164
164
for entry in entries. into_iter ( ) {
165
165
let entry_size = size_of :: < format:: DirectoryEntryHeader > ( ) + entry. name . len ( ) ;
166
166
assert ! ( entry_size <= 4096 ) ;
167
167
168
- debug ! ( " {:?}" , entry. file_type) ;
168
+ trace ! ( " {:?}" , entry. file_type) ;
169
169
170
170
if matches ! ( entry. file_type, format:: FileType :: Directory ) {
171
171
nlink += 1 ;
@@ -176,7 +176,7 @@ impl<'a> Directory<'a> {
176
176
rest. push ( entry) ;
177
177
} else {
178
178
// It won't fit, so we need to store the existing entries in a block.
179
- debug ! ( " block {}" , rest. len( ) ) ;
179
+ trace ! ( " block {}" , rest. len( ) ) ;
180
180
blocks. push ( rest. into_boxed_slice ( ) ) ;
181
181
182
182
// Start over
@@ -192,7 +192,7 @@ impl<'a> Directory<'a> {
192
192
n_bytes = 0 ;
193
193
}
194
194
195
- debug ! (
195
+ trace ! (
196
196
" blocks {} inline {} inline_size {n_bytes}" ,
197
197
blocks. len( ) ,
198
198
rest. len( )
@@ -208,11 +208,11 @@ impl<'a> Directory<'a> {
208
208
}
209
209
210
210
fn write_block ( & self , output : & mut impl Output , block : & [ DirEnt ] ) {
211
- debug ! ( " write dir block {} @{}" , block. len( ) , output. len( ) ) ;
211
+ trace ! ( " write dir block {} @{}" , block. len( ) , output. len( ) ) ;
212
212
let mut nameofs = size_of :: < format:: DirectoryEntryHeader > ( ) * block. len ( ) ;
213
213
214
214
for entry in block {
215
- debug ! (
215
+ trace ! (
216
216
" entry {:?} name {} @{}" ,
217
217
entry. file_type,
218
218
nameofs,
@@ -228,13 +228,13 @@ impl<'a> Directory<'a> {
228
228
}
229
229
230
230
for entry in block {
231
- debug ! ( " name @{}" , output. len( ) ) ;
231
+ trace ! ( " name @{}" , output. len( ) ) ;
232
232
output. write ( entry. name . as_bytes ( ) ) ;
233
233
}
234
234
}
235
235
236
236
fn write_inline ( & self , output : & mut impl Output ) {
237
- debug ! (
237
+ trace ! (
238
238
" write inline len {} expected size {} of {}" ,
239
239
self . inline. len( ) ,
240
240
self . size % 4096 ,
@@ -338,15 +338,15 @@ impl<ObjectID: FsVerityHashValue> Inode<'_, ObjectID> {
338
338
// The easiest thing to do is to add padding so that the inline data starts close
339
339
// to the start of a fresh block boundary, while ensuring inode alignment.
340
340
let pad = vec ! [ 0 ; 4096 - end_of_metadata % 4096 ] ;
341
- debug ! ( "added pad {}" , pad. len( ) ) ;
341
+ trace ! ( "added pad {}" , pad. len( ) ) ;
342
342
output. write ( & pad) ;
343
343
output. pad ( 32 ) ;
344
344
}
345
345
}
346
346
347
347
let format = format:: InodeLayout :: Extended | layout;
348
348
349
- debug ! (
349
+ trace ! (
350
350
"write inode {idx} nid {} {:?} {:?} xattrsize{xattr_size} icount{} inline{} @{}" ,
351
351
output. len( ) / 32 ,
352
352
format,
@@ -662,7 +662,7 @@ impl Output for FirstPass {
662
662
}
663
663
assert_eq ! ( self . layout. offset_types. len( ) , offset_type as usize + 1 ) ;
664
664
665
- debug ! (
665
+ trace ! (
666
666
"{:?} #{} @{}" ,
667
667
offset_type,
668
668
self . layout. offsets. len( ) - self . layout. offset_types[ offset_type as usize ] ,
0 commit comments