linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyungmin Park <kmpark@infradead.org>
To: Chris Mason <chris.mason@oracle.com>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] block: fix DISCARD_BARRIER requests
Date: Fri, 18 Jun 2010 22:29:09 +0900	[thread overview]
Message-ID: <AANLkTimfXMhcwWrps23MCEFIGWbmAeqv5NEN8OhMQ4sL@mail.gmail.com> (raw)
In-Reply-To: <20100617192217.GT27466@think>

On Fri, Jun 18, 2010 at 4:22 AM, Chris Mason <chris.mason@oracle.com> wrote:
> On Thu, Jun 17, 2010 at 06:54:53PM +0200, Christoph Hellwig wrote:
>> On Thu, Jun 17, 2010 at 10:10:18AM +0200, Jens Axboe wrote:
>> > Thanks, applied. There was a recent problem report on btrfs using
>> > discard, could possibly explain it if Chris assumed it was a full
>> > barrier.
>>
>> We actually have a much bigger issue with the DISCARD_BARRIER type.
>> If the discard request needs to get split into multiple smaller ones
>> we don't keep the queue drained atomically around them, so requests
>> could sneak inbetween them.  Depending on how the realtime discard
>> is implemented that could cause issues.  In my XFS prototype for it
>> I only deleted the extents from the tracking betree after the discard
>> request has returned, but other filesystems rely on full barrier
>> semantics of DISCARD_BARRIER this could cause real problems.
>
> btrfs needs to know that a write after the discard returns won't cross
> the discard, but beyond that we're happy with anything.

I tested btrfs on MMC with discard support and get failed. you can
find a scenario and details at btrfs mailing list.
I'll check it with this patch.
Please note that MMC don't have any queue at internal as SSD.

Thank you,
Kyungmin Park
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-06-18 13:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17  7:54 [PATCH] block: fix DISCARD_BARRIER requests Christoph Hellwig
2010-06-17  8:10 ` Jens Axboe
2010-06-17 11:49   ` Matthew Wilcox
2010-06-17 12:06     ` Jens Axboe
2010-06-17 16:54   ` Christoph Hellwig
2010-06-17 19:22     ` Chris Mason
2010-06-18 13:29       ` Kyungmin Park [this message]
2010-06-19  2:22         ` Kyungmin Park
2010-06-18 15:29       ` Jamie Lokier
2010-06-18 20:30         ` Chris Mason

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=AANLkTimfXMhcwWrps23MCEFIGWbmAeqv5NEN8OhMQ4sL@mail.gmail.com \
    --to=kmpark@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=chris.mason@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).