| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Note, the description in the mount.8 man page is copy & paste from
rootcontext= kernel patch (by James Morris). I didn't found anything
more useful... (patches welcomed:-)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SPEC (fsname) field in fstab/mtab could be:
- devname
- NAME=value (e.g LABEL, UUID)
- directory (MS_MOVE, MS_BIND, ..)
- pseudo-fs keyword (tmpfs, proc, sysfs, ...)
the pseudo-fs keywords shouldn't be canonicalized to absolute path. It
means we have to differ between SPEC and mountpoint (fs_dir).
Unfortunately, the keywords was checked on wrong place. This patch
move this check to the new function canonicalize_spec().
The fsname in mtab entry is canonicalized when the FS type is not
pseudo filesystem.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As swap format depends on the pagesize being used, it may happen
that the pagesize of the swap space and the current pagesize differ,
resulting in swapon to fail when trying to enable such a swap space.
In such a case swapon should rather reinitialize the swap space.
[kzak@redhat.com: - add blkdev.c to the global swapon_SOURCES
- don't try to detect for huge pages on small swap
areas (or when read() returns less than MAX_PAGESIZE)
- fix fprintf() format string]
Co-Author: Olaf Hering <olh@suse.de>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The man page display shows quote marks instead of being interpreted by the
.B statement and hidden away due to a spurious newline.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
The DESCRIPTION section is huge non-structuralized mess. This patch is
attempt to make this part of the man page more readable.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch moves pivot_root.{8,c) from mount/ to sys-utils/ directory.
There is not ant relation between pivot_root source code and the rest of
code in the mount.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently mounting/losetup an image fails if it is accessable readonly.
There are no problems if it is a file on a local filesystem.
It seems only to happen if it is a NFS mounted image, which is
read-write in permission but with root_squash option.
set_loop checks only for EROFS to retry open with readonly mode,
but in this case we get EACCES.
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
|
|
|
|
|
| |
Addresses-Red-Hat-Bugzilla: #465761
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Ricardo Catalinas Jiménez wrote:
In the man page mount(8) there is the url
"http://www.namesys.com/mount-options.html". The web site has been
down for a long time and the Namesys company is trying to be sold.
Reported-By: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When /etc/mtab does not exist and mount is called with -a, for every
mount point that is mounted a root-fs record is added to mtab. This is
because get_mtab_info() sets the flag mtab_does_not_exist to 1 when it
doesn't find /etc/mtab. However, if it actually finds /etc/mtab, the
variable is not reset to 0. So on every subsequent call to
get_mtab_info() (as it is the case when mounting several mount points
with the -a option), mount will think that /etc/mtab does not exist,
even if it was created in the meantime by mount itself.
Reported-By: Jonas Kramer <jkramer@nex.scrapping.cc>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
old version:
# losetup /dev/loop0 /foo.img
# losetup /dev/loop0 /bar.img; echo $?
2
new version:
# losetup /dev/loop0 /foo.img
# losetup /dev/loop0 /bar.img; echo $?
losetup: /dev/loop0: device is busy
2
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
No longer checks if mount point has been renamed or removed.
Linux reports EBUSY for these actions, so this check is redundant.
[kzak@redhat.com: - remove the check rather than "#if 0"
- remove unnecessary mnt_err2 stuff]
Signed-off-by: Guan Xin <guanx.bac@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Guan Xin <guanx.bac@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Linux cannot umount a device whose mount point is hidden by subsequent
mount(s). i.e. We must umount the devices associated to a mount point
in the reverse order of when they were mounted. If umount was called
violating this rule, report error and exit.
Signed-off-by: Guan Xin <guanx.bac@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The latest kernel supports partitioned loop devices (kernel commit
476a4813cfddf7cf159956cc0e2d3c830c1507e3). Unfortunately, this change
makes minor numbers useless, because mirror number does not match with
loop device name (loop<N>).
We have to follow loop device names only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "swapon -a" command (without "-e" option) has to complain always
when LABEL or UUID does not exist.
Test:
# grep foo /etc/fstab
LABEL=foo swap swap defaults 0 0
Old version:
# swapon -a; echo $?
0
Fixed version:
# swapon -a; echo $?
swapon: cannot find the device for LABEL=foo
255
# swapon -a -e; echo $?
0
This version also fix two memory leaks.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses-Red-Hat-Bugzilla: #454354
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch replaces scandir-based implementation with readdir(). The
readdir(3) is less expensive and more portable (to non-glibc environment).
The patch also replaces sysfs-based solution with simpler /proc/partitions
parsing. The /proc/partitions includes all used loop devices on all systems
(include 2.4). This solution seems faster than scandir(/sys/block/) too.
Summary, the losetup (with this patch) uses three methods to found a
loop device:
a) parse /proc/partitions to found already used loop devices (for
loserup -a)
b) stat(2) for all loop[0-7] devices (default number of loop devices).
This is classic method from util-linux <= 2.13. This method is good
enough for standard Linux machines with default number of loop
devices.
c) scan all /dev or /dev/loop/ for loop devices. This is useful for
crazy people who need more than 8 loop devices.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to a change in kernel behaviour when opening CDROM devices,
we need to retry the open/mount call when ENOMEDIUM is returned.
Explanation from Tejun Heo:
Okay, the difference is from the addition of cdrom_get_media_event()
call to both sr_drive_status() and ide_cdrom_drive_status().
Previously, the cdrom driver can't differentiate between tray closed
w/ no media and tray open and always returned tray open, which
triggers close and retry in the open logic which probably have delayed
things enough to get the media recognized.
Now the cdrom driver can discern between tray closed w/o media and
device not ready for other reasons and returns -ENOMEDIUM on the
former. This is all good and dandy but the problem seems that some
drives report no media right after the tray is closed but it hasn't
properly detected the media yet.
It seems the only way to work around the problem is via sensible
retries (e.g. try three times 5 secs apart) and I don't think we can
add that type of retry logic into cdrom open path. Please note that
the previous logic wasn't water proof. Some drives can take longer to
recognize the media is there and could have failed the in-kernel retry
too. Also, reading the media can take quite some time and during that
period the drive reports media present but device not ready. The
driver will retry the command (e.g. READ TOC for open) five times but
all of them can fail w/ EMEDIUMTYPE.
[kzak@redhat.com: - add CRDOM_NOMEDIUM_RETRIES to blkdev.h
- add verbose message to mount.c]
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reserving uppercase letters for mount operations:
--move | -M
--bind | -B
--rbind | -R
Add lowercase for the most needed mount operation that happen
in initramfs: mount -M /sys /root/sys
Note, we still have shared-subtree operations (--make-{slave,private,...})
without short options.
[kzak@redhat.com: minor change in mount.8]
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
CC: Joe Peterson <joe@skyrush.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
this patch removes old CVS keywords from comments.
mount(8) works for newer Linux then 0.99 ;)
Signed-off-by: maximilian attems <max@stro.at>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch:
Commit: 4edebc1486133231e38b3881325c374eda567f74
Date: Mon Jun 23 13:00:00 2008 +0200
Subject: mount: warn on "file_t" selinux context
introduces a new warning. This warning should be shorter and optional
-- it means visible in verbose mode only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
no longer use deprecated alias.
clears a useless compile error when compiling against klibc:
mount.c:995: error: `MOUNTED' undeclared (first use in this function)
Signed-off-by: maximilian attems <max@stro.at>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In file included from mount.c:34:
sundries.h:16:23: error: rpc/types.h: No such file or directory
nuke rpc/types.h to fix aboves. The file is archaism from old
integrated NFS code.
Cc: Christoph Hellwig <hch@infradead.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: maximilian attems <max@stro.at>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The new loop auto-destruct feature detaches automatically loop devices
when no longer used. This means they are detached with the umount()
call. But when we call umount with -d, del_loop() is called and fails
because the ioctl() returns ENXIO. We have to check for autoclear
loop devices rather than blindly call del_loop().
Reported-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently if I mount a file system without labels, it works fine, but
later or SELinux will start printing denials and stopping certain
applications from working. It would be nice if the mount command
checked it in selinux mode.
Addresses-Red-Hat-Bugzilla: #390691
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
While working on french translation of the Linux Man Pages, I've found a
small typo in mount.8.
Only one wrong letter : the option "osyncis_o_sync" for XFS filesystem
is erroneously replaced by "osyncis_d_sync" (the previous option).
Signed-off-by: Christophe Blaess <Christophe@Blaess.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The command
# mount -oremount <spec> <dir>
doesn't read fstab or mtab. This is expected behaviour. Unfortunately,
we have to care about the internal loop= option which is generated and
maintained by mount(8)/umount(8). The loop= option has to be persistent.
How to reproduce this bug:
# mount -o loop /home/images/vfat.img /mnt/img; grep vfat /etc/mtab; \
mount -o remount,ro /home/images/vfat.img /mnt/img; grep vfat /etc/mtab;
/home/images/vfat.img /mnt/img vfat rw,loop=/dev/loop0 0 0
/home/images/vfat.img /mnt/img vfat ro 0 0
Reported-By: David Chinner <dgc@sgi.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
As it has already changed since the previous release, take the opportunity
to cut it into two more manageable chunks for translators.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Welcome to hell where S1SUSPEND/S2SUSPEND is
"swsuspend" in libblkid
and
"suspend" in libvolume_id
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Shachar Shemesh <shachar@lingnu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Shachar Shemesh <shachar@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
This function has been used in background mount code.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
EX_BG is archaism from old integrated NFS code. The built-in NFS code
has been removed in the previous version and all "bg" stuff is handled
by /sbin/mount.nfs. It seems we can remove all "bg" stuff from
mount(8).
Signed-off-by: Karel Zak <kzak@redhat.com>
|