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

Re: [RFC] Erase LVM/crypto issues and proposed partman reorg



On Mon, Dec 03, 2007 at 11:26:22AM +0100, Frans Pop wrote:
> I therefore suggest reverting David's changes (which luckily is quite 
> straightforward) and then first do some refactoring of existing code as 
> preparation for a reimplementation of support for erasing encrypted 
> volumes.

I tend to agree. The existing code is indeed a bit messy 
and difficult to follow. Starting to untangle the scripts
and cleaning up the code now seems a good idea.

David's changes include good code that can be reintroduced
later on to a large extent when we can start from a more
maintainable code base.

> 1) Rename current "wipe" functions

> For partman-crypto I have a patch that renames the existing functions to 
> include the crypto namespace:
> - wipe -> crypto_do_wipe
> - dev_wipe -> crypto_wipe_device

Good change, agreed. In fact I have a patch sitting here
that does the exact same change, among others. 

> 2) Reorder function libraries

> I suggest we move all function libraries into /lib/partman/lib/ [1].
> definitions.sh could be renamed to just base.sh.
> The various *_tools.sh files could be renamed to lvm-base.sh, lvm-*.sh,
> auto-base, etc.
> 
> This would also lower the barrier to introduce additional new function 
> libraries when that is warranted.

Yep, this seems worthwile. 

I'm willing to put in some work to help deal with the 
implementation and fallout of this and the other proposed
changes, (and eventually contribute to the reimplementation
of the removal of crypto devices). I'm happy to set aside
some time this weekend and review or test changes.

	Max



Reply to: