[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150203035628.GB454@swordfish>
Date: Tue, 3 Feb 2015 12:56:28 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, Nitin Gupta <ngupta@...are.org>,
Jerome Marchand <jmarchan@...hat.com>,
Ganesh Mahendran <opensource.ganesh@...il.com>
Subject: Re: [PATCH v1 2/2] zram: remove init_lock in zram_make_request
On (02/03/15 12:02), Minchan Kim wrote:
> On Tue, Feb 03, 2015 at 10:54:33AM +0900, Sergey Senozhatsky wrote:
> > On (02/02/15 16:06), Sergey Senozhatsky wrote:
> > > So, guys, how about doing it differently, in less lines of code,
> > > hopefully. Don't move reset_store()'s work to zram_reset_device().
> > > Instead, move
> > >
> > > set_capacity(zram->disk, 0);
> > > revalidate_disk(zram->disk);
> > >
> > > out from zram_reset_device() to reset_store(). this two function are
> > > executed only when called from reset_store() anyway. this also will let
> > > us drop `bool reset capacity' param from zram_reset_device().
> > >
> > >
> > > so we will do in reset_store()
> > >
> > > mutex_lock(bdev->bd_mutex);
> > >
> > > fsync_bdev(bdev);
> > > zram_reset_device(zram);
> > > set_capacity(zram->disk, 0);
> > >
> > > mutex_unlock(&bdev->bd_mutex);
> > >
> > > revalidate_disk(zram->disk);
> > > bdput(bdev);
> > >
> > >
> > >
> > > and change zram_reset_device(zram, false) call to simply zram_reset_device(zram)
> > > in __exit zram_exit(void).
> > >
> >
> > Hello,
> >
> > Minchan, Ganesh, I sent a patch last night, with the above solution.
> > looks ok to you?
>
> Just I sent a feedback.
>
thanks.
yeah, !FMODE_EXCL mode.
how do you want to handle it -- you want to send a separate patch or
you want me to send incremental one-liner and ask Andrew to squash them?
-ss
> >
> > Minchan, I think I'll send my small struct zram clean-up patch after
> > your init_lock patch. what's your opinion?
>
> Good for me.
>
> Thanks.
> --
> Kind regards,
> Minchan Kim
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists