From: Greg L. <gl...@ri...> - 2001-05-04 23:14:42
|
> > A few weeks ago, Greg Lonnon was mumbling about this. He described what he > was thinking, I described what I wanted, and he made noises like he had > working code... > > So, bug Greg and see what he's got :-) > > Jeff > Here's what I have... A half baked ubd copy on write driver that doesn't work... It reads the first 77 blocks of the file system then hangs. It's really weird hang. I started to compare the blocks read by the ubd driver and the ubd_cow driver and they are exactly the same blocks. In fact, I read them both at the same time and compare them and the kernel just hangs... The design and implementation is simple. cow_do_io() and cow_open_ubd_fs() are the only two entry points. cow_open_ubd_fs() opens up both the backing file and the cow file. The cow file has a header at the start of file. It has the path to the backing file, and the last modify date of the backing file. Then, it contains a bitmap of the backing file. If bit X is set, then block X is a cow block and should be read from the cow file. Otherwise, read from the backing file. All writes should set the bit X and written to the cow file at block X position. Pretty simple... I have included the source code. There's a lot of issues/debug still left to figure out: * command line (need to have the backing file and the cow file) * tool to merge cow file into a backing file. * correctly opening an existing cow file. * many more issues.... * the code is littered with debug code. Greg btw: Jeff thanks for writing the documentation on how UML works!!! Someday I might understand how this thing works... :) |