tech-kern archive

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

Re: I think I've found why Xen domUs can't mount some file-backed disk images! (vnd(4) hides labels!)



woods%planix.ca@localhost ("Greg A. Woods") writes:

> 		} else if (vnd->sc_size >= (32 * 64)) {
> 			/*
>-			 * Size must be at least 2048 DEV_BSIZE blocks
>-			 * (1M) in order to use this geometry.
>+			 * The file's size must be at least 2048 DEV_BSIZE
>+			 * blocks (1M) in order to use this (fake) geometry.
>+			 *
>+			 * XXX why ever use this arbitrary fake setup instead of the next????

A cylinder size of 1 (sector) results in large cylinder numbers that
may exceed some limit or make things inefficient.


>+		/*
>+		 * n.b.:  this will round the disk's size up to an even cylinder
>+		 * amount, but (if it is writeable) writing into the partly
>+		 * empty cylinder, i.e. past current end of the file, will
>+		 * simply extend the file....
>+		 */

The side effect of resizing the image might a) fail, b) be unexpected.

If you really want to write that sector, then size the image accordingly.



Home | Main Index | Thread Index | Old Index