Bug 170860
Summary: | Write errors when inherit_directio flag is set | ||
---|---|---|---|
Product: | [Retired] Red Hat Cluster Suite | Reporter: | Henry Harris <henry.harris> |
Component: | gfs | Assignee: | Wendy Cheng <nobody+wcheng> |
Status: | CLOSED NOTABUG | QA Contact: | GFS Bugs <gfs-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-10-15 04:12:24 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Henry Harris
2005-10-14 19:44:49 UTC
interesting. seems it's a problem whenever buffered->dio or dio -> buffered echo hi > test # produces 0 file Although this is still a bug, we have learned that we should be using jdata instead of directio for what we want, so this is not effecting us currently. With O_DIRECT, the buffer (memory) being read from or written to must be 512-byte aligned. It is more of a programming interface and I don't think commands such as "cp" is prepared to handle issues like this. I'm checking into how "cp" is implemented. From coreutils-5.2.1, "cp" does the regular file read/write as: buf = alloca (buf_size + sizeof (int)); n_read = read (source_desc, buf, buf_size); full_write (dest_desc, buf, n) ... The "buf" is not necessarily 512-byte aligned. As the result, the kernel __blockdev_direct_IO() call will return -EINVAL if alignment checking fails. I *don't* consider this is a bug but a restriction (or more specifically, a mis-understanding) of the inherit_directio flag. On the other hand, we can certainly put some words into documentation about this if requested. Again, Direct IO is a programming interface - mixing its usage with other Linux commands and utilities are not recommended. |