Skip to content

Commit 33643bf

Browse files
akitaSummerWeiZhang555
authored andcommitted
fix: fuse t channel read bug in during multiple reads
Signed-off-by: akitaSummer <[email protected]>
1 parent 8e289bd commit 33643bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transport/fusedev/fuse_t_session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ impl FuseChannel {
260260
}
261261

262262
fn read(&mut self, len: usize, offset: usize) -> Result<()> {
263-
let read_buf = &mut self.buf[offset..offset + len];
264263
let mut total: usize = 0;
265264
let fd = self.file.as_raw_fd();
266265
while total < len {
266+
let read_buf = &mut self.buf[offset + total..offset + len];
267267
match read(fd, read_buf) {
268268
Ok(size) => {
269269
total += size;

0 commit comments

Comments
 (0)