fuse: maybe handle opFsyncdir.

Change-Id: I899a2bd07aa60be38e10f062f3607fa9c07ac3c9
This commit is contained in:
Brad Fitzpatrick 2013-07-20 22:40:19 -07:00
parent 312a40b09a
commit 40b70311d2
1 changed files with 21 additions and 6 deletions

View File

@ -674,7 +674,21 @@ func (c *Conn) ReadRequest() (Request, error) {
}
case opFsyncdir:
panic("opFsyncdir")
// TODO(bradfitz): not really tested. I see this rarely on OS X,
// generally when a Finder window is open showing a directory
// and then the filesystem is unmounted. But I should write proper
// tests for it before I remove this comment.
in := (*fsyncIn)(m.data())
if m.len() < unsafe.Sizeof(*in) {
goto corrupt
}
req = &FsyncRequest{
Dir: true,
Header: m.Header(),
Handle: HandleID(in.Fh),
Flags: in.FsyncFlags,
}
case opGetlk:
panic("opGetlk")
case opSetlk:
@ -1611,6 +1625,7 @@ type FsyncRequest struct {
Header
Handle HandleID
Flags uint32
Dir bool // if opFsyncDir
}
func (r *FsyncRequest) String() string {