Re: What is the meaning of XLOG_MIN_RECORD_BSIZE? (Missing a check?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 caveat​s (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@xxxxxxxxxx / jan@xxxxxxxx

> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux