ReadDirOp
parent
fc142cb274
commit
90aee4644b
|
@ -264,28 +264,20 @@ func Convert(
|
||||||
io = to
|
io = to
|
||||||
co = &to.commonOp
|
co = &to.commonOp
|
||||||
|
|
||||||
case *fuseshim.ReadRequest:
|
case fusekernel.OpReaddir:
|
||||||
if typed.Dir {
|
in := (*fusekernel.ReadIn)(m.Data())
|
||||||
|
if m.Len() < fusekernel.ReadInSize(protocol) {
|
||||||
|
goto corrupt
|
||||||
|
}
|
||||||
|
|
||||||
to := &ReadDirOp{
|
to := &ReadDirOp{
|
||||||
bfReq: typed,
|
Inode: InodeID(m.Header().Node),
|
||||||
Inode: InodeID(typed.Header.Node),
|
Handle: HandleID(in.Fh),
|
||||||
Handle: HandleID(typed.Handle),
|
Offset: int64(in.Offset),
|
||||||
Offset: DirOffset(typed.Offset),
|
Size: int(in.Size),
|
||||||
Size: typed.Size,
|
|
||||||
}
|
}
|
||||||
io = to
|
io = to
|
||||||
co = &to.commonOp
|
co = &to.commonOp
|
||||||
} else {
|
|
||||||
to := &ReadFileOp{
|
|
||||||
bfReq: typed,
|
|
||||||
Inode: InodeID(typed.Header.Node),
|
|
||||||
Handle: HandleID(typed.Handle),
|
|
||||||
Offset: typed.Offset,
|
|
||||||
Size: typed.Size,
|
|
||||||
}
|
|
||||||
io = to
|
|
||||||
co = &to.commonOp
|
|
||||||
}
|
|
||||||
|
|
||||||
case *fuseshim.ReleaseRequest:
|
case *fuseshim.ReleaseRequest:
|
||||||
if typed.Dir {
|
if typed.Dir {
|
||||||
|
|
Loading…
Reference in New Issue