Displaying 2 results from an estimated 2 matches for "is_readonly_btrfs_snapshot".
2015 Jan 29
3
[PATCH 1/2] sparsify: ignore read-only btrfs snapshots (RHBZ#1079625)
...tems in
let filesystems = List.map fst filesystems in
let filesystems = List.sort compare filesystems in
@@ -216,6 +221,18 @@ You can ignore this warning or change it to a hard failure using the
List.exists (fun fs' -> fs = g#canonical_device_name fs') ignores
in
+ let is_readonly_btrfs_snapshot fs mp =
+ try
+ let is_btrfs = List.mem fs btrfs_filesystems in
+ if is_btrfs then (
+ try
+ let vol_info = g#btrfs_subvolume_show mp in
+ string_find (List.assoc "Flags" vol_info) "readonly" <> -1
+ with _ -> false
+ )...
2015 Jan 29
0
[PATCH 2/2] sparsify: ignore read-only devices
...* 0x01 is ST_RDONLY in Linux' GNU libc. *)
+ flags <> -1_L && (flags &^ 0x1_L) <> 0_L
+ in
+
List.iter (
fun fs ->
if not (is_ignored fs) then (
@@ -250,6 +257,9 @@ You can ignore this warning or change it to a hard failure using the
if is_readonly_btrfs_snapshot fs "/" then (
if not quiet then
printf (f_"Skipping %s, as it is a read-only btrfs snapshot.\n%!") fs;
+ ) else if is_readonly_device "/" then (
+ if not quiet then
+ printf (f_"Skipping %s, as...