From: Eric Sandeen <sandeen@sandeen.net>
To: Shailendra Tripathi <stripathi@agami.com>
Cc: David Chinner <dgc@sgi.com>,
xfs@oss.sgi.com, Timothy Shimmin <tes@sgi.com>
Subject: Re: Data type overflow in xfs_trans_unreserve_and_mod_sb
Date: Mon, 25 Sep 2006 09:32:46 -0500 [thread overview]
Message-ID: <4517E88E.4020809@sandeen.net> (raw)
In-Reply-To: <45179573.3020007@agami.com>
Shailendra Tripathi wrote:
> Hi David,
> As part of fixing xfs_reserve_blocks issue, you might want to
> fix an issue in xfs_trans_unreserve_and_mod_sb as well. Since, I am on
> much older version, my patch is not applicable on newer trees. However,
> the patch is attached for your reference.
>
> The problem is as below:
>
> Superblock modifications required during transaction are stored in delta
> fields in transaction. These fields are applied to the superblock when
> transaction commits.
>
> The in-core superblock changes are done in
> xfs_trans_unreserve_and_mod_sb. It calls xfs_mod_incore_sb_batch
> function to apply the changes. This function tries to apply the deltas
> and if it fails for any reason, it backs out all the changes. One
> typical modification done is like that:
>
> case XFS_SBS_DBLOCKS:
> lcounter = (long long)mp->m_sb.sb_dblocks;
> lcounter += delta;
> if (lcounter < 0) {
> ASSERT(0);
> return (XFS_ERROR(EINVAL));
> }
> mp->m_sb.sb_dblocks = lcounter;
> return (0);
>
> So, when it returns EINVAL, the second part of the code backs out the
> changes made to superblock. However, the worst part is that
> xfs_trans_unreserve_and_mod_sb does not return any error value.
Hm, yep, just ASSERT(error == 0);
I suppose this is the trickiness of canceling a transaction at some points...
> The
> transaction appears to be committed peacefully without returning the
> error. You don't notice this unless you do I/O on the filesystem. Later,
> it hits some sort of in-memory corruption or other errors.
>
> We hit this issue in our testing we tried to grow the filesystem from
> from 100GB to 10000GB. This is beyond the interger (31 bits) limit and,
> hence, for dblocks and fdblocks, xfs_mod_sb struct does not pass in
> correct data.
>
>
First thoughts, "long" won't help on 32 bit machines, perhaps this should be an
explicitly-sized 64-bit type?
-Eric
p.s. good to see agami's recently active participation on the list!
next prev parent reply other threads:[~2006-09-25 14:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-23 13:27 largeio mount and performance impact Sebastian Brings
2006-09-23 16:34 ` Eric Sandeen
2006-09-24 13:41 ` Sebastian Brings
2006-09-24 13:47 ` Sebastian Brings
2006-09-25 8:38 ` Data type overflow in xfs_trans_unreserve_and_mod_sb Shailendra Tripathi
2006-09-25 14:32 ` Eric Sandeen [this message]
2006-09-25 14:52 ` Shailendra Tripathi
2006-10-11 5:25 ` David Chinner
2006-10-13 6:13 ` David Chinner
2006-10-13 8:31 ` Shailendra Tripathi
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=4517E88E.4020809@sandeen.net \
--to=sandeen@sandeen.net \
--cc=dgc@sgi.com \
--cc=stripathi@agami.com \
--cc=tes@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.