Skip to content

Commit

Permalink
[tmp] Always report 4 MiB block size because Lustre statfs suddenly r…
Browse files Browse the repository at this point in the history
…eturns 4K instead of 4M maybe because of lazystatfs mount option and a dead OST
  • Loading branch information
mxmlnkn committed Sep 9, 2024
1 parent bef2633 commit bf2f680
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ratarmount.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,12 @@ def fsync(self, path, datasync, fh):

@overrides(fuse.Operations)
def statfs(self, path):
return {
'f_bsize': 4 * 1024 * 1024,
'f_frsize': 4 * 1024 * 1024,
'f_namemax': 255,
}

# The filesystem block size is used, e.g., by Python as the default buffer size and therefore the
# default (p)read size when possible. For network file systems such as Lustre, or block compression
# such as in SquashFS, this proved to be highly insufficient to reach optimal performance!
Expand Down

0 comments on commit bf2f680

Please sign in to comment.