o Removed the error reporting function from the target constructor function
arguments. Errors are now reported by setting a pointer in the table to
point to an error message.
o Changed dm_create() to return a struct mapped_device rather than an int
o Changed dm_remove() to accept a struct mapped_device argument rather than
a name
o We no longer have to look up devices by name, the dcache handles that
nicely for us
o Fixed a bug where we were freeing a structure before we'd finished with
it.
o The name field in struct mapped_device is now only used in a very few
places in dm.c and will be replaced in future with a back reference to
the dentry rather than keeping the name in two places.
o New file dmfs-super.c
o dmfs-dir.c becomes dmfs-lv.c
o dmfs-file.c becomes dmfs-table.c
o A few tweeks and updates
The main reason for the slow progress on these files (which are not yet used
by the device mapper) is that we are working out what this interface should
look like as we go along.
Once this has evolved a bit further and in a state where it can be used we'll
announce it on the lists for further comment.
o Targets now get rw passed through so they can do COW for example
o Added error handler (not sure that this is the "correct" way to do
this at the moment, so its a bit exprimental for now)
o New ioctl(): LV_BMAP which is compatible with LVM so that hopefully LILO
will work. I haven't actually tested that, but this support at least will
be required.
o Only one list of block devices for all tables
o Locking to ensure that block devices only get opened once
o Block device handling is now in dm-blkdev.c
o We open block devices when we create the tables and hold them open until
the table is destroyed (this prevents the module for the device being
unloaded after table parsing and before the table is used)
o We compute the hardsect size when the table is created rather than when
someone requests it.
Still to fix/change:
o Probably want to hash the device lists in dm-blkdev.c and also remove refs
to struct dm_bdev outside this file.
o Need to ensure that hardsect_size doesn't change when new tables are
swapped in (maybe this ought to be a per volume parameter and the tables
will only parse if they match the value for the volume?).
Things are changing fast here, so if you want a stable version of thic code
try checking out yesterdays.
o Now we handle target modules correctly
o Moved the linear target into its own module (not really because it needs to
be there, but because its useful to have a simple example so people can see
what we are doing)
o I'm afraid that wu and wl etc. is just too confusing.... I've changed it
to up_write() and down_write() etc so that you can see what kind of a lock
it is (otherwise it could be anything.. semaphore, spinlock, spinlock_bh,
spinlock_irq, br_lock, etc.)
Joe Thornber [Fri, 7 Sep 2001 11:34:46 +0000 (11:34 +0000)]
o first sat\7f\7ftab at custom fs. Very rough ATM.
Mount the dm-fs filesystem on /device-mapper (will fix later). mkdir
to create a device, inside that directory every file you create is a table
file. If there are errors <table>.err will appear automagically. Mv a table
file to ACTIVE to active\7fate the device. I'm not happy with mv being the
binding command, symlink would be better.
AJ Lewis [Tue, 21 Aug 2001 20:40:37 +0000 (20:40 +0000)]
o Ok, this seems to be a much better method for caching valid
devices based on /proc/devices
+ The dev_mgr structure now has a 256 element char array that is
initially all 0s
+ When a match is found, the array element corresponding to the major
number of the match is set to a non-zero value
+ to check for a match, all one has to do is check that the array
element at the major number in question is non-zero.
o I'm wondering if we should do this with bitwise operators instead? Does
anyone expect the major numbers to grow larger than 8-bits?
AJ Lewis [Tue, 21 Aug 2001 19:51:04 +0000 (19:51 +0000)]
o Quick and dirty *UGLY* hack of a /proc/devices cache using a linked list
o I don't like it, but I'm committing it so I can go back and laugh at
myself later
o I have a (hopefully) better idea that i'll try to commit yet today.
AJ Lewis [Tue, 21 Aug 2001 18:20:14 +0000 (18:20 +0000)]
o Quick and dirty hack to get lvm_check_dev code into the dev-manager
o I'm working on caching the /proc/devices entries now, and should have
that in by the end of today or early tomorrow.
o There will be much cleanup involved with that...