Whamcloud - gitweb
LU-12275 sec: check if page is empty with ZERO_PAGE 18/38918/8
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 12 Jun 2020 10:52:28 +0000 (10:52 +0000)
committerOleg Drokin <green@whamcloud.com>
Mon, 20 Jul 2020 05:20:38 +0000 (05:20 +0000)
commit45c26bc11b7b1ec6b6b4773fb9a40e0a655f7d33
tree09cd7e350131188f40d0c66927fc54e04d0285a9
parenta71586d4ee8d6f039a413e2a0fd791db847a3c19
LU-12275 sec: check if page is empty with ZERO_PAGE

In osc_brw_fini_request(), page needs decryption only if it
is not empty. To check this, use ZERO_PAGE macro available
for all architectures, and compare with memcmp.
It will likely be faster/more efficient than comparing the
words by hand as may use optimized CPU instructions or ASM code.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I5e04b72790e8acbceb1989ba3659e170c0b11192
Reviewed-on: https://review.whamcloud.com/38918
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_request.c