Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1260663

Re: [PATCH] zram: move init_done check to the beginning of disksize_store

Path csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Geliang Tang <geliangtang@163.com>
Newsgroups linux.kernel
Subject Re: [PATCH] zram: move init_done check to the beginning of disksize_store
Date Mon, 02 Nov 2015 15:00:04 +0100
Message-ID <qqnOs-5Zc-29@gated-at.bofh.it> (permalink)
References <qpFNo-45K-13@gated-at.bofh.it> <qqaxP-6iv-3@gated-at.bofh.it>
X-Original-To Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=06Xvg gAkUNA2WkAVL6YzxjnxZBUTbie0Zquk3rJgxyM=; b=FDmGqsI0aL8ZsbZscbDeL cs3lwUTkUVPgVh12p1e+FrITWS1apduMm/imFSCus+kHd3y5og+OrRzZC7ghj9jk vqUO5I04HcmsLdPYQM5CiYybFUQKmDLBmGmgKKvjIJPe24I+eEiFbGlQ8VgwZd9I Az+Zpb2HKtJrcdA4xtp8ns=
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
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 robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 34
Organization linux.* mail to news gateway
X-Original-Cc Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>, linux-kernel@vger.kernel.org, Geliang Tang <geliangtang@163.com>
X-Original-Date Mon, 2 Nov 2015 21:53:49 +0800
X-Original-Message-ID <20151102135349.GA16606@bogon>
X-Original-References <b159080b26efe0d962dc51144dcafba7cac7af43.1446302806.git.geliangtang@163.com> <20151101234358.GA4783@swordfish>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1260663

Show key headers only | View raw


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 <zram0> 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

--
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/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] zram: move init_done check to the beginning of disksize_store Geliang Tang <geliangtang@163.com> - 2015-10-31 16:00 +0100
  Re: [PATCH] zram: move init_done check to the beginning of  disksize_store Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-02 00:50 +0100
    Re: [PATCH] zram: move init_done check to the beginning of  disksize_store Geliang Tang <geliangtang@163.com> - 2015-11-02 15:00 +0100
      Re: [PATCH] zram: move init_done check to the beginning of  disksize_store Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-03 01:20 +0100

csiph-web