public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Scott <nscott@aconex.com>
To: "Raz Ben-Jehuda(caro)" <raziebe@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: [DISCUSS] xfs allocation bitmap method over linux raid
Date: Tue, 30 Jan 2007 08:49:43 +1100	[thread overview]
Message-ID: <1170107383.18017.245.camel@edge> (raw)
In-Reply-To: <1170020997.18017.236.camel@edge>

On Mon, 2007-01-29 at 08:49 +1100, Nathan Scott wrote:
> prealloc shouldn't be zero for writes that will extend the file size;
> but now that I think about it, I'm not sure how it could ever get set
> for a buffered write (delalloc), since by the time we come to do the
> actual allocation and writes to disk, the inode size will be beyond
> the allocation offset.  Hmm, maybe the logic in there needs a rethink
> (any thoughts there, Dave/Lachlan?)

I had a closer look, and remember now how this works - I was looking
in the wrong place entirely.  For real (not delayed) allocations, the
stripe alignment is performed within the allocator, so deep down in
the xfs_bmapi -> xfs_bmap_alloc -> xfs_bmap_btalloc call path.

In particular, see the big comment mid-way through xfs_bmap_btalloc..

         * If we are not low on available data blocks, and the
         * underlying logical volume manager is a stripe, and
         * the file offset is zero then try to allocate data
         * blocks on stripe unit boundary.
         * NOTE: ap->aeof is only set if the allocation length
         * is >= the stripe unit and the allocation offset is
         * at the end of file.

(the "file offset is zero" part seems misleading to me, since it
is not only aligning in that case).

So, the real answer to your "why isn't it aligning" question lies
in there - if you can instrument that code and figure out why you
aren't seeing allocation alignment adjustnments inside there, you
should be 99% of the way to understanding your problem.

cheers.

-- 
Nathan

  reply	other threads:[~2007-01-29 21:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24  6:34 [DISCUSS] xfs allocation bitmap method over linux raid Raz Ben-Jehuda(caro)
2007-01-24 22:38 ` Nathan Scott
2007-01-28 10:32   ` Raz Ben-Jehuda(caro)
2007-01-28 21:49     ` Nathan Scott
2007-01-29 21:49       ` Nathan Scott [this message]
2007-01-28 23:52     ` David Chinner
2007-01-24 22:58 ` David Chinner

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=1170107383.18017.245.camel@edge \
    --to=nscott@aconex.com \
    --cc=raziebe@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox