summaryrefslogtreecommitdiffstats
path: root/fs/nfs/flexfilelayout/flexfilelayout.h
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-03-28 02:03:35 +0200
committerJames Morris <james.l.morris@oracle.com>2017-03-28 02:03:35 +0200
commit840c91dc6a13b160f5b6e5c79c430dffac11c945 (patch)
tree5309824f4531b2611a575e7971a935d2e95feb02 /fs/nfs/flexfilelayout/flexfilelayout.h
parentLSM: Initialize security_hook_heads upon registration. (diff)
parentLinux 4.11-rc4 (diff)
downloadlinux-840c91dc6a13b160f5b6e5c79c430dffac11c945.tar.xz
linux-840c91dc6a13b160f5b6e5c79c430dffac11c945.zip
update to v4.11-rc4 due to memory corruption bug in rc2
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayout.h')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.h b/fs/nfs/flexfilelayout/flexfilelayout.h
index f4f39b0ab09b..98b34c9b0564 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.h
+++ b/fs/nfs/flexfilelayout/flexfilelayout.h
@@ -175,7 +175,19 @@ ff_layout_no_read_on_rw(struct pnfs_layout_segment *lseg)
static inline bool
ff_layout_test_devid_unavailable(struct nfs4_deviceid_node *node)
{
- return nfs4_test_deviceid_unavailable(node);
+ /*
+ * Flexfiles should never mark a DS unavailable, but if it does
+ * print a (ratelimited) warning as this can affect performance.
+ */
+ if (nfs4_test_deviceid_unavailable(node)) {
+ u32 *p = (u32 *)node->deviceid.data;
+
+ pr_warn_ratelimited("NFS: flexfiles layout referencing an "
+ "unavailable device [%x%x%x%x]\n",
+ p[0], p[1], p[2], p[3]);
+ return true;
+ }
+ return false;
}
static inline int