public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* review: fix remount vs barrier options
@ 2006-07-21  5:28 Nathan Scott
  2006-07-21  6:25 ` Timothy Shimmin
  2006-07-23 19:06 ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Nathan Scott @ 2006-07-21  5:28 UTC (permalink / raw)
  To: xfs; +Cc: jeremy

Hi,

Jeremy has had me scratching my head for a few days trying to
figure out how the SCSI traces he's looking at can still show
signs of write barriers being issued to the device, despite a
"remount,nobarrier" having been done.

It finally clicked that we are not clearing the buffer flag
from a previously written log buffer, even though we'll no
longer set a new flag into a buffer (due to the mount flag
being cleared), so we _can_ still issue barrier writes when
remounted without barriers.

This was made more complicated by the way a freshly mounted
filesystem with 8 log buffers wouldn't show up the problem,
since we have to slowly cycle through the "clear" log buffers
before we see the bug.  This seems like the simplest fix...

(Hmmm, actually, I wonder if this will also resolve the quota
log I/O problem that was reported the other day too).

-- 
Nathan


Index: xfs-linux/xfs_log.c
===================================================================
--- xfs-linux.orig/xfs_log.c	2006-07-21 08:55:24.520992250 +1000
+++ xfs-linux/xfs_log.c	2006-07-21 09:47:08.429216000 +1000
@@ -1471,6 +1471,8 @@ xlog_sync(xlog_t		*log,
 	 */
 	if (log->l_mp->m_flags & XFS_MOUNT_BARRIER)
 		XFS_BUF_ORDERED(bp);
+	else
+		XFS_BUF_UNORDERED(bp);
 
 	ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1);
 	ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize);
@@ -1503,6 +1505,8 @@ xlog_sync(xlog_t		*log,
 		XFS_BUF_ASYNC(bp);
 		if (log->l_mp->m_flags & XFS_MOUNT_BARRIER)
 			XFS_BUF_ORDERED(bp);
+		else
+			XFS_BUF_UNORDERED(bp);
 		dptr = XFS_BUF_PTR(bp);
 		/*
 		 * Bump the cycle numbers at the start of each block

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-25 22:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-21  5:28 review: fix remount vs barrier options Nathan Scott
2006-07-21  6:25 ` Timothy Shimmin
2006-07-23 19:06 ` Christoph Hellwig
2006-07-24  0:01   ` Nathan Scott
2006-07-24  1:27     ` Nathan Scott
2006-07-25  9:44       ` Christoph Hellwig
2006-07-25 22:21         ` Nathan Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox