aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
diff options
context:
space:
mode:
authorLi Xi <lixi@ddn.com>2016-09-18 16:37:46 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:40:36 +0200
commitaaf06e29b300fc76c9ff42f4508801493e002ea4 (patch)
treea744efe434d4ddf04eada1d74022500b7d30a0b6 /drivers/staging/lustre/lustre/ptlrpc/wiretest.c
parentstaging: lustre: llite: handle concurrent use of cob_transient_pages (diff)
downloadlinux-dev-aaf06e29b300fc76c9ff42f4508801493e002ea4.tar.xz
linux-dev-aaf06e29b300fc76c9ff42f4508801493e002ea4.zip
staging: lustre: llite: enforce pool name length limit
The pool related codes have some inconsistency about the length of pool name. Creating and setting a pool name of length 16 to a directory will succeed. However, creating a file under that directory will fail. This patch disables any pool name which is longer or equal to 16. And it changes LOV_MAXPOOLNAME from 16 to 15 which might cause some invalid LLOG records of OST pools with 16 byte names. It is not a problem since invalid LLOG records are just ignored. And OST pools with 16 byte names won't work well anyway on the old versions. There will be problem of inconsistency if part of the servers have this patch and part of the servers don't. But it would be safe to assume that this is not a normal configuration. Signed-off-by: Li Xi <lixi@ddn.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5054 Reviewed-on: http://review.whamcloud.com/10306 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Fan Yong <fan.yong@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/wiretest.c')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/wiretest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 2390255f82f2..b33fd7ba6896 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1383,7 +1383,7 @@ void lustre_assert_wire_constants(void)
(long long)(int)offsetof(struct lov_mds_md_v3, lmm_layout_gen));
LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_layout_gen) == 2, "found %lld\n",
(long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_layout_gen));
- CLASSERT(LOV_MAXPOOLNAME == 16);
+ CLASSERT(LOV_MAXPOOLNAME == 15);
LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_pool_name[16]) == 48, "found %lld\n",
(long long)(int)offsetof(struct lov_mds_md_v3, lmm_pool_name[16]));
LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pool_name[16]) == 1, "found %lld\n",