I ran strace while running the test and I see few times:
open("/srv/kvm/iso/ubuntu-12.04-server-amd64.iso", O_RDONLY|O_NONBLOCK) = 12 fstat(12, {st_mode=S_IFREG|0666, st_size=717533184, ...}) = 0 close(12)
But the final open looks like this:
open("/srv/kvm/iso/ubuntu-12.04-server-amd64.iso", O_RDWR|O_DSYNC|O_CLOEXEC) = -1 EROFS (Read-only file system)
For some reason, the O_RDRW flag was requested.
I ran strace while running the test and I see few times:
open("/ srv/kvm/ iso/ubuntu- 12.04-server- amd64.iso" , O_RDONLY| O_NONBLOCK) = 12 S_IFREG| 0666, st_size=717533184, ...}) = 0
fstat(12, {st_mode=
close(12)
But the final open looks like this:
open("/ srv/kvm/ iso/ubuntu- 12.04-server- amd64.iso" , O_RDWR| O_DSYNC| O_CLOEXEC) = -1 EROFS (Read-only file system)
For some reason, the O_RDRW flag was requested.