All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev@sgi.com, xfs@oss.sgi.com
Subject: Re: Review: fix block reservation to work with per-cpu counters
Date: Mon, 8 Jan 2007 10:52:03 +0000	[thread overview]
Message-ID: <20070108105203.GA31252@infradead.org> (raw)
In-Reply-To: <20070108061040.GD44411608@melbourne.sgi.com>

On Mon, Jan 08, 2007 at 05:10:40PM +1100, David Chinner wrote:
> Currently, XFS_IOC_SET_RESBLKS will not work properly when
> per-cpu superblock counters are enabled. Reservations can be lost
> silently as they are applied to the incore superblock instead of
> the currently active counters.
> 
> Rather than try to shoe-horn the current reservation code into
> the per-cpu counters or vice-versa, we lock the superblock
> and snap the current counter state and work on that number.
> Once we work out exactly how much we need to "allocate" to
> the reserved area, we drop the lock and call xfs_mod_incore_sb()
> which will do all the right things w.r.t to the counter state.
> 
> If we fail to get as much as we want (i.e. ENOSPC is returned)
> we go back to the start and try to allocate as much of what is
> left.
> 
> Comments?

Sounds okay.  Reservations shouldn't be frequent enough for this
to have a performance impact.

  reply	other threads:[~2007-01-08 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08  6:10 Review: fix block reservation to work with per-cpu counters David Chinner
2007-01-08 10:52 ` Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-01-15 21:31 Kevin Jamieson
2007-01-15 23:47 ` David Chinner
2007-01-16 12:06   ` David Chatterton

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=20070108105203.GA31252@infradead.org \
    --to=hch@infradead.org \
    --cc=dgc@sgi.com \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@oss.sgi.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 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.