From: Brian Foster <bfoster@redhat.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: What is the meaning of XLOG_MIN_RECORD_BSIZE? (Missing a check?)
Date: Fri, 19 Feb 2016 10:43:49 -0500 [thread overview]
Message-ID: <20160219154347.GA27263@bfoster.bfoster> (raw)
In-Reply-To: <CACj3i70osVyt=QTTqoqKGttwNC8w7Gtq479-Nk-icQrDn83hCA@mail.gmail.com>
On Fri, Feb 19, 2016 at 02:34:52PM +0100, Jan Tulak wrote:
> Hi guys,
>
> what is the meaning of XLOG_MIN_RECORD_BSIZE in libxfs/xfs_log_format.h?
> It is not used anywhere. I thought it might be related to -l su/sunit
> option, but seeing tests with -l su=4096 (the macro is set to 16k), it
> looks more like a forgotten value.
>
It's the minimum log buffer size allowed in the kernel. It's used in
xfs_super.c at mount time to validate the logbsize option:
if (mp->m_logbsize != -1 &&
mp->m_logbsize != 0 &&
(mp->m_logbsize < XLOG_MIN_RECORD_BSIZE ||
mp->m_logbsize > XLOG_MAX_RECORD_BSIZE ||
!is_power_of_2(mp->m_logbsize))) {
xfs_warn(mp,
"invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]",
mp->m_logbsize);
return -EINVAL;
}
I suspect it's not relevant in userspace.
> There is no check for a minimal value, so I can do -l su=1 (or su=0). Are
> there some caveats (other than performance) with such a small value? Can
> it be that we are missing a check? Because
> XLOG_BIG_RECORD_BSIZE
> and XLOG_MAX_RECORD_BSIZE are used and the upper bound is limited...
>
On a quick test, it looks like mkfs just ignores certain log stripe unit
values that aren't block aligned. I'd probably expect this to behave
similar to the '-d su' option and complain about invalid input..?
Brian
>
> Thanks.
>
> Cheers,
> Jan
>
> --
> Jan Tulak
> jtulak@redhat.com / jan@tulak.me
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-02-19 15:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 13:34 What is the meaning of XLOG_MIN_RECORD_BSIZE? (Missing a check?) Jan Tulak
2016-02-19 15:43 ` Brian Foster [this message]
2016-02-19 16:16 ` Jan Tulak
2016-02-19 16:29 ` Brian Foster
2016-02-21 23:18 ` Dave Chinner
2016-02-22 8:38 ` Jan Tulak
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=20160219154347.GA27263@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=jtulak@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