summaryrefslogtreecommitdiffstats
path: root/mount/lomount.h
Commit message (Collapse)AuthorAgeFilesLines
* losetup: remove unnecessary header filesKarel Zak2011-12-201-20/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: allow unmounting loopdev specified by associated filePetr Uzel2011-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to unmount a filesystem on a loop device if it is specified by associated backing file. It does not attempt to unmount anything if there are more than one loop device associated with the given file. Umount looks for associated loopdevice(s) only if umount is called with the regular file as an argument. Before: mount -o loop -t ext2 img mnt umount -v img > Could not find /home/puzel/upstream/util-linux/img in mtab > umount: img: not mounted After: mount -o loop -t ext2 img mnt umount -v img > img is associated with /dev/loop0, trying to unmount it > /dev/loop0 has been unmounted [kzak@redhat.com: - fix memory leak in lomount.c] Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161 Signed-off-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: read /sys for loopdev backing fileKarel Zak2010-12-011-0/+7
| | | | | | | | | On systems without /etc/mtab (or everywhere if kernel >= 2.6.37) we use loop autoclear flag and then the backing file name is not stored in /etc/mtab. mount(8) uses sysfs to get the filename (or LOOP_GET_STATU* ioctls on old kernels). Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: improve "-d" option for autoclear loopsKarel Zak2008-07-021-0/+1
| | | | | | | | | | | 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>
* losetup: add --sizelimit optionShachar Shemesh2008-04-151-1/+1
| | | | | | [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>
* mount: allow auto-destruction of loop devicesBernardo Innocenti2008-02-191-0/+3
| | | | | | | | | | This allows a flag to be set on loop devices so that when they are closed for the last time, they'll self-destruct. The kernel part has been submitted to lkml by David Woodhouse. Signed-off-by: Bernardo Innocenti <bernie@codewiz.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: prevent loop mounting the same file twiceKarel Zak2007-10-261-0/+3
| | | | | | | | | | | | | The mount syscall prevents mounting the same device twice to the same mountpoint. When loop mounting a file, for each file a new loop device gets allocated, which prevents the detection of loop mounting the same file to the same mountpoint twice. The patch adds a check to prevent double mounts, if the same loopfile is going to be mounted with the same offset to the same mountpoint. Co-Author: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: clean up global variablesKarel Zak2007-10-251-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.12b tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.12a tarball.Karel Zak2006-12-071-4/+5
|
* Imported from util-linux-2.12pre tarball.Karel Zak2006-12-071-5/+4Star
|
* Imported from util-linux-2.12 tarball.Karel Zak2006-12-071-4/+5
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-0/+1
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-0/+4