From 58bea527100b50abf3df2dbab0ed6d6b42b69d86 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. Signed-off-by: Mikhail Pershin Change-Id: Ia6114879c90e3e6b8c5020c4912e988cad90df30 Reviewed-on: https://review.whamcloud.com/37249 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Stephane Thiell --- 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 8855e59..34c524f 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -453,8 +453,8 @@ void ll_dom_finish_open(struct inode *inode, struct ptlrpc_request *req, if (obj == NULL) 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