switch -D is not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bonnie++ (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
-D (O_DIRECT) is not working. (without -D everything runs fine)
/usr/sbin/bonnie++ -n 1024 -D >> ~/squeeze-
Writing a byte at a time...Can't write() - disk full?
echo $?
1
I think its an issue with O_DIRECT.
man 2 open (notes section):
--- snip ---
O_DIRECT
The O_DIRECT flag may impose alignment restrictions on the length and
and address of userspace buffers and the file offset of I/Os. Linux
alignment restrictions vary by file system and kernel version and might
be absent entirely. However there is currently no file
system-independent interface for an application to discover these
restrictions for a given file or file system. [...]
Under Linux 2.6, alignment to 512-byte boundaries suffices.
--- snip ---
I think its located at bon_io.cpp line 227 where you try to write 1
byte:
if(write(m_fd, &c, 1) != 1)
I think it is sufficient if both *buf and count are 512 byte.
lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04
apt-cache policy bonnie++
bonnie++:
Installed: 1.97.1
Candidate: 1.97.1
cheers
-arsen
Status changed to 'Confirmed' because the bug affects multiple users.