[Top] [All Lists]

Re: Error setting extent size on a directory

To: xfs@xxxxxxxxxxx
Subject: Re: Error setting extent size on a directory
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 17 Jul 2014 02:04:50 -0700
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140714070913.GA29541@xxxxxxxxxxxxxxxxx>
References: <20140714070913.GA29541@xxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Mon, Jul 14, 2014 at 09:09:13AM +0200, Iustin Pop wrote:
> The xfsctl man page says that an extent size should be settable any time
> on a directory, so why would this fail? Looking at the kernel sources,
> I see a number of possible cases where EINVAL is returned:

And no special casing for directories at all..

> So to me this reads as if the di_nextents check can also fail for a
> directory which has extents, contradicting the man page. Which one needs
> to be updated?
> The question arises to if the extent size also applies, then, to
> allocating extents for a directory - instead of just being inherited for
> files (the man page says no).

We're not using the extent size hint on the directory itself.  So to
me it seems we just not check for already allocated blocks if we're
setting the extent size on a directory, but instead maybe make sure
the directory.  What's also a little odd is that we allow setting
the extent size on a directory even if the extent size inherit bit is
not set, which doesn't make much sense to me.

Do you want to prepare a patch to remove the check for directories?
At testcase for xfstests that ensures this works also would be highly

<Prev in Thread] Current Thread [Next in Thread>