SMB jcifs "jcifs.smb.client.dfs.disabled=true" 影响

SMB jcifs "jcifs.smb.client.dfs.disabled=true" impacts

我在使用 JCIFS SMB 上传 SMB 文件时遇到性能问题。该问题与 jcifs.smb.client.dfs.disabled 属性 有关,使用 true 解决了该问题。

现在的问题是,在哪种情况下我会在使用 jcifs.smb.client.dfs.disabled=true 时遇到问题,因为它对我来说必须是静态的 属性?我有许多使用相同配置的不同环境。

属性文档 (link) 说:

If this property is true, domain based DFS referrals will be disabled. The default value is false. This property can be important in non-domain environments where domain-based DFS referrals that normally run when JCIFS first tries to resolve a path would timeout causing a long startup delay (e.g. running JCIFS only on the local machine without a network like on a laptop).

...但是这是我的头,无法理解。

此外,如果我可以动态更改它,我需要这样做的迹象是什么?任何指出需要 truefalse 的特定异常或场景?

谢谢!

请阅读this - 什么是DFS。

  • 一般来说,您可以将文件夹装载到不同的共享位置。 例如,PC1 有 Share1,PC2 Share2 有一个名为 "not located here" 的文件夹,它指向 PC1 Share1(只是一个 link)。

解析真实位置 SMB 使用 IOCL 查询"get_referrals",这是 DFS 的实现。