diff --git a/conversions.go b/conversions.go index f1bdbe8..22c0341 100644 --- a/conversions.go +++ b/conversions.go @@ -853,11 +853,11 @@ func (c *Connection) kernelResponseForOp( out := (*fusekernel.OpenOut)(m.Grow(int(unsafe.Sizeof(fusekernel.OpenOut{})))) out.Fh = uint64(o.Handle) - if o.KeepDirectoryContentsPageCache { + if o.CacheDirContentAsPageCache { out.OpenFlags |= uint32(fusekernel.OpenCacheDir) } - if o.KeepDirectoryContentsPageCache { + if o.KeepDirContentPageCache { out.OpenFlags |= uint32(fusekernel.OpenKeepCache) } diff --git a/fuseops/ops.go b/fuseops/ops.go index 11a0820..ba28668 100644 --- a/fuseops/ops.go +++ b/fuseops/ops.go @@ -501,11 +501,13 @@ type OpenDirOp struct { Handle HandleID OpContext OpContext - // Convey the kernel to cache the directory contents in the page cache. - CacheDirContentsAsPageCache bool + // CacheDirContentAsPageCache conveys the kernel to cache the response of next + // ReadDirOp as page cache. Once cached, listing on that directory will be + // served from the kernel until invalidated. + CacheDirContentAsPageCache bool - // Either to keep previous directory contents page cache or not. - KeepDirectoryContentsPageCache bool + // KeepDirContentPageCache used to invalidate the cached directory content. + KeepDirContentPageCache bool } // Read entries from a directory previously opened with OpenDir.