Commit cb4ffbc0 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Add new kernel data types for API 20 and 21 (readdirplus, fallocate.)

parent 9334ba57
......@@ -36,6 +36,10 @@ func init() {
CAP_SPLICE_READ: "SPLICE_READ",
CAP_FLOCK_LOCKS: "FLOCK_LOCKS",
CAP_IOCTL_DIR: "IOCTL_DIR",
CAP_AUTO_INVAL_DATA: "AUTO_INVAL_DATA",
CAP_READDIRPLUS: "READDIRPLUS",
CAP_READDIRPLUS_AUTO: "READDIRPLUS_AUTO",
}
releaseFlagNames = map[int]string{
RELEASE_FLUSH: "FLUSH",
......@@ -217,3 +221,8 @@ func (o *NotifyInvalInodeOut) String() string {
func (o *NotifyInvalDeleteOut) String() string {
return fmt.Sprintf("{parent %d ch %d sz %d}", o.Parent, o.Child, o.NameLen)
}
func (f *FallocateIn) String() string {
return fmt.Sprintf("{Fh %d off %d sz %d mod 0%o}",
f.Fh, f.Offset, f.Length, f.Mode)
}
......@@ -116,6 +116,9 @@ const (
CAP_SPLICE_READ = (1 << 9)
CAP_FLOCK_LOCKS = (1 << 10)
CAP_IOCTL_DIR = (1 << 11)
CAP_AUTO_INVAL_DATA = (1 << 12)
CAP_READDIRPLUS = (1 << 13)
CAP_READDIRPLUS_AUTO = (1 << 14)
)
type InitIn struct {
......@@ -377,3 +380,11 @@ const (
WRITE_CACHE = (1 << 0)
WRITE_LOCKOWNER = (1 << 1)
)
type FallocateIn struct {
Fh uint64
Offset uint64
Length uint64
Mode uint32
Padding uint32
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment