mirror of https://github.com/perkeep/perkeep.git
fuse: maybe handle opFsyncdir.
Change-Id: I899a2bd07aa60be38e10f062f3607fa9c07ac3c9
This commit is contained in:
parent
312a40b09a
commit
40b70311d2
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue