| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This function is marked obsolete in POSIX.1-2001 and removed in
POSIX.1-2008.
Conditionally replaced with nanosleep().
Signed-off-by: Daniel Mierswa <impulze@impulze.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Karel Zak wrote: "This is very old (10+years) feature. The mount(8) is
trying to found mountpoint/device in fstab and then in mtab.
I guess the original purpose for this feature is user-friendly 'mount
/node -o remount'. Unfortunately, the code does not check for
MS_REMOUNT flag and consults mtab in all cases. (The code is
consulting fstab/mtab before mount options parsing.)"
This commit documents this feature.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 98c7944b52c54c86fb5b9d73fbead9442bfa0e30.
Unfortunately, the patch has been committed by "git commit -a" and
includes unwanted changes in configure.ac and sys-utils/Makefile.am...
Sorry.
|
|
|
|
|
|
|
|
|
| |
* use "filesystem" everywhere (currently, the mount.8 man page is inconsistent
and uses "file system" and "filesystem")
* fix "The extN" to "The extN filesystem" (reported by Theodore Tso)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
|
|
| |
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
|
|
| |
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
|
|
| |
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
|
|
| |
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
|
|
|
|
|
|
|
| |
Those 4 functions are marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008.
Replaced with memmove,memset,strchr and strrchr.
Signed-off-by: Daniel Mierswa <impulze@impulze.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A nice feature of mount is that when you attempt to mount a file
system read-write, and that fails because it can only be mounted
read-only, it goes ahead and retries the mount with the "ro" option
and returns success if that succeeds. However, this code path is also
followed when you are doing a remount for the sole purpose of changing
the mount from read-only to read-write - the change fails, but mount
returns success. Instead, check if we are attempting to remount and
fail out immediately, instead of retrying with the old "ro" option and
whee, happily "succeeding."
Signed-off-by: Valerie Aurora (Henson) <vaurora@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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Addresses-Suse-Bug: #461732
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses-Debian-Bug: #478600
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses-Debian-Bug: #334796
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses-Debian-Bug: #329856
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses-Debian-Bug: #320500
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit does not properly fix the problem with "none"
fstype and MS_{PROPAGATION,BIND,MOVE} flags. The real fstype has to
be replaced with "none" before we try to use /sbin/mount.<type>
helper.
Old version:
# grep test /proc/self/mountinfo
16 18 0:19 / /mnt/test rw,relatime - tmpfs tmpfs rw
# ./mount -v -v -v --make-private /mnt/test
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "tmpfs"
mount: node: "/mnt/test"
mount: types: "tmpfs"
mount: opts: "rw"
mount: external mount: argv[0] = "/sbin/mount.tmpfs"
mount: external mount: argv[1] = "tmpfs"
mount: external mount: argv[2] = "/mnt/test"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw"
tmpfs on /mnt/test type tmpfs (rw)
# grep test /proc/self/mountinfo
16 18 0:19 / /mnt/test rw,relatime - tmpfs tmpfs rw
17 16 0:20 / /mnt/test rw,relatime - tmpfs tmpfs rw
Fixed version:
# grep test /proc/self/mountinfo
16 18 0:19 / /mnt/test rw,relatime - tmpfs tmpfs rw
# ./mount -v -v -v --make-private /mnt/test
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "tmpfs"
mount: node: "/mnt/test"
mount: types: "tmpfs"
mount: opts: "rw"
mount: mount(2) syscall: source: "tmpfs", target: "/mnt/test",
filesystemtype: "none", mountflags: 262144, data: (null)
# grep test /proc/self/mountinfo
16 18 0:19 / /mnt/test rw,relatime - tmpfs tmpfs rw
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Based on Documentation/filesystems/ext4.txt
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LOOP_SET_CAPACITY allows to resize loop device size.
Example:
# blockdev --getsize64 /dev/loop0
10485760
# dd if=/dev/zero of=/home/images/aaa.img count=10 bs=1M oflag=append conv=notrunc
# blockdev --getsize64 /dev/loop0
10485760
# ./losetup --set-capacity /dev/loop0
# blockdev --getsize64 /dev/loop0
20971520
CC: J. R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The libvolume_id is deprecated in favor of libblkid. The libblkid from
u-l-ng provides the same functionality as libvolume_id.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
> Gentoo-hardened stable have: sys-libs/libselinux-1.34.14
> I have:
> mount.c:(.text+0x12ce): undefined reference to `security_get_initial_context'
Reported-by: Максим Бритов <maxim.britov@gmail.com>
Addresses-Gentoo-Bug: #270168
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|