From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Salah Triki <salah.triki@acm.org>,
ngupta@vflare.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] zram: Replace pr_* with dev_*
Date: Mon, 10 Aug 2015 10:25:27 +0900 [thread overview]
Message-ID: <20150810012527.GC645@swordfish> (raw)
In-Reply-To: <20150807145856.GB32614@blaptop>
On (08/07/15 23:58), Minchan Kim wrote:
[..]
> > note the prefix 'zram:' became 'block zram0:'
>
> It would be better because it's more clear if we can make several
> blocks.
in that case I'd rather prefer to add zram%d to some of the existing
messages, than mix pr_* with dev_*. besides, 'block zram0:' is a bit
too long, a short 'zram0:' looks better.
well... we already return -errno from every path that does interact
with user space, which is (I think) good enough; adding device_ids
to those 'error return paths' may be OK.
for example. suppose zram is a swap device and we have !handle case
handle = zs_malloc(meta->mem_pool, clen);
if (!handle) {
pr_info("Error allocating memory for compressed page: %u, size=%zu\n",
index, clen);
ret = -ENOMEM;
goto out;
}
if zs_malloc() failed, then the system is in such big troubles, that
device_id in the message is the last thing anyone will look at.
so I'm skeptical. the benefit is sort of minimal.
[..]
> >
> > where %d is a supplied max_comp_stream value
> >
> > From: "Can't change algorithm for initialized device\n"
> > To: "Can't change algorithm to %s for initialized device\n"
>
> It's okay but hope to have prefix "block zram0"
it's not ok. I haven't tested it, but I think that the error message
is broken. the supplied string most likely will contain trailing
\n (I think people usually use echo, not echo -n), so it will be:
Can't change algorithm to XXX
for initialized device
... haven't tested.
BUT why would compression algorithm name even matter here?? the error
is 'you attempted to configure _an already configured device_', not
'you attempted to configure an already configured device _with XXX_'.
that XXX part is not relevant here, 'already configured device' is.
-ss
prev parent reply other threads:[~2015-08-10 1:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 22:57 [PATCH 0/3] zram: Replace pr_* with dev_* Salah Triki
2015-08-06 23:03 ` [PATCH 1/3] zram: Replace pr_info with dev_info in max_comp_streams_store Salah Triki
2015-08-06 23:03 ` [PATCH 2/3] zram: Replace pr_info with dev_info in comp_algorithm_store Salah Triki
2015-08-06 23:03 ` [PATCH 3/3] zram: Replace pr_* with dev_* Salah Triki
2015-08-07 0:05 ` [PATCH 0/3] " Sergey Senozhatsky
2015-08-07 1:17 ` Joe Perches
2015-08-07 1:42 ` Sergey Senozhatsky
2015-08-07 1:48 ` Joe Perches
2015-08-07 2:03 ` Sergey Senozhatsky
2015-08-07 2:16 ` Sergey Senozhatsky
2015-08-07 6:05 ` Minchan Kim
2015-08-07 6:37 ` Sergey Senozhatsky
2015-08-07 6:56 ` Sergey Senozhatsky
2015-08-07 7:12 ` Joe Perches
2015-08-07 7:25 ` Sergey Senozhatsky
2015-08-07 14:58 ` Minchan Kim
2015-08-10 1:25 ` Sergey Senozhatsky [this message]
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=20150810012527.GC645@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=salah.triki@acm.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.