From: Fabiano Fidencio
---
README |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/README b/README
index 430d091..12dc9fe 100644
--- a/README
+++ b/README
@@ -28,7 +28,7 @@ AUTHOR:
REQUIREMENTS:
Linux kernel >= 2.6.30 (with autofs4, devtmpfs, cgroups)
-
From: Fabiano Fidencio
This functions are working as follows:
- Send a SIGTERM to all processes that may be finished
- Send a SIGKILL to all processes that still live and may be finished
- Try to unmount all mount points
- Try to remount read-only all mount points that can't be umount
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.
Swap
From: Fabiano Fidencio
As we have streq to repesent (strcmp(a, b) == 0),I'm adding
strneq to represent (strncmp(a, b, n) == 0), that will be used
in umount.c (at least).
---
src/util.h |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/util.h b/src/util.h
index f21aecf.
From: Fabiano Fidencio
This functions are working as follows:
- Send a SIGTERM to all processes that may be finished
- Send a SIGKILL to all processes that still live and may be finished
- Try to unmount all mount points
- Try to remount read-only all mount points that can't be um
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:
> +static int send_signal(int sign) {
> +sigset_t mask, oldmask;
> +usec_t until;
> +int processes;
> +struct timespec ts;
> +
> +sigemptyset(&mask);
Minor nitpick: I tend to
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, 06.10.10 14:25, Karel Zak (k...@redhat.com) wrote:
> > +if (need_swapoff) {
> > +log_info("Disabling Swaps");
> > +r = swapoff_all();
> > +if (r == 0)
> > +need_swapoff =
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:44AM -0300, Gustavo Sverzut Barbieri wrote:
> +/* umount all mountpoints, swaps, and loopback devices */
> +retries = FINALIZE_ATTEMPTS;
> +while (need_umount || need_swapoff || need_loop_detach) {
> +if (need_umount) {
> +
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
17 matches
Mail list logo