[PATCH] xfs: fix in the setting of logbsize

Ales Novak alnovak at suse.cz
Fri Jul 3 10:09:40 CDT 2015


On 2015-6-7 00:32, Dave Chinner wrote:

> On Fri, Jun 05, 2015 at 06:03:53PM -0500, Eric Sandeen wrote:
>> On 6/5/15 5:22 PM, Dave Chinner wrote:
>>
>>> On Fri, Jun 05, 2015 at 03:28:45PM +0200, Ales Novak wrote:
>>>> However, this rule is only mentioned in the documentation, while it
>>>> could be checked during the mount.
>>>
>>> Where in the documentation is that mentioned?
>>
>> Documentation/filesystems/xfs.txt:
>>
>>   logbsize=value
>>         Set the size of each in-memory log buffer.  The size may be
>>         specified in bytes, or in kilobytes with a "k" suffix.
>>         Valid sizes for version 1 and version 2 logs are 16384 (16k)
>>         and 32768 (32k).  Valid sizes for version 2 logs also
>>         include 65536 (64k), 131072 (128k) and 262144 (256k). The
>>         logbsize must be an integer multiple of the log
>>         stripe unit configured at mkfs time.
>
> Ah, ok. I'll need to look at the history of that, because I think I
> can see what it is intended to mean, but the "power-of-two" sizes
> that are enforced will also enforce the "integer multiple" part,
> too. I think it was more intended for people using wierd stripe
> units (e.g. 96k) to say the equivalent on 2x96k is a valid log
> buffer size. I suspect we need to revisit both the code and the
> documentation here....

So, how will we proceed here? I understand that my patch only somehow 
blindly implements the restriction mentioned in the documentation and that 
proper solution would mean completely reworking these restrictions; 
however I don't like the state where setting seemingly harmless 
option leads to kernel crash (and possibly fs corruption).

While I understand that only playful root would do that.

-- 
Ales Novak



More information about the xfs mailing list