docs/zh_CN: core-api: Update the translation of xarray.rst to 5.19-rc3

Synchronous translation from upstream commit ac23d1a964
("XArray: Document the locking requirement for the xa_state")

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Wu XiangCheng <bobwxc@email.cn>
Reviewed-by: Yanteng Si<siyanteng@loongson.cn>
Link: https://lore.kernel.org/r/b7d5f3ca914667ec14ba35a7c0db3ec3506e670d.1655863769.git.zhoubinbin@loongson.cn
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Binbin Zhou 2022-06-22 18:19:49 +08:00 committed by Jonathan Corbet
parent c290f175e7
commit 4a6d00a43e
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@
:翻译:
司延腾 Yanteng Si <siyanteng@loongson.cn>
周彬彬 Binbin Zhou <zhoubinbin@loongson.cn>
:校译:
@ -254,7 +255,8 @@ __xa_set_mark() 和 __xa_clear_mark() 函数也适用于你查找一个条目并
高级API是基于xa_state的。这是一个不透明的数据结构你使用XA_STATE()宏在堆栈中声明。这个宏初始化了
xa_state准备开始在XArray上移动。它被用作一个游标来保持在XArray中的位置并让你把各种操作组合在一
起,而不必每次都从头开始。
而不必每次都从头开始。xa_state的内容受rcu_read_lock()或xas_lock()的保护。如果需要删除保护状态
和树的这些锁中的任何一个你必须调用xas_pause()以便将来的调用不会依赖于状态中未受保护的部分。
xa_state也被用来存储错误(store errors)。你可以调用xas_error()来检索错误。所有的操作在进行之前都
会检查xa_state是否处于错误状态所以你没有必要在每次调用之后检查错误你可以连续进行多次调用只在