On Thu, Dec 04, 2014 at 05:14:26AM +0100, Iustin Pop wrote:
> Currently, the ioctl handling code for XFS_IOC_FSSETXATTR treats all
> targets as regular files: it refuses to change the extent size if
> extents are allocated. This is wrong for directories, as there the
> extent size is only used as a default for children.
> The patch fixes this issue and improves validation of flag
> - only disallow extent size changes after extents have been allocated
> for regular files
> - only allow XFS_XFLAG_EXTSIZE for regular files
> - only allow XFS_XFLAG_EXTSZINHERIT for directories
> - automatically clear the flags if the extent size is zero
> Thanks to Dave Chinner for guidance on the proper fix for this issue.
I'll have to remind myself of the context again - I think I have
some patches in my local queue that I never finished that kill a lot
of the mess around this code. I put that at the head of next week's
> Signed-off-by: Iustin Pop <iustin@xxxxxxxxx>
> Trying to revive this fix. Note that this patch is on top of
> git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git master, which
> seems to have no commits since Oct 26; let me know if I should rebase it on
> top of something else.
That's the right tree+branch to base dev patches on. I'll commit it
to a topic branch based on linux-xfs/master unless it has
dependencies on patches in other topic branches. Mostly you do not
need to worry about that. If you want to see the latest development
snapshot, then use the for-next branch (note: for-next gets rebased
if necessary). I normally develop against linux-xfs/master, then
merge into linux-xfs/for-next for integration testing....