From: Mikulas Patocka Subject: Re: Desynchronizing dm-raid1 Date: Mon, 12 May 2008 23:28:44 -0400 (EDT) Message-ID: References: Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: dm-devel@redhat.com, linux-crypto@vger.kernel.org To: Herbert Xu Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com List-Id: linux-crypto.vger.kernel.org On Tue, 6 May 2008, Mikulas Patocka wrote: > On Tue, 6 May 2008, Herbert Xu wrote: > >> Mikulas Patocka wrote: >>> >>> BTW: is it guaranteed for crypto functions that they read the source data >>> only once? >> >> There is no such guarantee. >> >> Cheers, > > So we'll have to copy the sector to temporary space before encrypting it. > > I'll look at it. > > Mikulas Do you think that it would make sense to add a flag to crypto API that says that the encryption function reads the input only once? --- so that we wouldn't have to copy the data when using an algorithm which doesn't need it. Or do you thint it would be useless (all major disk-encryption algorithms read input buffer more times?) or it would create too much code complexity? Mikulas