Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757573AbbEVNO6 (ORCPT ); Fri, 22 May 2015 09:14:58 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35448 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756420AbbEVNO5 (ORCPT ); Fri, 22 May 2015 09:14:57 -0400 Date: Fri, 22 May 2015 22:14:47 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Marcin Jabrzyk , ngupta@vflare.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kyungmin.park@samsung.com Subject: Re: [PATCH] zram: check compressor name before setting it Message-ID: <20150522131447.GA14922@blaptop> References: <1432283515-2005-1-git-send-email-m.jabrzyk@samsung.com> <20150522085523.GA709@swordfish> <555EF30C.60108@samsung.com> <20150522124411.GA3793@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150522124411.GA3793@swordfish> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1597 Lines: 49 Hello Sergey, On Fri, May 22, 2015 at 09:44:11PM +0900, Sergey Senozhatsky wrote: > On (05/22/15 11:12), Marcin Jabrzyk wrote: > > > > > >no. > > > > > >zram already complains about failed comp backend creation. > > >it's in dmesg (or syslog, etc.): > > > > > > "zram: Cannot initialise %s compressing backend" > > > > > OK, now I see that. Sorry for the noise. > > > > >second, there is not much value in exposing zcomp internals, > > >especially when the result is just another line in dmesg output. > > > > From the other hand, the only valid values that can be written are > > in 'comp_algorithm'. > > So when writing other one, returning -EINVAL seems to be reasonable. > > The user would get immediately information that he can't do that, > > now the information can be very deferred in time. > > it's not. > the error message appears in syslog right before we return -EINVAL > back to user. Although Marcin's description is rather misleading, I like the patch. Every admin doesn't watch dmesg output. Even people could change loglevel simply so KERN_INFO would be void in that case. Instant error propagation is more strighforward for user point of view rather than delaying with depending on another event. Thanks. > > -ss > > > I'm not for exposing more internals, but getting -EINVAL would be nice I -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/