Whamcloud - gitweb
LU-5054 llite: enforce pool name length limit 06/10306/11
authorLi Xi <lixi@ddn.com>
Thu, 2 Oct 2014 23:43:02 +0000 (07:43 +0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Sat, 25 Oct 2014 00:03:10 +0000 (00:03 +0000)
commit2305c36139a7deaf25a0dc737d412eed42ca54e9
tree1a7704962b941846a2fafd5c08db0d41607d13ce
parent9adb4551536e985b0018c6e12298e1be34a3b16a
LU-5054 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 lenght 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>
Change-Id: I3672fb5414662120c3e6b8641002a6b76994cc77
Reviewed-on: http://review.whamcloud.com/10306
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
12 files changed:
lustre/doc/llapi_file_get_stripe.3
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre_lmv.h
lustre/include/obd.h
lustre/lod/lod_lov.c
lustre/ptlrpc/wiretest.c
lustre/tests/llapi_layout_test.c
lustre/tests/ost-pools.sh
lustre/utils/liblustreapi.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c