From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753332AbbKBNzy (ORCPT ); Mon, 2 Nov 2015 08:55:54 -0500 Received: from m50-132.163.com ([123.125.50.132]:34660 "EHLO m50-132.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbbKBNzx (ORCPT ); Mon, 2 Nov 2015 08:55:53 -0500 Date: Mon, 2 Nov 2015 21:53:49 +0800 From: Geliang Tang To: Sergey Senozhatsky Cc: Minchan Kim , Nitin Gupta , linux-kernel@vger.kernel.org, Geliang Tang Subject: Re: [PATCH] zram: move init_done check to the beginning of disksize_store Message-ID: <20151102135349.GA16606@bogon> References: <20151101234358.GA4783@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151101234358.GA4783@swordfish> User-Agent: Mutt/1.5.24 (2015-08-30) X-CM-TRANSID: DNGowEBZ9lTtajdWM3VoAw--.157S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrZFWfKr1DurW3JF4DWr1kGrg_yoWkJFb_uF W0y3y8Gw1kXFWDt3yftrW5JrnrKrWUtr48ZryrXr1fCrWfX397GFW8ur1fur1fGa9FyFWk AFyruryUZ3sagjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbMa0tUUUUU== X-Originating-IP: [116.77.131.23] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiJROmmVUL735VKAAAs7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2015 at 08:43:58AM +0900, Sergey Senozhatsky wrote: > On (10/31/15 22:50), Geliang Tang wrote: > > > > If we set disksize when disksize has been set, we will get the following > > error report: "write error: Cannot allocate memory". This is because > > disksize_store fails at zram_meta_alloc. > > Those things are not connected, absolutely. zram_meta_alloc() can fail > even on un-initialized device. In any case disksize_store() does not end > up changing the state of the device and reports the error back, so I don't > see any real value in this change. Seems that we come across this change > something like once a year (this patch is not the first). Thanks for your reply. zram_meta_alloc() always fails on initialized device at debugfs_create_dir(): debugfs dir creation failed zram: Error creating memory pool I think we should deal with this error. > > I believe it has to stay the way it is, see https://lkml.org/lkml/2014/2/27/674 Unlike above, this patch did not call zram_meta_alloc() in lock. So it would not cause the deed lock problem. Geliang Tang