Re: XFS fsync() doesn't work under 2.4.26

From: Nathan Scott
Date: Mon Apr 26 2004 - 20:03:33 EST


On Fri, Apr 23, 2004 at 05:41:52PM +0200, Szima G?bor wrote:
>
> Hi,

Hi there.

> fsync() take no effect on XFS filesystem under Linux kernel 2.4.26.

I'll look into it. Note your test below isn't quite showing that;
what you want to do is do your writes, fsync, and then immediately
pull the plug on fsync completion - if all the data isn't on disk,
or the updates to the inode itself haven't been completed, then we
have a problem (barring write caching caveats, etc).

Having said that, the XFS flush time there seems too small - I'll
audit the code and run tests to check if we're flushing everything
out we that we should be.

> Simple open-write-fsync-close test:
>
> ltrace -t /tmp/synctest:
> ...
> 0.002144 write(3, "", 1048576) = 1048576
> 0.002150 write(3, "", 1048576) = 1048576
> 0.002154 fsync(3, 0xbfeff684, 0x00100000, 0, 0) = 0
> 0.015962 close(3) = 0
> ^^^^^^^^
>
> (64 x 1 MB data, ~8 MB/s disk write speed)
>
>
> Under 2.4.25 or on other fs working fine:

Are you saying here that XFS on 2.4.25 shows this larger time,
as well as another filesystem? (i.e. just 2.4.26 XFS differs?)

> ...
> 0.002149 write(3, "", 1048576) = 1048576
> 0.002744 write(3, "", 1048576) = 1048576
> 0.002188 fsync(3, 0xbfeff664, 0x00100000, 0, 0) = 0
> 8.048844 close(3) = 0
> ^^^^^^^^

thanks.

--
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/