Opened 15 years ago
Closed 15 years ago
#3682 closed defect (fixed)
opensolaris guest using shared folders writes null padded file.
Reported by: | Rand S. Huntzinger | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 2.2.0 |
Keywords: | Cc: | RANDY@… | |
Guest type: | other | Host type: | Solaris |
Description
First - thanks for adding shared folders for Solaris clients. Unfortunately, I seem to have found a problem on it. First - the setup.
Host: Dell 1850 running SXCE build 111. The system stores all files on ZFS (including shared ones) Guest: OpenSolaris (Indiana) - also build 111. VirtualBox 2.2.0 (installed yesterday)
I have a shared folder mounted on the client and here's what happens when I attempt to write.
randy@indy:/vbox/Shared$ > written_by_guest randy@indy:/vbox/Shared$ ls -l total 3404056 -rw------- 1 randy sysadmin 56776 2009-04-09 14:00 VBox.log -rw-r--r-- 1 randy sysadmin 3485696384 2009-04-09 14:05 written_by_guest randy@indy:/vbox/Shared$ ls -ls total 3404056
56 -rw------- 1 randy sysadmin 56776 2009-04-09 14:00 VBox.log
3404001 -rw-r--r-- 1 randy sysadmin 3485696384 2009-04-09 14:05 written_by_guest randy@indy:/vbox/Shared$
As you can see, it appears to have written a very large null filled file when it should have written a zero length file. When viewed from the underlying host, it appears that the file is long but empty (just one big hole). Unfortunately, from within the guest the hole is read as a string of nulls (which takes a long time).
hobbit$ ls -ls total 113
112 -rw------- 1 randy sysadmin 56776 Apr 9 14:00 VBox.log
1 -rw-r--r-- 1 randy sysadmin 3485696384 Apr 9 14:05 written_by_guest
hobbit$
If we write text into the file, it appears to be padded with nulls at the end.
randy@indy:/vbox/Shared$ echo hi > test2 randy@indy:/vbox/Shared$ ls -l test2 -rw-r--r-- 1 randy sysadmin 3485688192 2009-04-09 14:10 test2 randy@indy:/vbox/Shared$ od -c test2 0000000 h i \n \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 0000020 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 * C randy@indy:/vbox/Shared$
This seems to only occur when the file is written from an OpenSolaris guest. The same operation from a Solaris 10 guest seems to work properly. Must be a SunOS 5.11 thing.
VirtualBox 2.2.2 seems to have addressed this.