[Bug 1183699] Re: switch -D is not working
Radu Cristescu
1183699 at bugs.launchpad.net
Wed Jun 3 19:22:17 UTC 2015
By that description, '-f' (without a size value) should be enforced with
'-D'. I.e. the char test makes no sense in O_DIRECT mode and should be
skipped.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bonnie++ in Ubuntu.
https://bugs.launchpad.net/bugs/1183699
Title:
switch -D is not working
Status in bonnie++ package in Ubuntu:
Confirmed
Bug description:
-D (O_DIRECT) is not working. (without -D everything runs fine)
/usr/sbin/bonnie++ -n 1024 -D >> ~/squeeze-mpath-ext4d.csv
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bonnie++/+bug/1183699/+subscriptions
More information about the foundations-bugs
mailing list