Skip to content

Commit

Permalink
[fs] warn status log if resource has both check_read and 'nointr' mou…
Browse files Browse the repository at this point in the history
…nt option
  • Loading branch information
cgalibern committed Nov 21, 2023
1 parent 787413e commit 5c2c71a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion opensvc/drivers/resource/fs/__init__.py
Expand Up @@ -452,7 +452,16 @@ def check_writable_file(self):
return True

def need_check_readable(self):
return self.check_readable_enabled
if self.check_readable_enabled:
if 'nointr' in self.mount_options.split(','):
"""nointr is ignored after Linux kernel 2.6.25, Solaris default is intr,
having both nointr and check_readable_enabled is not accepted"""
self.status_log("config has both check_read and 'nointr' mount option", "warn")
self.log.debug("disable read check: mount options have 'nointr'")
return False
return True
else:
return False

def check_readable(self):
stat_code, ok = stat_with_timeout(self.mount_point, self.stat_timeout, ["-f"])
Expand Down

0 comments on commit 5c2c71a

Please sign in to comment.