From: Eric Sandeen <sandeen@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: clean up xfs_set_maxicount & use in growfs
Date: Tue, 25 Feb 2014 20:18:09 -0600 [thread overview]
Message-ID: <530D4EE1.6040601@redhat.com> (raw)
In-Reply-To: <20140226021114.GA26022@infradead.org>
On 2/25/14, 8:11 PM, Christoph Hellwig wrote:
> On Mon, Feb 24, 2014 at 11:27:35PM -0600, Eric Sandeen wrote:
>> xfs_set_maxicount() overflowed fairly easily for large filesystems
>> and large maxicount; we started out by multiplying dblocks by
>> the percentage, *then* dividing by 100, and never checked for
>> an overflow. The calculations were also, IMHO, a little hard
>> to follow.
>
> Would be useful to get this test case into xfstests..
Your'e bot, aren't you. ;)
yeah you're right. I went down this path by starting a testcase
for 3-patches-ago, and got here. That one can be sent soon, and
sure, it'd be worth doing this too.
>> -STATIC void
>> +void
>> xfs_set_maxicount(xfs_mount_t *mp)
>> {
>> xfs_sb_t *sbp = &(mp->m_sb);
>> - __uint64_t icount;
>> + __uint64_t iblocks;
>
> Seems like this could move into the if clause below.
>
>> @@ -388,6 +388,7 @@ extern int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *,
>> extern int xfs_mount_log_sb(xfs_mount_t *, __int64_t);
>> extern struct xfs_buf *xfs_getsb(xfs_mount_t *, int);
>> extern int xfs_readsb(xfs_mount_t *, int);
>> +void xfs_set_maxicount(xfs_mount_t *mp);
>> extern void xfs_freesb(xfs_mount_t *);
>> extern int xfs_fs_writable(xfs_mount_t *);
>> extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);
>
> A missing extern while all other prototypes around it have one seems
> rather odd.
Sure does!
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-26 2:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 5:27 [PATCH] xfs: clean up xfs_set_maxicount & use in growfs Eric Sandeen
2014-02-26 2:11 ` Christoph Hellwig
2014-02-26 2:18 ` Eric Sandeen [this message]
2014-02-26 18:29 ` Eric Sandeen
2014-02-27 7:11 ` Dave Chinner
2014-02-27 14:08 ` Eric Sandeen
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=530D4EE1.6040601@redhat.com \
--to=sandeen@redhat.com \
--cc=hch@infradead.org \
--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.