From de60bf29f4a4f6b1443850ce5797c23b4290f36e Mon Sep 17 00:00:00 2001 From: Mikhail Pershin Date: Wed, 15 Jan 2020 14:55:18 +0300 Subject: [PATCH] LU-13136 dom: check read-on-open buffer presents in reply The ll_dom_finish_open() uses req_capsule_has_field() wronly, it check only format but not buffer presence in reply, that causes unneeded console errors about missing buffer later in req_capsule_server_get() Patch replaces that with req_capsule_field_present() to check if server pack that field in reply or not and properly skip responses from an old server. Lustre-change: https://review.whamcloud.com/37249 Lustre-commit: 58bea527100b50abf3df2dbab0ed6d6b42b69d86 Signed-off-by: Mikhail Pershin Change-Id: Ia6114879c90e3e6b8c5020c4912e988cad90df30 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Stephane Thiell Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/38188 Tested-by: jenkins Tested-by: Maloo --- lustre/llite/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 7e760b0..2b565ba 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -437,8 +437,8 @@ void ll_dom_finish_open(struct inode *inode, struct ptlrpc_request *req, if (!dom_lock) RETURN_EXIT; - if (!req_capsule_has_field(&req->rq_pill, &RMF_NIOBUF_INLINE, - RCL_SERVER)) + if (!req_capsule_field_present(&req->rq_pill, &RMF_NIOBUF_INLINE, + RCL_SERVER)) RETURN_EXIT; rnb = req_capsule_server_get(&req->rq_pill, &RMF_NIOBUF_INLINE); -- 1.8.3.1