Skip to content

Commit 9a1ae06

Browse files
committed
add error logs
1 parent 1a22d24 commit 9a1ae06

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/cache/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ where
7979
return Ok((meta.len(), file));
8080
}
8181

82-
debug!("downloading block: {}", block.id.as_slice().hex());
82+
debug!("downloading block with key: {}", block.id.as_slice().hex());
8383
let size = self
8484
.download(&mut file, block)
8585
.await

src/fs/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ where
174174
None => {
175175
let (bsize, descriptor) = match self.cache.get(block).await {
176176
Ok(out) => out,
177-
Err(_) => {
177+
Err(err) => {
178+
error!("io cache error: {:#}", err);
178179
return Ok(req.reply_error(libc::EIO)?);
179180
}
180181
};
@@ -191,7 +192,8 @@ where
191192
// read the file bytes into buf
192193
let read = match fd.read(&mut buf[total..]).await {
193194
Ok(n) => n,
194-
Err(_) => {
195+
Err(err) => {
196+
error!("read error: {:#}", err);
195197
return Ok(req.reply_error(libc::EIO)?);
196198
}
197199
};

0 commit comments

Comments
 (0)