On Mon, Apr 03, 2017 at 11:23:30AM +0400, Dmitry Monakhov wrote: > Currently all integrity prep hooks are open-coded, and if prepare fails > we ignore it's code and fail bio with EIO. Let's return real error to > upper layer, so later caller may react accordingly. For example retry in > case of ENOMEM.
bio_integrity_enabled and bio_integrity_prep seem to be unused outside of bio_integrity_setup, so they can be removed / folded into bio_integrity_setup. Which at this point might just keep the bio_integrity_prep name to fit into the blocking traditions :) Also please update Documentation/block/data-integrity.txt for your changes and add a kerneldoc comment for the new function.