[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200114002844.GA116395@mit.edu>
Date: Mon, 13 Jan 2020 19:28:44 -0500
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Eric Biggers <ebiggers@...nel.org>
Cc: linux-fscrypt@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH] fs-verity: use mempool for hash requests
On Tue, Dec 31, 2019 at 11:55:45AM -0600, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@...gle.com>
>
> When initializing an fs-verity hash algorithm, also initialize a mempool
> that contains a single preallocated hash request object. Then replace
> the direct calls to ahash_request_alloc() and ahash_request_free() with
> allocating and freeing from this mempool.
>
> This eliminates the possibility of the allocation failing, which is
> desirable for the I/O path.
>
> This doesn't cause deadlocks because there's no case where multiple hash
> requests are needed at a time to make forward progress.
>
> Signed-off-by: Eric Biggers <ebiggers@...gle.com>
Looks good; feel free to add:
Reviewed-by: Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists