code: def get_max_filename_length(dirname):
      """
      Return maximum filename length for the filesystem
      :return:
      """
      if sys.platform.startswith("linux"):
          # Linux user's may work on mounted ecryptfs filesystem
          # which has filename length limitations
          for entry in _get_mtab():
              mounted_dir, filesystem = entry[1], entry[2]
              # http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs
              if (
                  filesystem == "ecryptfs"
                  and dirname
                  and dirname.startswith(mounted_dir)
              ):
                  return 140
      # default maximum filename length for most filesystems
      return 255
  
imports: import collections
  import functools
  import math
  import os
  import re
  import sys
  import yatest_lib.tools
label_desc: Use image node_id 3 for calling a global function with example usage: get_max_filename_length(dirname) and returns: int, int