From: Iustin Pop <iustin@k1024.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: fix behaviour of XFS_IOC_FSSETXATTR on directories
Date: Fri, 5 Dec 2014 06:49:46 +0100 [thread overview]
Message-ID: <20141205054946.GA24934@teal.hq.k1024.org> (raw)
In-Reply-To: <20141205001148.GS9561@dastard>
On Fri, Dec 05, 2014 at 11:11:48AM +1100, Dave Chinner wrote:
> 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
> > combinations:
> >
> > - 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
> queue...
Yep, I had forgotten myself what was the status, and had to reread
through the old email thread. That's what happens when you leave a patch
"rot" for so long :)
And yes, the code in this function is a bit hard to follow, since the
various checks are spread around. Cleaning this up would be good; I only
care that when next time I run an xfsrestore, it won't fail to set the
extent sizes correctly on directories :)
thanks!
iustin
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-12-05 5:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 7:09 Error setting extent size on a directory Iustin Pop
2014-07-17 9:04 ` Christoph Hellwig
2014-07-18 19:13 ` Iustin Pop
2014-08-28 4:22 ` [PATCH] xfs: fix behaviour of XFS_IOC_FSSETXATTR on directories Iustin Pop
2014-08-28 9:31 ` Dave Chinner
2014-08-28 22:34 ` Iustin Pop
2014-08-29 0:46 ` Dave Chinner
2014-12-04 4:14 ` Iustin Pop
2014-12-05 0:11 ` Dave Chinner
2014-12-05 5:49 ` Iustin Pop [this message]
2014-08-28 4:24 ` [PATCH xfstests] xfs: add tests for XFS_IOC_FSSETXATTR behaviour Iustin Pop
2014-08-28 10:16 ` Dave Chinner
2014-08-28 22:28 ` Iustin Pop
2014-08-29 2:52 ` Dave Chinner
2014-12-04 4:20 ` [PATCH] xfs: add test " Iustin Pop
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=20141205054946.GA24934@teal.hq.k1024.org \
--to=iustin@k1024.org \
--cc=david@fromorbit.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