in normal conditions migration (being a distributed transaction)
saves LDLM locks in the reply to implement CoS semantics, but if
migrate process has got too many LDLM locks and we can't save
them in the reply, then we should commit the transaction and
then we can release the locks.
Change-Id: I5e5f0516bdca973a72e43d63ecde79c792558abd
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34431
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if (open_sem_locked)
up_write(&sobj->mot_open_sem);
unlock_links:
+ /* if we've got too many locks to save into RPC,
+ * then just commit before the locks are released */
+ if (!rc && do_sync)
+ mdt_device_sync(env, mdt);
mdt_unlock_list(info, &link_locks, do_sync ? 1 : rc);
put_source:
mdt_object_put(env, sobj);
if (lustre_handle_is_used(&rename_lh))
mdt_rename_unlock(&rename_lh);
- if (!rc && do_sync)
- mdt_device_sync(env, mdt);
-
return rc;
}