Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev



Module Name:    src
Committed By:   cegger
Date:           Sat Jun 14 11:44:57 UTC 2008

Modified Files:
        src/sys/dev: vnd.c

Log Message:
Checking if the underlying file system supports VOP_BMAP and VOP_STRATEGY does 
not imply that works.
Test if VOP_BMAP actually works before using bmap/strategy.

When you create an image with

dd if=/dev/zero of=./netbsd.img bs=1m count=1 seek=1000

then the current check actually determines the "file system"
in the image supports VOP_BMAP and VOP_STRATEGY, but VOP_BMAP can't
translate any logical block numbers which results in EIO failures.

When you try to access the image in a Xen DomU you see all disk operations
failing. Therefore test if VOP_BMAP actually works and fall back to
VOP_READ/VOP_WRITE if it doesn't.

This makes a Xen DomU installation working. When you boot your fresh
installed Xen DomU with a valid disklabel and file system in the image,
VOP_BMAP actually works and is used.

This allows you to create an image with dd as above on the Dom0 and
run a DomU installation or to quickly create another virtual disk for
an existing DomU without having to create a disklabel and file system
by hand.


To generate a diff of this commit:
cvs rdiff -r1.183 -r1.184 src/sys/dev/vnd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index