summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2012-01-06 09:31:20 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-06 08:55:33 -0500
commitfe0fe83585f88346557868a803a479dfaaa0688a (patch)
treeeabe7943ec5970936664dfd2b2e86e75c2c4b253 /fs/nfs/pnfs.h
parent5c0b4129c07b902b27d3f3ebc087757f534a3abd (diff)
downloadlinux-fe0fe83585f88346557868a803a479dfaaa0688a.tar.gz
linux-fe0fe83585f88346557868a803a479dfaaa0688a.tar.bz2
linux-fe0fe83585f88346557868a803a479dfaaa0688a.zip
pnfs-obj: Must return layout on IO error
As mandated by the standard. In case of an IO error, a pNFS objects layout driver must return it's layout. This is because all device errors are reported to the server as part of the layout return buffer. This is implemented the same way PNFS_LAYOUTRET_ON_SETATTR is done, through a bit flag on the pnfs_layoutdriver_type->flags member. The flag is set by the layout driver that wants a layout_return preformed at pnfs_ld_{write,read}_done in case of an error. (Though I have not defined a wrapper like pnfs_ld_layoutret_on_setattr because this code is never called outside of pnfs.c and pnfs IO paths) Without this patch 3.[0-2] Kernels leak memory and have an annoying WARN_ON after every IO error utilizing the pnfs-obj driver. [This patch is for 3.2 Kernel. 3.1/0 Kernels need a different patch] CC: Stable Tree <stable@kernel.org> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 1509530cb111..53d593a0a4f2 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -68,6 +68,7 @@ enum {
enum layoutdriver_policy_flags {
/* Should the pNFS client commit and return the layout upon a setattr */
PNFS_LAYOUTRET_ON_SETATTR = 1 << 0,
+ PNFS_LAYOUTRET_ON_ERROR = 1 << 1,
};
struct nfs4_deviceid_node;