[dm-crypt] dm-crypt design and decision
fzhangcsc at yahoo.com
Sun Jan 29 23:30:51 CET 2012
I have two questions with the design of dm-crypt.
1. Why need call kcryptd_queue_io() and
kcryptd_queue_crypt() to put request bio to io_queue and crypt_queue?
Actually, for read we could clone a bio in crypt_map() and call
generic_make_request() directly and in crypt_endio(), we simply decrypt the data
for write, we simply encrypt data in crypt_map() and call generic_make_request() to write encrypted bio to low level block device.
2. If we really need to queue the bio request, why we need two queues instead combining io_queue and crypt_queuetogether?
3. Why need to call kcryptd_crypt_write_io_submit(io, error, 1) in kcryptd_async_done() to do async write via io_queue instead of call kcryptd_crypt_write_io_submit(io, error, 0) to do sync write?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dm-crypt