xfs
[Top] [All Lists]

Re: flush on sync

To: Daniel Moore <dxm@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: flush on sync
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 13 Apr 2000 10:59:40 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Message from Daniel Moore <dxm@clouds.melbourne.sgi.com> of "Thu, 13 Apr 2000 09:45:06 +1000." <200004122345.JAA66038@clouds.melbourne.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
> 
> Anyone noticed that 'sync' doesn't?
> 
> Just recently I've noticed that 'sync' doesn't flush out changes
> I've made to xfs partitions and that I need to unmount to get
> the changes out to disk.
> 
> I'm running t-o-t with some localised dir1 changes, loading
> xfs, page_buf_locking, page_buf and avl as modules.
> 
> I'm pretty sure it only started yesterday.
> 

Pagebuf meta-data on or off?

We are fudging sync through the write_super method:

void
linvfs_write_super(
        struct super_block *sb)
{
        vfs_t           *vfsp = LINVFS_GET_VFS(sb);
        int             error;
#if !CONFIG_PAGE_BUF_META
        extern void bflush_bufs(dev_t);
#endif


        VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_NOWAIT|SYNC_ATTR,
                sys_cred, error);

#if !CONFIG_PAGE_BUF_META
        bflush_bufs(vfsp->vfs_dev);/* Pretend a bdflush is going off for XFS
                                        specific buffers from xfs_fs_bio.c */
#endif

        sb->s_dirt = 1;  /*  Keep the syncs coming.  */
}

The VFS_SYNC call gets into XFS sync, and would flush dirty data - except that
the test it uses to determine if something is dirty does not work on linux
because we are 

        a) looking at the wrong state (the vnode) and

        b) Linux does not keep track of dirty data at this level.

However, higher up in the sync code there is a call to sync_buffers() which
should find dirty file data.

What is it you do not think is getting synced?

Steve



<Prev in Thread] Current Thread [Next in Thread>