Nir Soffer has uploaded a new change for review.

Change subject: mount: Remove unneeded freeloop=True usage
......................................................................

mount: Remove unneeded freeloop=True usage

On modern systems loop devices are mounted with the autoclear option, so
the loop device is automatically removed when unmounting it.

For example:

    $ cat /sys/block/loop2/loop/autoclear
    1

Checking umount(8) code show that it ignores the -d/--detach-loop option
in this case.

This patch removes this option when unmounting loop device.

Change-Id: I91d8963ac04ec2569b6ccc9e9b03afc4d8d79f2b
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M tests/mkimageTests.py
M tests/mountTests.py
M vdsm/mkimage.py
3 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/56543/1

diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py
index 5332912..fa18908 100644
--- a/tests/mkimageTests.py
+++ b/tests/mkimageTests.py
@@ -175,7 +175,7 @@
             self._check_content(checkPerms=False)
             self._check_label(floppy, label)
         finally:
-            m.umount(freeloop=True)
+            m.umount()
             # TODO: Use libudev to wait for specific event
             with stopwatch("Wait for udev events"):
                 udevadm.settle(5)
@@ -197,7 +197,7 @@
             self._check_content()
             self._check_label(iso_img, label)
         finally:
-            m.umount(freeloop=True)
+            m.umount()
             # TODO: Use libudev to wait for specific event
             with stopwatch("Wait for udev events"):
                 udevadm.settle(5)
diff --git a/tests/mountTests.py b/tests/mountTests.py
index ad17b05..781ffec 100644
--- a/tests/mountTests.py
+++ b/tests/mountTests.py
@@ -133,7 +133,7 @@
                 try:
                     self.assertTrue(m.isMounted())
                 finally:
-                    m.umount(freeloop=True)
+                    m.umount()
                     # TODO: Use libudev to wait for specific event
                     with stopwatch("Wait for udev events"):
                         udevadm.settle(5)
@@ -157,7 +157,7 @@
             try:
                 self.assertTrue(m.isMounted())
             finally:
-                m.umount(freeloop=True)
+                m.umount()
                 # TODO: Use libudev to wait for specific event
                 with stopwatch("Wait for udev events"):
                     udevadm.settle(5)
diff --git a/vdsm/mkimage.py b/vdsm/mkimage.py
index 59940c5..a6ed4a3 100644
--- a/vdsm/mkimage.py
+++ b/vdsm/mkimage.py
@@ -112,7 +112,7 @@
         try:
             _decodeFilesIntoDir(files, dirname)
         finally:
-            m.umount(freeloop=True)
+            m.umount()
     finally:
         _commonCleanFs(dirname, floppy)
 


-- 
To view, visit https://gerrit.ovirt.org/56543
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d8963ac04ec2569b6ccc9e9b03afc4d8d79f2b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to