From: Mikhail Pershin Date: Thu, 13 Dec 2018 10:11:05 +0000 (+0300) Subject: LU-11752 osc: pass client page size during reconnect too X-Git-Tag: 2.12.53~105 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=5bec8f95cc1028d207e55e659a27d80081864a83;p=fs%2Flustre-release.git LU-11752 osc: pass client page size during reconnect too Client page size is reported to the server in ocd_grant_blkbits and server returns back device blocksize. During reconnect that ocd_grant_blkbits contains server device blocksize which is used by server as client page size wrongly. Patch sets ocd_grant_blkbits to the client page size again during reconnect so server will get expected information. Signed-off-by: Mikhail Pershin Change-Id: I14bba1d025e4e9fb99fd4bae4002463439ac265c Reviewed-on: https://review.whamcloud.com/33847 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index a5b1e2a..f3a9f38 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -2997,10 +2997,13 @@ int osc_reconnect(const struct lu_env *env, struct obd_export *exp, spin_lock(&cli->cl_loi_list_lock); grant = cli->cl_avail_grant + cli->cl_reserved_grant; - if (data->ocd_connect_flags & OBD_CONNECT_GRANT_PARAM) + if (data->ocd_connect_flags & OBD_CONNECT_GRANT_PARAM) { + /* restore ocd_grant_blkbits as client page bits */ + data->ocd_grant_blkbits = PAGE_SHIFT; grant += cli->cl_dirty_grant; - else + } else { grant += cli->cl_dirty_pages << PAGE_SHIFT; + } data->ocd_grant = grant ? : 2 * cli_brw_size(obd); lost_grant = cli->cl_lost_grant; cli->cl_lost_grant = 0;