consequences of XFS_IOC_FSSETXATTR on non-empty file?

Dave Chinner david at fromorbit.com
Mon Jul 14 15:23:31 CDT 2014


On Mon, Jul 14, 2014 at 11:24:05AM +0400, Ilya Dryomov wrote:
> On Mon, Jul 14, 2014 at 2:55 AM, Dave Chinner <david at fromorbit.com> wrote:
> > On Sun, Jul 13, 2014 at 09:01:13PM +0400, Ilya Dryomov wrote:
> >> On Sun, Jul 13, 2014 at 5:48 AM, Samuel Just <sam.just at inktank.com> wrote:
> >> I think if you call fsync() or even
> >> fdatasync() before close(fd), it will fail as expected.
> >
> > Only if you are trying to change the extent size immediately after
> > the first write you do to an empty file. Which is, as per the above,
> > not the recommended or intended use of the ioctl.
> 
> That's understood, but that is exactly what Sam's test program happens
> to try to do, so I had to point the "file w/o real extents" thing out.

Oh, I missed that there was a test program attached. That's what
happens when people top post a reply then attach text at the
bottom....

Moral of the story: don't top post ;)

Cheersm

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list