> By copying it to a temporary aligned buffer and issuing I/O on this
> buffer.

I don't like this idea. Because, you need to allocate additional pages for the 
entire I/O size(for the misaligned case, if you think through carefully, you 
will know why we have to allocate a temporary buffer that is as big as the 
original IO) and on top of it, copying the buffer from original to temporary 
buffer which is all unnecessary while it can simply be fixed in dm-crypt 
without any of these additional overheads.

> 
> > Only other
> > possibility I see is to have windows fix it by always sending 512 byte
> > aligned buffer lengths, but going with my earlier point that every other
> > component in the Linux IO path handles this case well except for
> > dm-crypt, so it make more sense to fix it in dm-crypt.
> >
> > Thanks
> > Sudhakar
> 
> Are you sure that the problem is only with dm-crypt? You haven't tried all
> the existing block device drivers, have you?

My question is, why dm-crypt worries about alignment requirement of other 
layers? Is there anything that impacts dm-crypt if the segment lengths are not 
aligned?(I believe this case is just not handled so far in dm-crypt and my 
patch addresses it). Should dm-crypt not just pass on all those I/O requests to 
those respective layers to handle it which will be more graceful?

-Sudhakar

> 
> Mikulas
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
> 


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to