﻿id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host
11115,Shared Folders under Windows does not accept writes of more than 16MiB length,stresstester,,"
When performing a write to a file managed by VirtualBox Shared Folders and the write's length is greater than 16777216 bytes, then this file write fails, while it should succeed.


== How to reproduce ==

1. Use Windows 7 64-bit as guest. Use Linux 64-bit as host. (Probably the problem happens for other Windows versions as guest and for any host.)
2. Install Ruby (e.g. from http://rubyforge.org/frs/download.php/76527/rubyinstaller-1.9.3-p286.exe)
3. Map a writable share to a driver letter.
4. Open a ""cmd"" console and cd into a directory in this drive.
5. Run this ruby script (e.g. called ""test_virtualbox_shared_folders_write_size.rb""):
{{{
#!/usr/bin/ruby

[16*1024*1024,16*1024*1024+1].each do |size|
	filename	= ""test#{size}""
	content		= ""S""*size
	puts ""Writing #{size} bytes to file #{filename}...""
	File.binwrite(filename,content)
	puts ""Done.""
end

}}}

== Expected result ==

This output should appear:


{{{
>ruby test_virtualbox_shared_folders_write_size.rb
Writing 16777216 bytes to file test16777216...
Done.
Writing 16777217 bytes to file test16777217...
Done.
}}}


== Actual result ==

This output actually does appear:

{{{
>ruby test_virtualbox_shared_folders_write_size.rb
Writing 16777216 bytes to file test16777216...
Done.
Writing 16777217 bytes to file test16777217...
test_virtualbox_shared_folders_write_size.rb:7:in `binwrite': Invalid argument - test16777217 (Errno::EINVAL)
        from test_virtualbox_shared_folders_write_size.rb:7:in `block in <main>'
        from test_virtualbox_shared_folders_write_size.rb:3:in `each'
        from test_virtualbox_shared_folders_write_size.rb:3:in `<main>'
}}}

== Additional observations ==

Note that this problem is not limited to Ruby. Visual Studio 2010 suffers the same problem when writing large files. The error message is different, though, and looks like:


{{{
error C1085: Cannot write precompiled header file: 'FooBar.pch': The parameter is incorrect.
}}}
",defect,closed,shared folders,VirtualBox 4.2.2,fixed,,,Windows,other
