[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-xfs
Subject:    Re: XFS fsync() doesn't work under 2.4.26
From:       Nathan Scott <nathans () sgi ! com>
Date:       2004-04-27 1:00:11
Message-ID: 20040427110011.A604510 () wobbly ! melbourne ! sgi ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic