[systemd-devel] [PATCH] udev: Adding zram to inappropriate block device

Alexander E. Patrakov patrakov at gmail.com
Sun Feb 2 05:39:07 PST 2014


02.02.2014 19:29, Jóhann B. Guðmundsson wrote:
> ---
>   rules/60-persistent-storage.rules | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
> index a4d009a..154ffd9 100644
> --- a/rules/60-persistent-storage.rules
> +++ b/rules/60-persistent-storage.rules
> @@ -14,7 +14,7 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
>   SUBSYSTEM!="block", GOTO="persistent_storage_end"
>
>   # skip rules for inappropriate block devices
> -KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*", GOTO="persistent_storage_end"
> +KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*|zram*", GOTO="persistent_storage_end"
>
>   # ignore partitions that span the entire disk
>   TEST=="whole_disk", GOTO="persistent_storage_end"
>

The patch is obviously harmless. However, I am not convinced that it is 
needed, because in my setup (without this patch) there are no links in 
/dev/disk pointing to any zram device. You can change my opinion by 
providing configuration files that do result in such links being created 
by systemd.

See 
http://lists.freedesktop.org/archives/systemd-devel/2014-February/016614.html 
for my configuration files.

<offtopic>
One patch that would be useful, however, is to make systemd say "this 
system cannot hibernate" if all swap devices are zrams.
</offtopic>

-- 
Alexander E. Patrakov


More information about the systemd-devel mailing list