You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found when running minio with recent versions of nydus that it
was no longer able to boot properly due to Invalid Argument when
writing to a temporary file.
Tracing the high-level flow showed that the file was originally
opened with O_DIRECT, then later on if the buffer size was not
correctly aligned, fcntl with F_SETFL would be used to remove
the O_DIRECT flag.
In virtiofs there is no independant call for fcntl, so the
underlying file descriptor opened by nydus still had the
O_DIRECT flag set. Meaning that during a write to this file
it would error with -EINVAL as the buffer size was not aligned.
This patch aims to fix this by first recording the open flags for
a file in the `HandleData` struct, then on read/write checking
these flags match the flags provided by virtiofs in the read/write
message. If the flags do not match, the current flags of the file
descriptor are set with F_SETFL and updated on the HandleData entry.
Signed-off-by: Champ-Goblem <[email protected]>
0 commit comments