MS_DIRSYNC and MS_REC compat

It turns out that older versions of the glibc headers do not
properly define MS_DIRSYNC despite it being explicitly mentioned
in the man pages.  They instead call it S_WRITE, so for system
where this is not correct defined map MS_DIRSYNC to S_WRITE.
At the time of this commit both Ubuntu Lucid, and Debian Squeeze
both use the out of date glibc headers.

As for MS_REC this field is also not available in the older headers.
Since there is no obvious mapping in this case we simply disable
the recursive mount option which used it.
This commit is contained in:
Brian Behlendorf
2011-02-10 12:11:05 -08:00
parent 1ac0ea38a5
commit afffb5cd10
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -3875,7 +3875,9 @@ static const option_map_t option_map[] = {
#endif
/* Valid options not found in mount(8) */
{ MNTOPT_BIND, MS_BIND },
#ifdef MS_REC
{ MNTOPT_RBIND, MS_BIND|MS_REC },
#endif
{ MNTOPT_COMMENT, MS_COMMENT },
{ MNTOPT_BOOTWAIT, MS_COMMENT },
{ MNTOPT_NOBOOTWAIT, MS_COMMENT },