mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Josef Bacik <josef@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 4/4] Btrfs: add basic DIO read/write support V3
Date: Thu, 13 May 2010 14:39:35 -0400	[thread overview]
Message-ID: <20100513183935.GI27011@dhcp231-156.rdu.redhat.com> (raw)
In-Reply-To: <20100513111136.6986e8cc.akpm@linux-foundation.org>

On Thu, May 13, 2010 at 11:11:36AM -0700, Andrew Morton wrote:
> On Thu, 13 May 2010 14:01:37 -0400
> Josef Bacik <josef@redhat.com> wrote:
> 
> > On Thu, May 13, 2010 at 11:26:39AM -0400, Christoph Hellwig wrote:
> > > On Thu, May 13, 2010 at 11:31:45AM -0400, Josef Bacik wrote:
> > > > AIO's aio_complete does kmap with KM_IRQ0/1 and it gets called in the same
> > > > context as the btrfs completion handler, so if it's ok for aio_complete it
> > > > should be ok for btrfs right?  Thanks,
> > > 
> > > aio_complete does a spin_lock_irqsave before that, which disables
> > > interrupts on the local CPU.
> > > 
> > 
> > Ok how about I just do
> > 
> > local_irq_disable()
> > kmap(KM_IRQ0)
> > local_irq_enable()
> > 
> > would that be acceptable?  Thanks,
> 
> yup.
> 
> local_irq_disable() (or local_irq_save())
> kmap_atomic(KM_IRQx);
> <stuff>
> kunmap_atomic(KM_IRQx);
> local_irq_enable() (or local_irq_restore()).
> 
> then perhaps flush_dcache_page().

Great, thank you, I will fix this up and resend.

Josef

      reply	other threads:[~2010-05-13 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 20:40 Josef Bacik
2010-05-13 15:14 ` Christoph Hellwig
2010-05-13 15:31   ` Josef Bacik
2010-05-13 12:41     ` Andrew Morton
2010-05-13 15:26     ` Christoph Hellwig
2010-05-13 15:43       ` Josef Bacik
2010-05-13 18:01       ` Josef Bacik
2010-05-13 18:11         ` Andrew Morton
2010-05-13 18:39           ` Josef Bacik [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=20100513183935.GI27011@dhcp231-156.rdu.redhat.com \
    --to=josef@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®