Commit
f9906424 introduced a check that should prevent different information in
mtab and /proc/mounts. The check can require significant amount of time, and for
systems without mtab support it has no sense.
Execute this code only on systems with mtab.
When a systems with large number of nodes (thousands) mount the filesystems
simultaneously, the time required for serialization causes the utimensat() to
take a large amount of time (tens of minutes) when a large number of nodes are
simultaneously updating the timestamp.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
} else
res = do_mount_by_pattern(cxt, cxt->fstype_pattern);
+#if USE_LIBMOUNT_SUPPORT_MTAB
if (mnt_context_get_status(cxt)
&& !mnt_context_is_fake(cxt)
&& !cxt->helper) {
mnt_context_set_mflags(cxt,
cxt->mountflags | MS_RDONLY);
}
+#endif
return res;
}