[Libguestfs] [PATCH v6 3/7] daemon: list-filesystems: Ignore partitioned MD devices.

Mykola Ivanets stenavin at gmail.com
Tue May 1 00:54:00 UTC 2018


Ignore partitioned MD devices the same way we ignore regular partitioned
devices because they cannot contain filesystems as well.
---
 daemon/listfs.ml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/daemon/listfs.ml b/daemon/listfs.ml
index 55ace8e9c..4014e3fe9 100644
--- a/daemon/listfs.ml
+++ b/daemon/listfs.ml
@@ -43,8 +43,9 @@ let rec list_filesystems () =
             None                (* ignore type 42 *)
       ) partitions in
 
-  (* Use vfs-type to check for filesystems on md devices. *)
+  (* MD. *)
   let mds = Md.list_md_devices () in
+  let mds = List.filter is_not_partitioned_device mds in
   let ret = ret @ List.filter_map check_with_vfs_type mds in
 
   (* LVM. *)
-- 
2.17.0




More information about the Libguestfs mailing list