Joe Thornber wrote:
Hi Jon,
Firstly I suggest you split this project into 2 chunks. First
concentrate on the device-mapper encryption target, and use dmsetup to
do all of your testing. When this is complete come back and talk to
us about what work would need to be done on the tools to integrate it
into LVM2.
We are 2 people, can we both work on the device-mapper driver?
Make sure you read the source code for the existing targets,
especially the simple ones like 'linear' and 'stripe'.
Already done that, i'm going through the LVM2 stuff next.
The 2.4 version of dm has a very useful extra target method that
allows you to catch the io when it has completed. You should use this
to perform decryption. I have attached a patch that adds this
functionality to 2.5, this has had limited testing, so it would be
helpful if you could keep me informed of any successes/failures you
have with it.
i'll guess i'll try your patch first, so it also can receive some
testing. Which 2.5 does it work on ?
Encryption will require you to encrypt into your own data pages so you
will have to think about how to manage these pages (maybe look at the
page handling in kcopyd (2.4, make sure you grab the latest code from
our ftp site). Remember that you cannot allocate memory from within a
dm target except GFP_NOIO, so use mempools to ensure progress.
i figured i would have to do that, but not that i cant allocate memory.
First work out what the dm-crypt target parameters are going to be,
and what metadata you need to store (the 1024 bytes you mentioned). I
suggest you keep the metadata seperate from the actual encrypted
device, since this will allow you to add/remove encryption from
existing LVs (without changing their size).
Okay, i'll take your advice.
dm-devel@xxxxxxxxxxx is the right list for this discussion, or mail me
directly if you want.
It is not mentioned from the page with the LVM mailing lists, but google
found it. I'm subscribed now
JonB