summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorArtur Wojcik <artur.wojcik@intel.com>2009-12-10 12:03:40 -0700
committerDan Williams <dan.j.williams@intel.com>2009-12-10 12:03:40 -0700
commit33a6535d00eff4475a1557f3d9124e362a74ad28 (patch)
tree13d1c1d6262f2578e1d9d381ca9361d41c79f475 /mdadm.h
parent922f66a935df8e6b3b66073a89c47c68c2e8cbe3 (diff)
downloadmdadm-33a6535d00eff4475a1557f3d9124e362a74ad28.tar.gz
mdadm-33a6535d00eff4475a1557f3d9124e362a74ad28.tar.xz
mdadm-33a6535d00eff4475a1557f3d9124e362a74ad28.zip
Fix required to enable RAID arrays on SAS disks.
The patch increases the capacity of buffers used to store sysfs path names. Originally the buffers were too small to hold the canonical representation of sysfs path (in case of a SAS device, especially a device installed behind an expander). Signed-off-by: Artur Wojcik <artur.wojcik@intel.com> Reviewed-by: Andre Noll <maan@systemlinux.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index c7f864b..fb243e5 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1001,3 +1001,10 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
#define ALGORITHM_PARITY_0_6 20
#define ALGORITHM_PARITY_N_6 ALGORITHM_PARITY_N
+/* Define PATH_MAX in case we don't use glibc or standard library does
+ * not have PATH_MAX defined. Assume max path length is 4K characters.
+ */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+