ReadFileOp

geesefs-0-30-9
Aaron Jacobs 2015-07-24 08:10:45 +10:00
parent 7133c835aa
commit fc142cb274
1 changed files with 15 additions and 0 deletions

View File

@ -249,6 +249,21 @@ func Convert(
co = &to.commonOp
}
case fusekernel.OpRead:
in := (*fusekernel.ReadIn)(m.Data())
if m.Len() < fusekernel.ReadInSize(protocol) {
goto corrupt
}
to := &ReadFileOp{
Inode: InodeID(m.Header().Node),
Handle: HandleID(in.Fh),
Offset: int64(in.Offset),
Size: int(in.Size),
}
io = to
co = &to.commonOp
case *fuseshim.ReadRequest:
if typed.Dir {
to := &ReadDirOp{