linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix zswap init failure behavior
@ 2017-01-24 20:02 Dan Streetman
  2017-01-24 20:02 ` [PATCH 1/3] zswap: disable changing params if init fails Dan Streetman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dan Streetman @ 2017-01-24 20:02 UTC (permalink / raw)
  To: Linux-MM, Andrew Morton
  Cc: Dan Streetman, Seth Jennings, Michal Hocko, Sergey Senozhatsky,
	Minchan Kim, linux-kernel

If zswap fails to initialize itself at boot, it returns error from its
init function; but for built-in drivers, that does not unload them; and
more importantly, it doesn't prevent their sysfs module param interface
from being created.  In this case, changing the compressor or zpool param
will result in a WARNING because zswap didn't expect them to be changed if
initialization failed.

These patches fix that assumption, as well as allowing pool creation after
a failed initialization, if only the zpool and/or compressor creation
failed.

Dan Streetman (3):
  zswap: disable changing params if init fails
  zswap: allow initialization at boot without pool
  zswap: clear compressor or zpool param if invalid at init

 mm/zswap.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 100 insertions(+), 25 deletions(-)

-- 
2.9.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-25 16:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24 20:02 [PATCH 0/3] Fix zswap init failure behavior Dan Streetman
2017-01-24 20:02 ` [PATCH 1/3] zswap: disable changing params if init fails Dan Streetman
2017-01-24 21:24   ` Andrew Morton
2017-01-24 22:12     ` Dan Streetman
2017-01-24 20:02 ` [PATCH 2/3] zswap: allow initialization at boot without pool Dan Streetman
2017-01-25  0:24   ` Sergey Senozhatsky
2017-01-25 16:36     ` Dan Streetman
2017-01-24 20:02 ` [PATCH 3/3] zswap: clear compressor or zpool param if invalid at init Dan Streetman

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).