FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 06-03-2011, 04:32 PM
"Brian C. Lane"
 
Default Fix up swap unmount logic (#708966)

swap was always being unmounted, even when swapoff == False
---
pyanaconda/storage/__init__.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 9904581..b183471 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -2149,14 +2149,15 @@ class FSSet(object):
self.active = True

def umountFilesystems(self, ignoreErrors=True, swapoff=True):
+ """ unmount filesystems, except swap if swapoff == False """
devices = self.mountpoints.values() + self.swapDevices
devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
self.proc, self.usb, self.selinux])
devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
devices.reverse()
for device in devices:
- if not device.format.mountable and
- (device.format.type != "swap" or swapoff):
+ if (not device.format.mountable) or
+ (device.format.type == "swap" and not swapoff):
continue

device.format.teardown()
--
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-03-2011, 05:07 PM
David Lehman
 
Default Fix up swap unmount logic (#708966)

On Fri, 2011-06-03 at 09:32 -0700, Brian C. Lane wrote:
> swap was always being unmounted, even when swapoff == False

Ack. I have the exact same patch in my local tree.

> ---
> pyanaconda/storage/__init__.py | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
> index 9904581..b183471 100644
> --- a/pyanaconda/storage/__init__.py
> +++ b/pyanaconda/storage/__init__.py
> @@ -2149,14 +2149,15 @@ class FSSet(object):
> self.active = True
>
> def umountFilesystems(self, ignoreErrors=True, swapoff=True):
> + """ unmount filesystems, except swap if swapoff == False """
> devices = self.mountpoints.values() + self.swapDevices
> devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
> self.proc, self.usb, self.selinux])
> devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
> devices.reverse()
> for device in devices:
> - if not device.format.mountable and
> - (device.format.type != "swap" or swapoff):
> + if (not device.format.mountable) or
> + (device.format.type == "swap" and not swapoff):
> continue
>
> device.format.teardown()


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org