Whamcloud - gitweb
LU-13136 dom: check read-on-open buffer presents in reply 49/37249/2
authorMikhail Pershin <mpershin@whamcloud.com>
Wed, 15 Jan 2020 11:55:18 +0000 (14:55 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Jan 2020 06:02:35 +0000 (06:02 +0000)
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 <mpershin@whamcloud.com>
Change-Id: Ia6114879c90e3e6b8c5020c4912e988cad90df30
Reviewed-on: https://review.whamcloud.com/37249
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
lustre/llite/file.c

index 8855e59..34c524f 100644 (file)
@@ -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);