[PATCH v4 01/15] lmb: add versions of the lmb API with flags