From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Luis Henriques <luis.henriques@canonical.com>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH] zram: don't copy invalid compression algorithms
Date: Tue, 8 Sep 2015 10:33:38 +0900 [thread overview]
Message-ID: <20150908013338.GF6896@swordfish> (raw)
In-Reply-To: <20150908011443.GB19776@bbox>
On (09/08/15 10:14), Minchan Kim wrote:
[..]
> > NACK.
> >
> > This is intentional. We haven't returned 'invalid compression algorithm'
> > error from comp_algorithm_store() historically, so someone's script can
> > simply ignore it. However, the script will fail to init the device and
> > user will be able to figure out the root cause, because zram will report
> > to syslog an actually requested alg name.
> >
> > Example
> >
> > [ 1669.473296] zram: Cannot initialise llzo compressing backend
>
> I don't understand your concern. To me, this patch makes sense to me.
> Could you explain your point clearly, again?
OK. suppose someone landed a typo in a 'zram device management' script
echo llzo > /sys/block/zram0/comp_algorithm
-bash: echo: write error: Invalid argument
but the script ignores 'echo: write error'.
Because we added compression algorithm name check recently.
then the script does
echo 200M > /sys/block/zram0/disksize
-bash: echo: write error: Invalid argument
doing a simple dmesg reveals the problem
[ 7076.657184] zram: Cannot initialise llzo compressing backend
note that zram provides 'llzo' here, which is convenient.
With this change the semantics is changing and zram now swallows
(hides) the user space error.
echo llzo > /sys/block/zram0/comp_algorithm
-bash: echo: write error: Invalid argument
echo 200M > /sys/block/zram0/disksize
instead of using a requested 'llzo' zram for some reason
switched to 'lzo'.
I don't like this behaviour change. User requested to change
the 'default' value, and that new value didn't work out. No
reason to hide it.
-ss
next prev parent reply other threads:[~2015-09-08 1:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 20:48 [PATCH] zram: don't copy invalid compression algorithms Luis Henriques
2015-09-07 23:56 ` Sergey Senozhatsky
2015-09-08 1:14 ` Minchan Kim
2015-09-08 1:33 ` Sergey Senozhatsky [this message]
2015-09-08 1:58 ` Sergey Senozhatsky
2015-09-08 4:50 ` Minchan Kim
2015-09-08 5:04 ` Sergey Senozhatsky
2015-09-08 8:16 ` Minchan Kim
2015-09-08 9:54 ` Sergey Senozhatsky
2015-09-08 13:33 ` Minchan Kim
2015-09-08 13:44 ` Sergey Senozhatsky
2015-09-08 14:21 ` Minchan Kim
2015-09-08 15:35 ` Sergey Senozhatsky
2015-09-08 10:08 ` Luis Henriques
2015-09-08 12:20 ` Sergey Senozhatsky
2015-09-08 5:15 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150908013338.GF6896@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luis.henriques@canonical.com \
--cc=minchan@kernel.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).