linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@mcmartin.ca>
To: Nick Piggin <npiggin@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>, linux-fsdevel@vger.kernel.org
Subject: Re: [patch] brd: support discard
Date: Thu, 27 May 2010 07:28:05 -0400	[thread overview]
Message-ID: <20100527112805.GD28492@bombadil.infradead.org> (raw)
In-Reply-To: <20100526133342.GA22536@laptop>

On Wed, May 26, 2010 at 11:33:42PM +1000, Nick Piggin wrote:
> +static void discard_from_brd(struct brd_device *brd,
> +			sector_t sector, size_t n)
> +{
> +	while (n >= PAGE_SIZE) {
> +		/*
> +		 * Don't want to actually discard pages here because
> +		 * re-allocating the pages can result in writeback
> +		 * deadlocks under heavy load.
> +		 */
> +		if (0)
> +			brd_free_page(brd, sector);
> +		else
> +			brd_zero_page(brd, sector);

That if (0) looks a little suspicious... ;-)

regards, Kyle

      parent reply	other threads:[~2010-05-27 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 13:33 [patch] brd: support discard Nick Piggin
2010-05-26 13:40 ` Jens Axboe
2010-05-26 13:58   ` Nick Piggin
2010-05-27 11:28 ` Kyle McMartin [this message]

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=20100527112805.GD28492@bombadil.infradead.org \
    --to=kyle@mcmartin.ca \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=npiggin@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).