On Thursday 04 August 2005 22:02, Jason Clark wrote: > md1 and md2 are both 5 gig.
> md2 will eventually be much smaller. Guess it won't, it must be 5G long. On normal files you can use sparse ones, not on block devices... and if that seems stupid, yeah, COW files were designed for sparse files... dunno whether adding an indirection table for sector (saying "sector no. A is at location B in the file") would hurt performance. > Changing lseek to lseek64 in cow_sys.h results in the same error. > [EMAIL PROTECTED]:~# uml_mkcow -f /dev/md1 /dev/md2 > cow bitmap lseek failed : errno = 22 > write_cow_header: Invalid argument > > Here is the results of the same command after adding the printf to cow.c > > [EMAIL PROTECTED]:~/tools# uml_mkcow -f /dev/md1 /dev/md2 > cow bitmap lseek failed : errno = 22 > bitmap_offset_out -1080912056, data_offset_out -1080912064 Ok, bitmap_offset_out is set with this just a bit above: *bitmap_offset_out = ROUND_UP(sizeof(struct cow_header_v3), alignment); and alignment is the result of sysconf(_SC_PAGESIZE), i.e. should be 4096. So there's definitely something bitrotting there... Jason, I'm really busy, so do you think you can work on that? There must be some overflow somewhere with sign calculation (we are using unsigned long's somewhere, even if the value shouldn't overflow anyway). lseek arguments are signed int/long's (because you can seek from the end)... > write_cow_header: Invalid argument > For what it is worth, I have been using umls with block devices (md's and > LVMs included) for some time, I just can't seem to get the cow stuff > working. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.beta.messenger.yahoo.com ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user