Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946115AbbEVNeo (ORCPT ); Fri, 22 May 2015 09:34:44 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:64926 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946097AbbEVNek (ORCPT ); Fri, 22 May 2015 09:34:40 -0400 X-AuditID: cbfec7f5-f794b6d000001495-83-555f306dade5 Message-id: <555F306C.7080704@samsung.com> Date: Fri, 22 May 2015 15:34:36 +0200 From: Marcin Jabrzyk Organization: Samsung R&D Institute Poland User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: Minchan Kim , Sergey Senozhatsky Cc: 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 References: <1432283515-2005-1-git-send-email-m.jabrzyk@samsung.com> <20150522085523.GA709@swordfish> <555EF30C.60108@samsung.com> <20150522124411.GA3793@swordfish> <20150522131447.GA14922@blaptop> In-reply-to: <20150522131447.GA14922@blaptop> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWRmVeSWpSXmKPExsVy+t/xq7p5BvGhBpOdLc42vWG3uLxrDpvF vTX/WS2WfX3PbrGhZRa7xaMJk5gc2Dx2zrrL7rFpVSebx6ZPk9g9+rasYvTY+Wkzq8fnTXIB bFFcNimpOZllqUX6dglcGf0nX7AWfOSraDl8nKmB8Q13FyMnh4SAicSVww/YIWwxiQv31rN1 MXJxCAksZZRY0f+MBcJ5xijRdfIKE0gVr4CWxJfdq8BsFgFViVuLdgMVcXCwCehInF+tARLm BypZ03QdLCwqECHRfaISolNQ4sfkeywgtohAnMT1GS+YQWxmgRSJjguH2EBsYQEniV+3m5gg 1p5klJjUdAmsgVNAV2Lzqy8sEA22Egver4Oy5SU2r3nLPIFRcBaSHbOQlM1CUraAkXkVo2hq aXJBcVJ6rpFecWJucWleul5yfu4mRkjof93BuPSY1SFGAQ5GJR5eg4NxoUKsiWXFlbmHGCU4 mJVEeBcKx4cK8aYkVlalFuXHF5XmpBYfYpTmYFES5525632IkEB6YklqdmpqQWoRTJaJg1Oq gXHR7YKNuv5njnAkcekKrnzTFKZyXPhLTuU3w10uUvdU9AS3MYlkG/cvUGiYxS3StPNW+Zlj Rk0OVZG1j0wnnmQK6L+27uGhT9O6+p5cZ3aUVZ39WUP/tvMJldn3PJ9b3zGf9eTGFg19RU+n 86tkrlqFTlpw+87llPBly5ac9bRtZk469qqay1uJpTgj0VCLuag4EQCRKeGxeQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2090 Lines: 67 Hello Minchan, On 22/05/15 15:14, Minchan Kim wrote: > 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. Sorry for being confusing, at the first time I've overlooked that error message in syslog. I didn't thought about looking for handling exactly this error in completely different place. > > Instant error propagation is more strighforward for user point of view > rather than delaying with depending on another event. Yes this was my exact motivation. Instant value can be detected in scripts etc. Easier to debug in automated environment. > > Thanks. > >> >> -ss >> >>> I'm not for exposing more internals, but getting -EINVAL would be nice I > If this would be ok, I can prepare v2 with better description and with less exposing zcomp internals. Best regards, Marcin Jabrzyk -- 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/