On Thu, Oct 07, 2010 at 07:08:03PM +0200, Lennart Poettering wrote:
> Or in other words: Gustavo's and Fidencio's code is just about enough to
> avoid unclean file systems. If everything went correctly during normal
> operation the usual ordered .mount units will aready have called
> /bin/umount fo
On Wed, 06.10.10 15:43, Karel Zak (k...@redhat.com) wrote:
>
> On Wed, Oct 06, 2010 at 03:01:02PM +0200, Lennart Poettering wrote:
> > > > +if (streq(mp->path, "/"))
> > > > +continue;
> > > > +
> > > > +/* Trying to umount. Forcing to umoun
From: Fabiano Fidencio
This functions will:
- umount all mount points that aren't API
- remount read-only all mount points that can't be umounted
- umount all swap devices.
- detach all loopback devices
TODO:
- umount dms
Mountpoints are being read from /proc/self/mountinfo.
On Wed, Oct 6, 2010 at 10:40 AM, Gustavo Sverzut Barbieri
wrote:
>>> + ioctl(fd, LOOP_CLR_FD, 0);
>>> + r = errno;
>>> + close_nointr(fd);
>>> +
>>> + if (r == ENXIO) /* not bound, so no error */
>>> + r = 0;
>>> + errno = r;
>>> + return -e
On Wed, Oct 06, 2010 at 03:01:02PM +0200, Lennart Poettering wrote:
> > > +if (streq(mp->path, "/"))
> > > +continue;
> > > +
> > > +/* Trying to umount. Forcing to umount if busy (only for
> > > NFS mounts) */
> > > +if (umou
On Wed, Oct 6, 2010 at 10:09 AM, Lennart Poettering
wrote:
> On Wed, 06.10.10 02:05, Gustavo Sverzut Barbieri (barbi...@profusion.mobi)
> wrote:
>
>> +#define LOOP_CLR_FD 0x4C01
>
> Is there any particular reason you define this here? To me it appears
> that linux/loop.h is perfectly fit to b
On Wed, Oct 6, 2010 at 15:09, Lennart Poettering wrote:
> On Wed, 06.10.10 02:05, Gustavo Sverzut Barbieri (barbi...@profusion.mobi)
> wrote:
>
>> +#define LOOP_CLR_FD 0x4C01
>
> Is there any particular reason you define this here? To me it appears
> that linux/loop.h is perfectly fit to be i
On Wed, 06.10.10 02:05, Gustavo Sverzut Barbieri (barbi...@profusion.mobi)
wrote:
> +#define LOOP_CLR_FD 0x4C01
Is there any particular reason you define this here? To me it appears
that linux/loop.h is perfectly fit to be included here.
> +
> +if ((dir = opendir("/sys/class/block")
On Wed, 06.10.10 14:17, Karel Zak (k...@redhat.com) wrote:
> > +static int mount_points_list_umount(MountPoint **mount_point_list_head) {
> > +MountPoint *mp, *mp_next;
> > +int failed = 0;
> > +
> > +LIST_FOREACH_SAFE(mount_point, mp, mp_next,
> > *mount_point_list_head)
On Wed, Oct 6, 2010 at 14:17, Karel Zak wrote:
>> + if ((dir = opendir("/sys/class/block")) == NULL)
>> + return -errno;
>> +
>> + while ((d = readdir(dir))) {
>> + MountPoint *lb;
>> + char buf[PATH_MAX];
>> + char *loop;
>
On Wed, Oct 06, 2010 at 02:05:43AM -0300, Gustavo Sverzut Barbieri wrote:
> +static int swap_list_get(MountPoint **swap_list_head) {
> +FILE *proc_swaps;
> +unsigned int i;
> +int r;
> +
> +if (!(proc_swaps = fopen("/proc/swaps", "re")))
> +return -er
On Wed, Oct 6, 2010 at 2:05 AM, Gustavo Sverzut Barbieri
wrote:
> From: Fabiano Fidencio
>
> This functions will:
> - umount all mount points that aren't API
> - remount read-only all mount points that can't be umounted
> - umount all swap devices.
> - detach all loopback devices
...
From: Fabiano Fidencio
This functions will:
- umount all mount points that aren't API
- remount read-only all mount points that can't be umounted
- umount all swap devices.
- detach all loopback devices
TODO:
- umount dms
Mountpoints are being read from /proc/self/mountinfo.
From: Fabiano Fidencio
This functions will:
- umount all mount points that aren't API
- remount read-only all mount points that can't be umounted
- umount all swap devices.
- detach all loopback devices
TODO:
- umount dms
Mountpoints are being read from /proc/self/mountinfo.
On Mon, 27.09.10 18:34, Fabiano Fidencio (fiden...@profusion.mobi) wrote:
> +
> +static void mount_points_list_free(MountPoint **mp_list_head) {
> +MountPoint *mp, *mp_next;
> +LIST_FOREACH_SAFE(mount_point, mp, mp_next, *mp_list_head)
> +mount_point_remove_and_free
This functions will unmount all filesystem that aren't api
(and those which fail will be remounted read-only).
Filesystems are being read from /proc/self/mountinfo.
---
Makefile.am |1 +
src/umount.c | 184 ++
src/umount.h | 27 ++
From: Fabiano Fidencio
This functions will unmount all filesystem that aren't api
(and those which fail will be remounted read-only).
Filesystems are being read from /proc/self/mountinfo.
---
Makefile.am |1 +
src/umount.c | 183 ++
s
17 matches
Mail list logo