| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The loop_scandir() expects all the files in /dev/loop/ to be actual
devices and not symlinks to devices. However, udev by default sets up
symlinks in /dev/loop/ thereby breaking the fallback scan logic when
looking for devices more than the default number of 8.
Simple way to reproduce is:
- <detach all devices>
- cd /dev/loop
- rm -f [2-7]
- losetup 0 autogen.sh
- mv 1 8
- for n in {1..7} ; do ln -s 0 $n ; done
- losetup -f
<error but should have found /dev/loop/8>
[kay.sievers@vrfy.org:
just a note, udev does not do that by default. It is
devfs-nonsense, which the "default" never did.]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reported-by: Mario Bachmann <grafgrimm77@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on
fix-hang-on-stale-nfs.diff
from SUSE src.rpm package.
It seems better to more precisely check for ENXIO rather than assume
that all LOOP_GET_STATUS errors mean that the device is not used.
Addresses-Novell-Bugzilla: #449646
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
2.6.30 adds (patch d0adde574b8487ef30f69e2d08bba769e4be513f) support for a
strictatime mount parameter, used to request strict atime update semantics. The
following patch adds support for it to mount.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
|
|
|
|
|
| |
Thanks to Hugh Dickins.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Thanks to Hugh Dickins.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The fsprobe_ functions return newly allocated strings.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
fstab.c: In function ‘getfs_by_spec’:
fstab.c:400 warning: ‘name’ may be used uninitialized in this
function
fstab.c:402 warning: ‘value’ may be used uninitialized in this
function
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch:
commit 3399a218f4eff4016a22044e7c416521bc37c53c
Author: Matthias Koenig <mkoenig@suse.de>
Date: Thu Nov 27 12:32:56 2008 +0100
swapon: add swap format detection and pagesize check
introduced a new feature. This feature should be optional (disabled by
default) to keep happy people who use swap-space bad blocks or
nonstandard swap-space size.
CC: Hugh Dickins <hugh@veritas.com>
CC: Olaf Hering <olh@suse.de>
CC: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The patch also fix stupid bug in swapoff long options array.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
> On Thu, Jan 22, 2009 at 04:46:57PM +0000, Hugh Dickins wrote:
> Though your swapon may mkswap for suspend reasons: hmm, wouldn't it
> do very much better just to rewrite the swap signature, than exec
> mkswap - maybe nobody ever uses the badpages list, but it really
> should be respected.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The patch moves all checks to the separate swapon_checks() function.
This is a little more aggressive, but currently the do_swapon() is
too long.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The code is much more simple with warn()/err() that with fprintf() and
strerror(), ...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
We needn't to use spec_to_devname() and check for pseudo filesystems.
The swap{on,off} is always checking for the 'swap' fstype.
This patch also removes the dependence on xmalloc.c.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
We need to proper swap header detection for swsuspend data and for
swap PAGE_SIZE checks. It's better to reuse the code in both cases.
The patch removes duplicate stat() call too.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
It's better to do stat() based checks immediately after the stat()
call.
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 allows to detach more devices by "losetup -d",
for example:
# losetup -a
/dev/loop0: [0804]:9955739 (/home/images/ary0.img)
/dev/loop1: [0804]:9955740 (/home/images/ary1.img)
/dev/loop2: [0804]:9955745 (/home/images/ary2.img)
# losetup -d /dev/loop0 /dev/loop1 /dev/loop2
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that blkid.pc from e2fsprogs has been fixed:
$ pkg-config --libs blkid
-lblkid
and the pkg-config does not return any other extra libraries (such
-luuid or -ldevmapper).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* moves the generic libblkid/libvolume_id wrapper (fsprobe.c) from
mount/ to lib/. We'll use the wrapper in cfdisk and fsck.
The wrapper supports:
- obsolete volume_id (udev)
- obsolete libblkid (e2fsprogs)
- libblkid (util-linux-ng)
* mount, umount and swapon when linked against the new libblkid use
- low-level probing code to read LABEL, UUID or FSTYPE from a device
- high-level blkid_evaluate_spec() to convert LABEL/UUID to devname
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* cleanup mount/Makefile.am
* add {VOLUMEID,BLKID}_CFLAGS -- necessary for pkg-config
* add support for linking with in-tree libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mount command does not work properly if you replace suid with
POSIX file capabilities. We still need to check for non-root mounts and
the command has to work in very restricted mode for non-root users.
This patch allows you to remove suid bit from mount and umount. Note
that you need a system with filesystem capability support, e.g.
Fedora 10).
# ls -l /bin/mount
-rwxr-xr-x 1 root root 65192 2008-11-09 22:59 /bin/mount
# getcap /bin/mount
/bin/mount = cap_dac_override,cap_sys_admin+ep
[kzak@redhat.com: all the above comments]
Don't bypass security checks when [u]mount uses POSIX file capabilities
rather than setuid root to permit non-root mounts.
Signed-off-by: Geoff Johnstone <geoff.johnstone@googlemail.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Support for multiple instances of devpts were included in 2.6.29-rc1.
Update man pages to document the new options. Additional details about
the new options are described in 'Documentation/filesystems/devpts.txt'
of kernel source tree.
Reviewed-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
My patches correct troff markup only. No content changes.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
fix:
- don't call canonicalize_spec() for LABELs/UUIDs
- simplify the code
- rename to getfs_by_devdir(), because we use it only for
device names and not for SPECes (see umount.c).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The [u]mount does not properly support LABEL="foo" or UUID="foo" in
/etc/fstab. This patch fix last places where we assume unquoted
LABELs/UUIDs only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Thanks to Christoph Hellwig.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Reported-by: Joachim Wagner <jwagner@computing.dcu.ie>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|