Document RWF_HIPRI not implemented for preadv2/pwritev2.
Document limitation of no reasonable implementation for RWF_HIPRI flag (High Priority Read/Write for block-based file systems). PiperOrigin-RevId: 264237589
This commit is contained in:
parent
3ffbdffd7e
commit
67d7864f83
|
@ -178,6 +178,8 @@ const (
|
|||
|
||||
// Values for preadv2/pwritev2.
|
||||
const (
|
||||
// Note: gVisor does not implement the RWF_HIPRI feature, but the flag is
|
||||
// accepted as a valid flag argument for preadv2/pwritev2.
|
||||
RWF_HIPRI = 0x00000001
|
||||
RWF_DSYNC = 0x00000002
|
||||
RWF_SYNC = 0x00000004
|
||||
|
|
|
@ -191,7 +191,6 @@ func Preadv(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal
|
|||
}
|
||||
|
||||
// Preadv2 implements linux syscall preadv2(2).
|
||||
// TODO(b/120162627): Implement RWF_HIPRI functionality.
|
||||
func Preadv2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) {
|
||||
// While the syscall is
|
||||
// preadv2(int fd, struct iovec* iov, int iov_cnt, off_t offset, int flags)
|
||||
|
@ -228,6 +227,8 @@ func Preadv2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysca
|
|||
}
|
||||
|
||||
// Check flags field.
|
||||
// Note: gVisor does not implement the RWF_HIPRI feature, but the flag is
|
||||
// accepted as a valid flag argument for preadv2.
|
||||
if flags&^linux.RWF_VALID != 0 {
|
||||
return 0, nil, syserror.EOPNOTSUPP
|
||||
}
|
||||
|
|
|
@ -191,7 +191,6 @@ func Pwritev(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysca
|
|||
}
|
||||
|
||||
// Pwritev2 implements linux syscall pwritev2(2).
|
||||
// TODO(b/120162627): Implement RWF_HIPRI functionality.
|
||||
// TODO(b/120161091): Implement O_SYNC and D_SYNC functionality.
|
||||
func Pwritev2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) {
|
||||
// While the syscall is
|
||||
|
@ -227,6 +226,8 @@ func Pwritev2(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysc
|
|||
return 0, nil, syserror.ESPIPE
|
||||
}
|
||||
|
||||
// Note: gVisor does not implement the RWF_HIPRI feature, but the flag is
|
||||
// accepted as a valid flag argument for pwritev2.
|
||||
if flags&^linux.RWF_VALID != 0 {
|
||||
return uintptr(flags), nil, syserror.EOPNOTSUPP
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue