Hi,
fsync() take no effect on XFS filesystem under Linux kernel 2.4.26.
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:
...
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
^^^^^^^^
System:
Linux 2.4.26 (gcc-3.3.3), SuSE 7.3
Asus A7N8X, Adaptec 29160 (7892A), WD Enterprise 4360
(WDE4360-1808A2)
-Sygma
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