For 1.8 client, it does not support variable-sized LVB.
The 2.4 server should correctly distinguish whether the
client support it or not, and fill the reply buffer with
suitable LVB size when processing lock enqueue.
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientjob=lustre-b1_8 clientbuildno=256 testlist=runtests
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I9241efe25dc64b26e86c4e75da72ab74bb1bc750
Reviewed-on: http://review.whamcloud.com/5459
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
static int ofd_lvbo_fill(struct ldlm_lock *lock, void *buf, int buflen)
{
struct ldlm_resource *res = lock->l_resource;
- int lvb_len = min_t(int, res->lr_lvb_len, buflen);
+ int lvb_len;
+
+ lvb_len = ofd_lvbo_size(lock);
+ LASSERT(lvb_len <= res->lr_lvb_len);
+
+ if (lvb_len > buflen)
+ lvb_len = buflen;
lock_res(res);
memcpy(buf, res->lr_lvb_data, lvb_len);