[RFC PATCH v2 34/48] lmb: add versions of the lmb API with flags