public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* review: don't block non-blocking writes when frozen
@ 2007-04-23  0:26 David Chinner
  2007-04-23 21:27 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: David Chinner @ 2007-04-23  0:26 UTC (permalink / raw)
  To: xfs-dev; +Cc: xfs-oss


Prevent nfsds for blocking trying to write to a frozen filesystem
or a filesystem in the process of freezing.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

---
 fs/xfs/linux-2.6/xfs_lrw.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_lrw.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_lrw.c	2007-03-29 19:03:30.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_lrw.c	2007-03-29 19:08:06.262169809 +1000
@@ -684,6 +684,10 @@ xfs_write(
 	io = &xip->i_iocore;
 	mp = io->io_mount;
 
+	if (FILP_DELAY_FLAG(file) && vfs_test_for_freeze(vp->v_vfsp)) {
+		/* so nfsd can return EJUKEBOX to clients during a freeze */
+		return -EAGAIN;
+	}
 	vfs_wait_for_freeze(vp->v_vfsp, SB_FREEZE_WRITE);
 
 	if (XFS_FORCED_SHUTDOWN(mp))

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

end of thread, other threads:[~2007-04-24 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23  0:26 review: don't block non-blocking writes when frozen David Chinner
2007-04-23 21:27 ` Christoph Hellwig
2007-04-23 23:13   ` David Chinner
2007-04-24 14:55     ` Christoph Hellwig

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