[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-xfs
Subject: [PATCH 01/14] xfs: untange SYNC_WAIT and SYNC_TRYLOCK meanings for
From: Christoph Hellwig <hch () infradead ! org>
Date: 2011-08-31 20:36:48
Message-ID: 20110831203818.174153927 () bombadil ! infradead ! org
[Download RAW message or body]
Only skip pinned dquots if SYNC_TRYLOCK is specified, and adjust the callers
to keep the behaviour unchanged.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs/fs/xfs/xfs_dquot.c
===================================================================
--- xfs.orig/fs/xfs/xfs_dquot.c 2011-08-29 14:27:43.171545891 +0200
+++ xfs/fs/xfs/xfs_dquot.c 2011-08-29 14:28:00.308211691 +0200
@@ -1166,7 +1166,7 @@ xfs_qm_dqflush(
* If not dirty, or it's pinned and we are not supposed to block, nada.
*/
if (!XFS_DQ_IS_DIRTY(dqp) ||
- (!(flags & SYNC_WAIT) && atomic_read(&dqp->q_pincount) > 0)) {
+ ((flags & SYNC_TRYLOCK) && atomic_read(&dqp->q_pincount) > 0)) {
xfs_dqfunlock(dqp);
return 0;
}
Index: xfs/fs/xfs/xfs_dquot_item.c
===================================================================
--- xfs.orig/fs/xfs/xfs_dquot_item.c 2011-08-29 14:28:26.114877052 +0200
+++ xfs/fs/xfs/xfs_dquot_item.c 2011-08-29 14:29:06.194875023 +0200
@@ -134,7 +134,7 @@ xfs_qm_dquot_logitem_push(
* lock without sleeping, then there must not have been
* anyone in the process of flushing the dquot.
*/
- error = xfs_qm_dqflush(dqp, 0);
+ error = xfs_qm_dqflush(dqp, SYNC_TRYLOCK);
if (error)
xfs_warn(dqp->q_mount, "%s: push error %d on dqp %p",
__func__, error, dqp);
Index: xfs/fs/xfs/xfs_qm.c
===================================================================
--- xfs.orig/fs/xfs/xfs_qm.c 2011-08-29 14:28:26.131543717 +0200
+++ xfs/fs/xfs/xfs_qm.c 2011-08-29 14:30:29.704870793 +0200
@@ -1660,7 +1660,7 @@ xfs_qm_quotacheck(
* successfully.
*/
if (!error)
- error = xfs_qm_dqflush_all(mp, 0);
+ error = xfs_qm_dqflush_all(mp, SYNC_TRYLOCK);
/*
* We can get this error if we couldn't do a dquot allocation inside
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic