* [PATCH] zram: return EBUSY when max_comp_streams change fails for device in use
@ 2014-08-03 22:48 Sami Kerola
2014-08-04 11:39 ` Sergey Senozhatsky
0 siblings, 1 reply; 2+ messages in thread
From: Sami Kerola @ 2014-08-03 22:48 UTC (permalink / raw)
To: linux-kernel; +Cc: kerolasa, Minchan Kim, Nitin Gupta, Sergey Senozhatsky
Both disksize and comp_algorithm return EBUSY when a change is attempted
to a device in use, and so should max_comp_streams.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 36e54be..0211734 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -139,7 +139,7 @@ static ssize_t max_comp_streams_store(struct device *dev,
if (init_done(zram)) {
if (!zcomp_set_max_streams(zram->comp, num)) {
pr_info("Cannot change max compression streams\n");
- ret = -EINVAL;
+ ret = -EBUSY;
goto out;
}
}
--
2.0.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zram: return EBUSY when max_comp_streams change fails for device in use
2014-08-03 22:48 [PATCH] zram: return EBUSY when max_comp_streams change fails for device in use Sami Kerola
@ 2014-08-04 11:39 ` Sergey Senozhatsky
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2014-08-04 11:39 UTC (permalink / raw)
To: Sami Kerola; +Cc: linux-kernel, Minchan Kim, Nitin Gupta, Sergey Senozhatsky
On (08/03/14 23:48), Sami Kerola wrote:
> Both disksize and comp_algorithm return EBUSY when a change is attempted
> to a device in use, and so should max_comp_streams.
>
> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
> ---
> drivers/block/zram/zram_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 36e54be..0211734 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -139,7 +139,7 @@ static ssize_t max_comp_streams_store(struct device *dev,
> if (init_done(zram)) {
> if (!zcomp_set_max_streams(zram->comp, num)) {
> pr_info("Cannot change max compression streams\n");
> - ret = -EINVAL;
> + ret = -EBUSY;
> goto out;
> }
> }
NACK.
failed zcomp_set_max_streams() has nothing to do with device being busy.
-ss
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-04 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-03 22:48 [PATCH] zram: return EBUSY when max_comp_streams change fails for device in use Sami Kerola
2014-08-04 11:39 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox