Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12188
b: refs/heads/master
c: ee34807
h: refs/heads/master
v: v3
  • Loading branch information
Nathan Scott committed Nov 1, 2005
1 parent 714311d commit 1dcf3f1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c310ab6c071a688e5291028972d1ae8314f67536
refs/heads/master: ee34807a65aa0c5911dc27682863afca780a003e
2 changes: 2 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_fs_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ fs_flush_pages(

if (VN_CACHED(vp)) {
filemap_fdatawrite(ip->i_mapping);
if (flags & XFS_B_ASYNC)
return 0;
filemap_fdatawait(ip->i_mapping);
}

Expand Down
13 changes: 13 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,18 @@ linvfs_show_options(
return error;
}

STATIC int
linvfs_quotasync(
struct super_block *sb,
int type)
{
struct vfs *vfsp = LINVFS_GET_VFS(sb);
int error;

VFS_QUOTACTL(vfsp, Q_XQUOTASYNC, 0, (caddr_t)NULL, error);
return -error;
}

STATIC int
linvfs_getxstate(
struct super_block *sb,
Expand Down Expand Up @@ -934,6 +946,7 @@ STATIC struct super_operations linvfs_sops = {
};

STATIC struct quotactl_ops linvfs_qops = {
.quota_sync = linvfs_quotasync,
.get_xstate = linvfs_getxstate,
.set_xstate = linvfs_setxstate,
.get_xquota = linvfs_getxquota,
Expand Down
7 changes: 5 additions & 2 deletions trunk/fs/xfs/quota/xfs_qm_syscalls.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
Expand Down Expand Up @@ -109,7 +109,7 @@ xfs_qm_quotactl(
vfsp = bhvtovfs(bdp);
mp = XFS_VFSTOM(vfsp);

ASSERT(addr != NULL);
ASSERT(addr != NULL || cmd == Q_XQUOTASYNC);

/*
* The following commands are valid even when quotaoff.
Expand Down Expand Up @@ -147,6 +147,9 @@ xfs_qm_quotactl(
return XFS_ERROR(EROFS);
break;

case Q_XQUOTASYNC:
return (xfs_sync_inodes(mp, SYNC_DELWRI, 0, NULL));

default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ extern int xfs_readsb(xfs_mount_t *mp);
extern void xfs_freesb(xfs_mount_t *);
extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int);
extern int xfs_syncsub(xfs_mount_t *, int, int, int *);
extern int xfs_sync_inodes(xfs_mount_t *, int, int, int *);
extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t);
extern void xfs_xlatesb(void *, struct xfs_sb *, int, __int64_t);

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/xfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ xfs_sync(
* only available by calling this routine.
*
*/
STATIC int
int
xfs_sync_inodes(
xfs_mount_t *mp,
int flags,
Expand Down Expand Up @@ -987,7 +987,7 @@ xfs_sync_inodes(
ipointer = (xfs_iptr_t *)kmem_zalloc(sizeof(xfs_iptr_t), KM_SLEEP);

fflag = XFS_B_ASYNC; /* default is don't wait */
if (flags & SYNC_BDFLUSH)
if (flags & (SYNC_BDFLUSH | SYNC_DELWRI))
fflag = XFS_B_DELWRI;
if (flags & SYNC_WAIT)
fflag = 0; /* synchronous overrides all */
Expand Down

0 comments on commit 1dcf3f1

Please sign in to comment.