>
> 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
|