From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] mkfs: inode/block size error messages confusing
Date: Thu, 7 May 2015 08:07:52 +1000 [thread overview]
Message-ID: <20150506220752.GF4327@dastard> (raw)
In-Reply-To: <20150506113615.GA5021@laptop.bfoster>
On Wed, May 06, 2015 at 07:36:15AM -0400, Brian Foster wrote:
> On Wed, May 06, 2015 at 08:48:46AM +1000, Dave Chinner wrote:
> >
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > As reported by Brain:
> >
> > # ./mkfs/mkfs.xfs -f /dev/test/scratch -b size=512
> > illegal inode size 512
> > allowable inode size with 512 byte blocks is 256
> > # ./mkfs/mkfs.xfs -f /dev/test/scratch -b size=512 -i size=256
> > Minimum inode size for CRCs is 512 bytes
> > Usage: mkfs.xfs
> > ...
> >
> > Fix mkfs to catch the block size as being too small, rather than
> > leaving it for inode size detection to enforce.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
....
> > + if (crcs_enabled && blocksize < XFS_MIN_CRC_BLOCKSIZE) {
> > + fprintf(stderr,
> > +_("Minimum block size for CRC enabled filesystems is %d bytes.\n"),
> > + XFS_MIN_CRC_BLOCKSIZE);
> > + usage();
> > + }
>
> I'd move this down by the crc inode size check a page or so down since
> we already have a crcs_enabled block there (the error messages could
> also be made more uniform I suppose). Otherwise looks good, thanks!
Heh, I put it there to be with the other block size validity checks,
and I made the error message consistent with the inode size error
message:
$ mkfs.xfs -N -i size=256 /dev/ram1
Minimum inode size for CRCs is 512 bytes
Usage: mkfs.xfs
....
I can move it about and change it, but swings and roundabouts,
really ;)
> Reviewed-by: Brian Foster <bfoster@redhat.com>
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-05-06 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 3:52 [V2] mkfs: default to CRC enabled filesystems Dave Chinner
2015-05-05 14:28 ` Brian Foster
2015-05-05 22:48 ` [PATCH] mkfs: inode/block size error messages confusing Dave Chinner
2015-05-06 11:36 ` Brian Foster
2015-05-06 22:07 ` Dave Chinner [this message]
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=20150506220752.GF4327@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.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