1 --- util-linux-2.12pre/mount/sundries.h_ORIG 2002-11-01 02:00:50.000000000 +0100
2 +++ util-linux-2.12pre/mount/sundries.h 2003-08-09 14:31:41.000000000 +0200
7 -#define streq(s, t) (strcmp ((s), (t)) == 0)
8 +#define streq(s, t) (strcmp ((s), (t)) == 0)
9 +#define streqn(s, t, n) (strncmp((s), (t), (n)) == 0)
11 /* Functions in sundries.c that are used in mount.c and umount.c */
12 void block_signals (int how);
13 --- util-linux-2.12pre/mount/fstab.h_ORIG 2000-12-03 00:13:47.000000000 +0100
14 +++ util-linux-2.12pre/mount/fstab.h 2003-08-09 13:52:48.000000000 +0200
17 -#define _PATH_FSTAB "/etc/fstab"
19 -#define MOUNTED_LOCK _PATH_MOUNTED "~"
20 -#define MOUNTED_TEMP _PATH_MOUNTED ".tmp"
22 -#define MOUNTED_LOCK "/etc/mtab~"
23 -#define MOUNTED_TEMP "/etc/mtab.tmp"
25 -#define LOCK_TIMEOUT 10
27 -int mtab_is_writable(void);
28 -int mtab_does_not_exist(void);
29 -int mtab_is_a_symlink(void);
30 +#define _PATH_FSTAB "/etc/fstab"
31 +#define PATH_PROC "/proc/"
32 +#define PATH_PROC_MOUNTS PATH_PROC "mounts"
33 +#define MTAB_LOCK_SUFFIX "~"
34 +#define MTAB_TEMP_SUFFIX ".tmp"
35 +#define LOCK_TIMEOUT 10
38 struct mntentchn *nxt, *prev;
40 struct mntentchn *getfsvolspec (const char *label);
44 +void get_mtab_info (void);
45 +int mtab_is_writable(void);
46 +int mtab_does_not_exist(void);
47 void lock_mtab (void);
48 void unlock_mtab (void);
49 void update_mtab (const char *special, struct mntent *with);
50 --- util-linux-2.12pre/mount/fstab.c_ORIG 2003-07-05 22:16:05.000000000 +0200
51 +++ util-linux-2.12pre/mount/fstab.c 2003-08-09 14:31:30.000000000 +0200
53 -/* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
55 + * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
56 * - added Native Language Support
57 - * Sun Mar 21 1999 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
58 + * 1999-03-21 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
59 * - fixed strerr(errno) in gettext calls
60 + * 2003-08-08 Thomas Hood <jdthood@yahoo.co.uk>
61 + * - Write through a symlink at /etc/mtab if it doesn't point into /proc/
69 +#include "realpath.h"
70 #include "sundries.h" /* for xmalloc() etc */
71 #include "get_label_uuid.h"
74 -#define streq(s, t) (strcmp ((s), (t)) == 0)
76 -#define PROC_MOUNTS "/proc/mounts"
79 /* Information about mtab. ------------------------------------*/
80 -static int have_mtab_info = 0;
81 -static int var_mtab_does_not_exist = 0;
82 -static int var_mtab_is_a_symlink = 0;
85 +/* A 64 bit number can be displayed in 20 decimal digits */
86 +#define LEN_LARGEST_PID 20
87 +#define MTAB_PATH_MAX (PATH_MAX - (sizeof(MTAB_LOCK_SUFFIX) - 1) - LEN_LARGEST_PID)
88 +static char mtab_path[MTAB_PATH_MAX];
89 +static char mtab_lock_path[PATH_MAX];
90 +static char mtab_lock_targ[PATH_MAX];
91 +static char mtab_temp_path[PATH_MAX];
94 + * Set mtab_path to the real path of the mtab file
95 + * or to the null string if that path is inaccessible
100 get_mtab_info(void) {
101 struct stat mtab_stat;
103 - if (!have_mtab_info) {
104 - if (lstat(MOUNTED, &mtab_stat))
105 - var_mtab_does_not_exist = 1;
106 - else if (S_ISLNK(mtab_stat.st_mode))
107 - var_mtab_is_a_symlink = 1;
108 - have_mtab_info = 1;
109 + if (lstat(MOUNTED, &mtab_stat)) {
110 + /* Assume that the lstat error means that the file does not exist */
111 + /* (Maybe we should check errno here) */
112 + strcpy(mtab_path, MOUNTED);
113 + } else if (S_ISLNK(mtab_stat.st_mode)) {
116 + char *r = myrealpath(MOUNTED, mtab_path, MTAB_PATH_MAX);
117 + mtab_path[MTAB_PATH_MAX - 1] = 0; /* Just to be sure */
118 + len = strlen(mtab_path);
122 + || len >= (MTAB_PATH_MAX - 1)
123 + || streqn(mtab_path, PATH_PROC, sizeof(PATH_PROC) - 1)
125 + /* Real path invalid or inaccessible */
126 + mtab_path[0] = '\0';
129 + /* mtab_path now contains mtab's real path */
131 + /* Exists and is not a symlink */
132 + strcpy(mtab_path, MOUNTED);
135 + sprintf(mtab_lock_path, "%s%s", mtab_path, MTAB_LOCK_SUFFIX);
136 + sprintf(mtab_lock_targ, "%s%s%d", mtab_path, MTAB_LOCK_SUFFIX, getpid());
137 + sprintf(mtab_temp_path, "%s%s", mtab_path, MTAB_TEMP_SUFFIX);
143 -mtab_does_not_exist(void) {
145 - return var_mtab_does_not_exist;
147 + * Tell whether or not the mtab real path is accessible
149 + * get_mtab_info() must have been run
152 +mtab_is_accessible(void) {
153 + return (mtab_path[0] != '\0');
157 + * Tell whether or not the mtab file currently exists
159 + * Note that the answer here is independent of whether or
160 + * not the file is writable, so if you are planning to create
161 + * the mtab file then check mtab_is_writable() too.
163 + * get_mtab_info() must have been run
166 -mtab_is_a_symlink(void) {
168 - return var_mtab_is_a_symlink;
169 +mtab_does_not_exist(void) {
170 + struct stat mtab_stat;
172 + if (!mtab_is_accessible())
175 + if (lstat(mtab_path, &mtab_stat))
182 + * Tell whether or not mtab is writable (whether or not it currently exists)
184 + * This depends on whether or not the real path is accessible and,
185 + * if so, whether or not the file can be opened. This function
186 + * has the side effect of creating the file if it is writable.
188 + * get_mtab_info() must have been run
192 - static int ret = -1;
193 + static int is_writable = -1;
196 - /* Should we write to /etc/mtab upon an update?
197 - Probably not if it is a symlink to /proc/mounts, since that
198 - would create a file /proc/mounts in case the proc filesystem
200 - if (mtab_is_a_symlink())
204 - int fd = open(MOUNTED, O_RDWR | O_CREAT, 0644);
210 + if (is_writable != -1)
211 + return is_writable;
213 + if (!mtab_is_accessible()) {
215 + return is_writable;
220 + fd = open(mtab_path, O_RDWR | O_CREAT, 0644);
228 + return is_writable;
231 /* Contents of mtab and fstab ---------------------------------*/
232 @@ -132,21 +198,21 @@
234 mc->nxt = mc->prev = NULL;
238 mfp = my_setmntent (fnam, "r");
239 if (mfp == NULL || mfp->mntent_fp == NULL) {
241 - fnam = PROC_MOUNTS;
242 + fnam = PATH_PROC_MOUNTS;
243 mfp = my_setmntent (fnam, "r");
244 if (mfp == NULL || mfp->mntent_fp == NULL) {
245 error(_("warning: can't open %s: %s"),
246 - MOUNTED, strerror (errsv));
247 + mtab_path, strerror (errsv));
251 printf (_("mount: could not open %s - "
252 "using %s instead\n"),
253 - MOUNTED, PROC_MOUNTS);
254 + mtab_path, PATH_PROC_MOUNTS);
256 read_mntentchn(mfp, fnam, mc);
262 - return !get_label_uuid(device, &devlabel, devuuid) &&
263 - !strcmp(label, devlabel);
264 + return !get_label_uuid(device, &devlabel, devuuid)
265 + && streq(label, devlabel);
273 - return !get_label_uuid(device, &devlabel, devuuid) &&
274 - !memcmp(uuid, devuuid, sizeof(devuuid));
275 + return !get_label_uuid(device, &devlabel, devuuid)
276 + && !memcmp(uuid, devuuid, sizeof(devuuid));
279 /* Find the entry (SPEC,FILE) in fstab */
281 /* Flag for already existing lock file. */
282 static int we_created_lockfile = 0;
284 -/* Flag to indicate that signals have been set up. */
285 -static int signals_have_been_setup = 0;
287 /* Ensure that the lock is released if we are interrupted. */
290 @@ -352,29 +415,28 @@
291 /* nothing, fcntl will fail anyway */
294 -/* Create the lock file.
295 - The lock file will be removed if we catch a signal or when we exit. */
297 + * Create the lock file
299 + * The lock file will be removed if we catch a signal or when we exit
301 /* The old code here used flock on a lock file /etc/mtab~ and deleted
302 - this lock file afterwards. However, as rgooch remarks, that has a
303 - race: a second mount may be waiting on the lock and proceed as
304 - soon as the lock file is deleted by the first mount, and immediately
305 - afterwards a third mount comes, creates a new /etc/mtab~, applies
306 - flock to that, and also proceeds, so that the second and third mount
307 - now both are scribbling in /etc/mtab.
308 + this lock file afterwards. However, as rgooch remarks, that races:
309 + a second mount may be waiting on the lock which will proceed as
310 + soon as the lock file is deleted by the first mount; immediately
311 + afterwards a third mount can come, create a new /etc/mtab~, apply
312 + flock to that, and also proceed, so that the second and third mount
313 + now both scribble in /etc/mtab.
314 The new code uses a link() instead of a creat(), where we proceed
315 - only if it was us that created the lock, and hence we always have
316 + only if it was we that created the lock, and hence we always have
317 to delete the lock afterwards. Now the use of flock() is in principle
318 - superfluous, but avoids an arbitrary sleep(). */
320 -/* Where does the link point to? Obvious choices are mtab and mtab~~.
321 - HJLu points out that the latter leads to races. Right now we use
322 - mtab~.<pid> instead. */
323 -#define MOUNTLOCK_LINKTARGET MOUNTED_LOCK "%d"
324 + superfluous, but using it allows us to avoid an arbitrary sleep(). */
329 - char *linktargetfile;
330 + /* Flag to indicate that signals have been set up. */
331 + static int signals_have_been_setup = 0;
333 if (!signals_have_been_setup) {
335 @@ -395,41 +457,36 @@
336 signals_have_been_setup = 1;
339 - /* somewhat clumsy, but some ancient systems do not have snprintf() */
340 - /* use 20 as upper bound for the length of %d output */
341 - linktargetfile = xmalloc(strlen(MOUNTLOCK_LINKTARGET) + 20);
342 - sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ());
344 /* Repeat until it was us who made the link */
345 while (!we_created_lockfile) {
349 - i = open (linktargetfile, O_WRONLY|O_CREAT, 0);
350 + i = open (mtab_lock_targ, O_WRONLY|O_CREAT, 0);
353 - /* linktargetfile does not exist (as a file)
354 + /* mtab_lock_targ does not exist (as a file)
355 and we cannot create it. Read-only filesystem?
356 Too many files open in the system?
358 die (EX_FILEIO, _("can't create lock file %s: %s "
359 "(use -n flag to override)"),
360 - linktargetfile, strerror (errsv));
361 + mtab_lock_targ, strerror (errsv));
365 - j = link(linktargetfile, MOUNTED_LOCK);
366 + j = link(mtab_lock_targ, mtab_lock_path);
369 - (void) unlink(linktargetfile);
370 + (void) unlink(mtab_lock_targ);
372 if (j < 0 && errsv != EEXIST) {
373 die (EX_FILEIO, _("can't link lock file %s: %s "
374 "(use -n flag to override)"),
375 - MOUNTED_LOCK, strerror (errsv));
376 + mtab_lock_path, strerror (errsv));
379 - fd = open (MOUNTED_LOCK, O_WRONLY);
380 + fd = open (mtab_lock_path, O_WRONLY);
386 die (EX_FILEIO, _("can't open lock file %s: %s "
387 "(use -n flag to override)"),
388 - MOUNTED_LOCK, strerror (errsv));
389 + mtab_lock_path, strerror (errsv));
392 flock.l_type = F_WRLCK;
396 printf(_("Can't lock lock file %s: %s\n"),
397 - MOUNTED_LOCK, strerror (errsv));
398 + mtab_lock_path, strerror (errsv));
402 @@ -465,17 +522,17 @@
403 if (fcntl (fd, F_SETLKW, &flock) == -1) {
405 die (EX_FILEIO, _("can't lock lock file %s: %s"),
406 - MOUNTED_LOCK, (errno == EINTR) ?
407 + mtab_lock_path, (errno == EINTR) ?
408 _("timed out") : strerror (errsv));
411 /* Limit the number of iterations - maybe there
412 - still is some old /etc/mtab~ */
413 + still is some old lock */
416 die (EX_FILEIO, _("Cannot create link %s\n"
417 "Perhaps there is a stale lock file?\n"),
426 if (we_created_lockfile) {
427 - unlink (MOUNTED_LOCK);
428 + unlink (mtab_lock_path);
429 we_created_lockfile = 0;
432 @@ -506,16 +563,16 @@
434 update_mtab (const char *dir, struct mntent *instead) {
435 mntFILE *mfp, *mftmp;
436 - const char *fnam = MOUNTED;
437 + const char *fnam = mtab_path;
438 struct mntentchn mtabhead; /* dummy */
439 struct mntentchn *mc, *mc0, absent;
441 - if (mtab_does_not_exist() || mtab_is_a_symlink())
442 + if (mtab_does_not_exist())
447 - /* having locked mtab, read it again */
448 + /* Having got the lock, we read mtab again */
449 mc0 = mc = &mtabhead;
450 mc->nxt = mc->prev = NULL;
452 @@ -555,11 +612,11 @@
455 /* write chain to mtemp */
456 - mftmp = my_setmntent (MOUNTED_TEMP, "w");
457 + mftmp = my_setmntent (mtab_temp_path, "w");
458 if (mftmp == NULL || mftmp->mntent_fp == NULL) {
460 error (_("cannot open %s (%s) - mtab not updated"),
461 - MOUNTED_TEMP, strerror (errsv));
462 + mtab_temp_path, strerror (errsv));
467 if (my_addmntent(mftmp, &(mc->m)) == 1) {
469 die (EX_FILEIO, _("error writing %s: %s"),
470 - MOUNTED_TEMP, strerror (errsv));
471 + mtab_temp_path, strerror (errsv));
475 @@ -575,25 +632,25 @@
476 S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) < 0) {
478 fprintf(stderr, _("error changing mode of %s: %s\n"),
479 - MOUNTED_TEMP, strerror (errsv));
480 + mtab_temp_path, strerror (errsv));
482 my_endmntent (mftmp);
485 * If mount is setuid and some non-root user mounts sth,
486 - * then mtab.tmp might get the group of this user. Copy uid/gid
487 - * from the present mtab before renaming.
488 + * then the temp file might get the group of this user.
489 + * Copy uid/gid from the present mtab before renaming.
492 - if (stat (MOUNTED, &sbuf) == 0)
493 - chown (MOUNTED_TEMP, sbuf.st_uid, sbuf.st_gid);
494 + if (stat (mtab_path, &sbuf) == 0)
495 + chown (mtab_temp_path, sbuf.st_uid, sbuf.st_gid);
498 /* rename mtemp to mtab */
499 - if (rename (MOUNTED_TEMP, MOUNTED) < 0) {
500 + if (rename (mtab_temp_path, mtab_path) < 0) {
502 fprintf(stderr, _("can't rename %s to %s: %s\n"),
503 - MOUNTED_TEMP, MOUNTED, strerror(errsv));
504 + mtab_temp_path, mtab_path, strerror(errsv));
508 --- util-linux-2.12pre/mount/mount.c_ORIG 2003-07-13 23:26:13.000000000 +0200
509 +++ util-linux-2.12pre/mount/mount.c 2003-08-09 00:22:21.000000000 +0200
511 * 2000-11-08 aeb: accept nonnumeric uid=, gid= options
512 * 2001-07-13 Michael K. Johnson <johnsonm@redhat.com>
513 * - implemented -a -O
514 + * 2003-08-08 Thomas Hood <jdthood@yahoo.co.uk>
515 + * - Write through a symlink at /etc/mtab if it doesn't point into /proc/
523 -/* Create mtab with a root entry. */
525 + * Create mtab with a root entry.
527 + * Caller should check that mtab is writable first
531 struct mntentchn *fstab;
532 @@ -1433,6 +1439,9 @@
533 initproctitle(argc, argv);
537 + /* Keep in mind that /etc/mtab may be a symlink */
539 while ((c = getopt_long (argc, argv, "afFhilL:no:O:p:rsU:vVwt:",
540 longopts, NULL)) != -1) {
542 @@ -1554,7 +1563,7 @@
543 die (EX_USAGE, _("mount: only root can do that"));
546 - if (!nomtab && mtab_does_not_exist()) {
547 + if (!nomtab && mtab_does_not_exist() && mtab_is_writable()) {
549 printf(_("mount: no %s found - creating it..\n"),
551 --- util-linux-2.12pre/mount/umount.c_ORIG 2002-11-01 02:00:50.000000000 +0100
552 +++ util-linux-2.12pre/mount/umount.c 2003-08-09 00:47:17.000000000 +0200
554 * 010914: Jamie Strandboge - use tcp if that was used for mount
555 * 011005: hch - add lazy umount support
556 * 020105: aeb - permission test owner umount
557 + * 20030808: Thomas Hood <jdthood@yahoo.co.uk>
558 + * - Write through a symlink at /etc/mtab if it doesn't point into /proc/
566 -/* Umount a single device. Return a status code, so don't exit
567 - on a non-fatal error. We lock/unlock around each umount. */
569 + * Umount a single device
571 + * Returns a status code; doesn't exit on a non-fatal error
574 umount_one (const char *spec, const char *node, const char *type,
575 const char *opts, struct mntentchn *mc) {
577 remnt.mnt_type = remnt.mnt_fsname = NULL;
578 remnt.mnt_dir = xstrdup(node);
579 remnt.mnt_opts = "ro";
580 - update_mtab(node, &remnt);
581 + if (!nomtab && mtab_is_writable())
582 + update_mtab(node, &remnt);
584 } else if (errno != EBUSY) { /* hmm ... */
592 while ((c = getopt_long (argc, argv, "adfhlnrt:O:vV",
593 longopts, NULL)) != -1)
595 --- util-linux-2.12pre/mount/mount.8_ORIG 2003-07-13 23:18:35.000000000 +0200
596 +++ util-linux-2.12pre/mount/mount.8 2003-08-09 08:55:43.000000000 +0200
598 .\" 010714, Michael K. Johnson <johnsonm@redhat.com> added -O
599 .\" 010725, Nikita Danilov <NikitaDanilov@Yahoo.COM>: reiserfs options
600 .\" 011124, Karl Eichwalder <ke@gnu.franken.de>: tmpfs options
601 +.\" 030808, Thomas Hood <jdthood@yahoo.co.uk>: symlinking /etc/mtab
602 +.\" 030809, Thomas Hood <jdthood@yahoo.co.uk>: use 'file system' consistently
604 -.TH MOUNT 8 "14 September 1997" "Linux 2.0" "Linux Programmer's Manual"
605 +.TH MOUNT 8 "8 August 2003" "Linux 2.0" "Linux Programmer's Manual"
607 mount \- mount a file system
611 After this call the same contents is accessible in two places.
613 -This call attaches only (part of) a single filesystem, not possible
614 +This call attaches only (part of) a single file system, not possible
615 submounts. The entire file hierarchy including submounts is attached
621 option will make mount fork, so that the
622 -filesystems are mounted simultaneously.
623 +file systems are mounted simultaneously.
625 (ii) When mounting a file system mentioned in
629 For more details, see
631 -Only the user that mounted a filesystem can unmount it again.
632 +Only the user that mounted a file system can unmount it again.
633 If any user should be able to unmount, then use
636 @@ -227,23 +229,46 @@
640 -filesystem is mounted (say at
641 +file system is mounted (usually at
647 -have very similar contents. The former has somewhat
648 +have very similar contents. The former contains somewhat
649 more information, such as the mount options used,
650 -but is not necessarily up-to-date (cf. the
651 +but is not necessarily completely accurate (cf. the
653 -option below). It is possible to replace
656 +options below). It is possible to replace
658 by a symbolic link to
660 -but some information is lost that way, and in particular
661 -working with the loop device will be less convenient,
662 -and using the "user" option will fail.
663 +but some information is lost that way. As a result,
664 +working with the loop device is less convenient
665 +and the "user" option does not work.
667 +You can also replace
669 +by a symbolic link to
670 +another location such as
672 +This may be useful if your root file system is mounted read-only
673 +but you have another file system such as
675 +that is writable where you can store the mtab.
676 +Note that in this case you will have to mount
680 +option. Once the target of the
682 +symbolic link is writable you can run
686 +option to add the missing entry.
689 The full set of options used by an invocation of
694 -Mount all filesystems (of the given types) mentioned in
695 +Mount all file systems (of the given types) mentioned in
702 Tolerate sloppy mount options rather than failing. This will ignore
703 -mount options not supported by a filesystem type. Not all filesystems
704 +mount options not supported by a file system type. Not all file systems
705 support this option. This option exists for support of the Linux
706 autofs\-based automounter.
710 program has to do is issue a simple
712 -system call, and no detailed knowledge of the filesystem type is required.
713 +system call, and no detailed knowledge of the file system type is required.
714 For a few types however (like nfs, smbfs, ncpfs) ad hoc code is
715 necessary. The nfs ad hoc code is built in, but smbfs and ncpfs
716 have a separate mount program. In order to make it possible to
719 option is given, or if the
721 -type is specified, the superblock is probed for the filesystem type
722 +type is specified, the superblock is probed for the file system type
727 .IR /etc/filesystems ,
728 or, if that does not exist,
729 .IR /proc/filesystems .
730 -All of the filesystem types listed there will be tried,
731 +All of the file system types listed there will be tried,
732 except for those that are labeled "nodev" (e.g.,
736 can be useful to change the probe order (e.g., to try vfat before msdos)
737 or if you use a kernel module autoloader.
738 Warning: the probing uses a heuristic (the presence of appropriate `magic'),
739 -and could recognize the wrong filesystem type, possibly with catastrophic
740 +and could recognize the wrong file system type, possibly with catastrophic
741 consequences. If your data is valuable, don't ask
746 Used in conjunction with
748 -to limit the set of filesystems to which the
749 +to limit the set of file systems to which the
755 .B "mount \-a \-t ext2 \-O _netdev"
757 -mounts all ext2 filesystems with the _netdev option, not all filesystems
758 +mounts all ext2 file systems with the _netdev option, not all file systems
759 that are either ext2 or have the _netdev option specified.
763 Permit execution of binaries.
766 -The filesystem resides on a device that requires network access
767 -(used to prevent the system from attempting to mount these filesystems
768 +The file system resides on a device that requires network access
769 +(used to prevent the system from attempting to mount these file systems
770 until the network has been enabled on the system).
774 Define the behaviour when an error is encountered.
775 (Either ignore errors and just mark the file system erroneous and continue,
776 or remount the file system read-only, or panic and halt the system.)
777 -The default is set in the filesystem superblock, and can be
778 +The default is set in the file system superblock, and can be
782 @@ -815,18 +840,18 @@
784 Instead of block 1, use block
786 -as superblock. This could be useful when the filesystem has been damaged.
787 +as superblock. This could be useful when the file system has been damaged.
788 (Earlier, copies of the superblock would be made every 8192 blocks: in
789 block 1, 8193, 16385, ... (and one got hundreds or even thousands
790 -of copies on a big filesystem). Since version 1.08,
791 +of copies on a big file system). Since version 1.08,
793 has a \-s (sparse superblock) option to reduce the number of backup
794 superblocks, and since version 1.15 this is the default. Note
795 -that this may mean that ext2 filesystems created by a recent
796 +that this may mean that ext2 file systems created by a recent
798 cannot be mounted r/w under Linux 2.0.*.)
799 The block number here uses 1k units. Thus, if you want to use logical
800 -block 32768 on a filesystem with 4k blocks, use "sb=131072".
801 +block 32768 on a file system with 4k blocks, use "sb=131072".
803 .BR grpquota " / " noquota " / " quota " / " usrquota
804 These options are accepted but ignored.
805 @@ -880,12 +905,12 @@
806 .SH "Mount options for fat"
809 -is not a separate filesystem, but a common part of the
810 +is not a separate file system, but a common part of the
818 .BR blocksize=512 " / " blocksize=1024 " / " blocksize=2048
819 Set blocksize (default 512).
823 Sets the codepage for converting to shortname characters on FAT
824 -and VFAT filesystems. By default, codepage 437 is used.
825 +and VFAT file systems. By default, codepage 437 is used.
827 .BR conv=b[inary] " / " conv=t[ext] " / " conv=a[uto]
829 @@ -1035,10 +1060,10 @@
830 Do not abort mounting when certain consistency checks fail.
832 .SH "Mount options for iso9660"
833 -ISO 9660 is a standard describing a filesystem structure to be used
834 -on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
835 +ISO 9660 is a standard describing a file system structure to be used
836 +on CD-ROMs. (This file system type is also seen on some DVDs. See also the
843 @@ -1050,7 +1075,7 @@
844 Rock Ridge is an extension to iso9660 that provides all of these unix like
845 features. Basically there are extensions to each directory record that
846 supply all of the additional information, and when Rock Ridge is in use,
847 -the filesystem is indistinguishable from a normal UNIX file system (except
848 +the file system is indistinguishable from a normal UNIX file system (except
849 that it is read-only, of course).
852 @@ -1260,7 +1285,7 @@
853 hard links instead of being suppressed.
855 \fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP
856 -Set the file permission on the filesystem.
857 +Set the file permission on the file system.
858 The umask value is given in octal.
859 By default, the files are owned by root and not readable by somebody else.
861 @@ -1270,12 +1295,12 @@
862 These options are recognized, but have no effect as far as I can see.
864 .SH "Mount options for ramfs"
865 -Ramfs is a memory based filesystem. Mount it and you have it. Unmount it
866 +Ramfs is a memory based file system. Mount it and you have it. Unmount it
867 and it is gone. Present since Linux 2.3.99pre4.
868 There are no mount options.
870 .SH "Mount options for reiserfs"
871 -Reiserfs is a journaling filesystem.
872 +Reiserfs is a journaling file system.
873 The reiserfs mount options are more fully described at
874 .IR http://www.namesys.com/mount-options.html .
876 @@ -1384,7 +1409,7 @@
877 for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount.
880 -Override default size of the filesystem.
881 +Override default size of the file system.
882 The size is given in bytes, and rounded down to entire pages.
883 The default is half of the memory.
885 @@ -1398,7 +1423,7 @@
886 Set initial permissions of the root directory.
888 .SH "Mount options for udf"
889 -udf is the "Universal Disk Format" filesystem defined by the Optical
890 +udf is the "Universal Disk Format" file system defined by the Optical
891 Storage Technology Association, and is often used for DVD-ROM.
894 @@ -1447,7 +1472,7 @@
895 Override the PartitionDesc location. (unused)
898 -Set the last block of the filesystem.
899 +Set the last block of the file system.
902 Override the fileset block location. (unused)
903 @@ -1471,23 +1496,23 @@
904 (Don't forget to give the \-r option.)
907 -For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
908 +For file systems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
911 -For filesystems created by SunOS or Solaris on Sparc.
912 +For file systems created by SunOS or Solaris on Sparc.
915 -For filesystems created by Solaris on x86.
916 +For file systems created by Solaris on x86.
919 -For filesystems created by NeXTStep (on NeXT station) (currently read only).
920 +For file systems created by NeXTStep (on NeXT station) (currently read only).
923 For NextStep CDROMs (block_size == 2048), read-only.
926 -For filesystems created by OpenStep (currently read only).
927 -The same filesystem type is also used by Mac OS X.
928 +For file systems created by OpenStep (currently read only).
929 +The same file system type is also used by Mac OS X.
933 @@ -1525,7 +1550,7 @@
934 This lets you backup and restore filenames that are created with any
935 Unicode characters. Without this option, a '?' is used when no
936 translation is possible. The escape character is ':' because it is
937 -otherwise illegal on the vfat filesystem. The escape sequence
938 +otherwise illegal on the vfat file system. The escape sequence
939 that gets used, where u is the unicode character,
940 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
942 @@ -1538,8 +1563,8 @@
946 -UTF8 is the filesystem safe 8-bit encoding of Unicode that is used
947 -by the console. It can be be enabled for the filesystem with this option.
948 +UTF8 is the file system safe 8-bit encoding of Unicode that is used
949 +by the console. It can be be enabled for the file system with this option.
950 If `uni_xlate' gets set, UTF8 gets disabled.
952 .B shortname=[lower|win95|winnt|mixed]
953 @@ -1592,9 +1617,9 @@
955 Set the number of in-memory log buffers.
956 Valid numbers range from 2-8 inclusive.
957 -The default value is 8 buffers for filesystems with a blocksize of 64K,
958 -4 buffers for filesystems with a blocksize of 32K,
959 -3 buffers for filesystems with a blocksize of 16K,
960 +The default value is 8 buffers for file systems with a blocksize of 64K,
961 +4 buffers for file systems with a blocksize of 32K,
962 +3 buffers for file systems with a blocksize of 16K,
963 and 2 buffers for all other configurations.
964 Increasing the number of buffers may increase performance on
965 some workloads at the cost of the memory used for the
966 @@ -1608,7 +1633,7 @@
968 \fBlogdev=\fP\fIdevice\fP and \fBrtdev=\fP\fIdevice\fP
969 Use an external log (metadata journal) and/or real-time device.
970 -An XFS filesystem has up to three parts: a data section, a log section,
971 +An XFS file system has up to three parts: a data section, a log section,
972 and a real-time section.
973 The real-time section is optional, and the log section can be separate
974 from the data section or contained within it.
975 @@ -1622,8 +1647,8 @@
976 Access timestamps are not updated when a file is read.
979 -The filesystem will be mounted without running log recovery.
980 -If the filesystem was not cleanly unmounted, it is likely to
981 +The file system will be mounted without running log recovery.
982 +If the file system was not cleanly unmounted, it is likely to
983 be inconsistent when mounted in
986 @@ -1651,13 +1676,13 @@
989 must be specified in 512-byte block units.
990 -If this option is not specified and the filesystem was made on a stripe
991 +If this option is not specified and the file system was made on a stripe
992 volume or the stripe width or unit were specified for the RAID device at
993 mkfs time, then the mount system call will restore the value from the
995 -For filesystems that are made directly on RAID devices, these options can be
996 +For file systems that are made directly on RAID devices, these options can be
997 used to override the information in the superblock if the underlying disk
998 -layout changes after the filesystem has been created.
999 +layout changes after the file system has been created.
1002 option is required if the