linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>, Nitin Gupta <ngupta@vflare.org>,
	Jerome Marchand <jmarchan@redhat.com>,
	Ganesh Mahendran <opensource.ganesh@gmail.com>
Subject: [PATCH] zram: check bd_openers instead bd_holders
Date: Tue, 3 Feb 2015 13:50:46 +0900	[thread overview]
Message-ID: <20150203045046.GA13771@blaptop> (raw)

On Tue, Feb 03, 2015 at 12:56:28PM +0900, Sergey Senozhatsky wrote:
> 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?

Send a new patch based on yours.
Thanks.

             reply	other threads:[~2015-02-03  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  4:50 Minchan Kim [this message]
2015-02-03  4:53 ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150203045046.GA13771@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=jmarchan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=opensource.ganesh@gmail.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox