* review: don't block non-blocking setattr when frozen
@ 2007-04-23 0:31 David Chinner
2007-04-23 21:27 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: David Chinner @ 2007-04-23 0:31 UTC (permalink / raw)
To: xfs-dev; +Cc: xfs-oss
Prevent nfsds from blocking doing on setattr calls (i.e. truncates)
when the filesystem is frozen or being frozen.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
---
fs/xfs/xfs_vnodeops.c | 6 ++++++
1 file changed, 6 insertions(+)
Index: 2.6.x-xfs-new/fs/xfs/xfs_vnodeops.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_vnodeops.c 2007-01-31 13:56:03.781573432 +1100
+++ 2.6.x-xfs-new/fs/xfs/xfs_vnodeops.c 2007-01-31 13:56:13.428316729 +1100
@@ -281,6 +281,12 @@ xfs_setattr(
return XFS_ERROR(EINVAL);
}
+ /*
+ * Don't block if the filesystem is frozen.
+ */
+ if ((flags & ATTR_NONBLOCK) && vfs_test_for_freeze(vp->v_vfsp))
+ return XFS_ERROR(EAGAIN);
+
ip = XFS_BHVTOI(bdp);
mp = ip->i_mount;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: review: don't block non-blocking setattr when frozen
2007-04-23 0:31 review: don't block non-blocking setattr when frozen David Chinner
@ 2007-04-23 21:27 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2007-04-23 21:27 UTC (permalink / raw)
To: David Chinner; +Cc: xfs-dev, xfs-oss
On Mon, Apr 23, 2007 at 10:31:42AM +1000, David Chinner wrote:
>
> Prevent nfsds from blocking doing on setattr calls (i.e. truncates)
> when the filesystem is frozen or being frozen.
Ok with same caveat as the last one.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-23 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 0:31 review: don't block non-blocking setattr when frozen David Chinner
2007-04-23 21:27 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox