All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Josef Bacik <josef@redhat.com>
Cc: 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 11:11:36 -0700	[thread overview]
Message-ID: <20100513111136.6986e8cc.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100513180137.GH27011@dhcp231-156.rdu.redhat.com>

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().

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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 20:40 [PATCH 4/4] Btrfs: add basic DIO read/write support V3 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 [this message]
2010-05-13 18:39           ` Josef Bacik

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=20100513111136.6986e8cc.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=josef@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.