Skip to content

Commit

Permalink
object/nfs: Increase the maximum byte size of the rpc call for nfs re…
Browse files Browse the repository at this point in the history
…addir from 4096 to 1MB. (#5689)
  • Loading branch information
zhijian-pro authored Feb 21, 2025
1 parent 9e47a14 commit a5e864c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ replace github.com/huaweicloud/huaweicloud-sdk-go-obs v3.21.12+incompatible => g

replace github.com/urfave/cli/v2 v2.19.3 => github.com/juicedata/cli/v2 v2.19.4-0.20230605075551-9c9c5c0dce83

replace github.com/vmware/go-nfs-client v0.0.0-20190605212624-d43b92724c1b => github.com/juicedata/go-nfs-client v0.0.0-20231018052507-dbca444fa7e8
replace github.com/vmware/go-nfs-client v0.0.0-20190605212624-d43b92724c1b => github.com/juicedata/go-nfs-client v0.0.0-20250220101412-d3a8c1ca64a1

replace github.com/mattn/go-colorable v0.1.13 => github.com/juicedata/go-colorable v0.0.0-20250208072043-a97a0c2023db

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ github.com/juicedata/go-colorable v0.0.0-20250208072043-a97a0c2023db h1:esc0bVXk
github.com/juicedata/go-colorable v0.0.0-20250208072043-a97a0c2023db/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/juicedata/go-fuse/v2 v2.1.1-0.20250217082151-ede92174e524 h1:AB9eYVcdtPbjwUBbN9KhLqiJedls1E6+zb6KA9wjLZc=
github.com/juicedata/go-fuse/v2 v2.1.1-0.20250217082151-ede92174e524/go.mod h1:xKwi1cF7nXAOBCXujD5ie0ZKsxc8GGSA1rlMJc+8IJs=
github.com/juicedata/go-nfs-client v0.0.0-20231018052507-dbca444fa7e8 h1:mVVipCbohnzKZPiHGzFncLKEJZpypqjpGr4End2PP48=
github.com/juicedata/go-nfs-client v0.0.0-20231018052507-dbca444fa7e8/go.mod h1:xOMqi3lOrcGe9uZLnSzgaq94Vc3oz6VPCNDLJUnXpKs=
github.com/juicedata/go-nfs-client v0.0.0-20250220101412-d3a8c1ca64a1 h1:GgH2ZG9inMYSme7zZb79z3QeOW70YusbJIVYjvqd508=
github.com/juicedata/go-nfs-client v0.0.0-20250220101412-d3a8c1ca64a1/go.mod h1:xOMqi3lOrcGe9uZLnSzgaq94Vc3oz6VPCNDLJUnXpKs=
github.com/juicedata/godaemon v0.0.0-20210629045518-3da5144a127d h1:kpQMvNZJKGY3PTt7OSoahYc4nM0HY67SvK0YyS0GLwA=
github.com/juicedata/godaemon v0.0.0-20210629045518-3da5144a127d/go.mod h1:dlxKkLh3qAIPtgr2U/RVzsZJDuXA1ffg+Njikfmhvgw=
github.com/juicedata/gogfapi v0.0.0-20241204082332-ecd102647f80 h1:EPg/f3lhbAOjE2M0WpVi47Fk62mEmmPejRuGVdOFQww=
Expand Down
3 changes: 3 additions & 0 deletions pkg/object/nfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ func newNFSStore(addr, username, pass, token string) (ObjectStorage, error) {
}
auth := rpc.NewAuthUnix(username, uint32(os.Getuid()), uint32(os.Getgid()))
target, err := mount.Mount(path, auth.Auth())
target.Config.DirCount = 1 << 17
// Readdir returns up to 1M at a time, even if MaxCount is set larger
target.Config.MaxCount = 1 << 20
if err != nil {
return nil, fmt.Errorf("unable to mount %s: %v", addr, err)
}
Expand Down

0 comments on commit a5e864c

Please sign in to comment.