From: Iurii.Golovach Date: Tue, 16 Oct 2012 09:13:52 +0000 (+0300) Subject: LU-1770 ptlrpc: introducing OBD_CONNECT_FLOCK_OWNER flag X-Git-Tag: 2.3.54~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=f100d508311d16a09040a057438ee06fd9e6d7fe;hp=994f4878a9bccb62f087d684aa93ee7f184f202b LU-1770 ptlrpc: introducing OBD_CONNECT_FLOCK_OWNER flag After applying flock policy fix into the 1.8 users met with an issue when 1.8 clients with a fixed flock policy recognized incorrectly by 2.x servers. This flag is intended to present 1.8 clients with fixed flock policy to let 2.x servers make flock policy recognition correctly. Patches with functionality changes were attached on review in LU-1575 Xyratex-bug-id: MRP-489 Reviewed-by: Alexey Lyashkov Reviewed-by: Andriy Skulysh Signed-off-by: Iurii Golovach Change-Id: Id00b496ad3f556f99be5e9218497399f18a00357 Reviewed-on: http://review.whamcloud.com/3722 Reviewed-by: Cory Spitz Tested-by: Hudson Reviewed-by: Andreas Dilger --- diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 5d80e49..2c24b9c 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -1165,8 +1165,10 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); * RPC error properly */ #define OBD_CONNECT_GRANT_PARAM 0x100000000000ULL/* extra grant params used for * finer space reservation */ -#define OBD_CONNECT_NANOSEC_TIME 0x200000000000ULL /* nanosecond timestamps */ +#define OBD_CONNECT_FLOCK_OWNER 0x200000000000ULL /* for the fixed 1.8 + * policy and 2.x server */ #define OBD_CONNECT_LVB_TYPE 0x400000000000ULL /* variable type of LVB */ +#define OBD_CONNECT_NANOSEC_TIME 0x800000000000ULL /* nanosecond timestamps */ #define OBD_CONNECT_LIGHTWEIGHT 0x1000000000000ULL/* lightweight connection */ #define OBD_CONNECT_SHORTIO 0x2000000000000ULL/* short io */ /* XXX README XXX: diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 6b889b2..516d798 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -1010,11 +1010,12 @@ static const char *obd_connect_names[] = { "umask", "einprogress", "grant_param", - "nanoseconds_times", + "flock_owner", "lvb_type", - "unknown", + "nanoseconds_times", "lightweight_conn", "short_io", + "unknown", NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index bc47714..514bd64 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1069,6 +1069,12 @@ void lustre_assert_wire_constants(void) OBD_CONNECT_EINPROGRESS); LASSERTF(OBD_CONNECT_GRANT_PARAM == 0x100000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_GRANT_PARAM); + LASSERTF(OBD_CONNECT_FLOCK_OWNER == 0x200000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_FLOCK_OWNER); + LASSERTF(OBD_CONNECT_LVB_TYPE == 0x400000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_LVB_TYPE); + LASSERTF(OBD_CONNECT_NANOSEC_TIME == 0x800000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_NANOSEC_TIME); LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_LIGHTWEIGHT); LASSERTF(OBD_CONNECT_SHORTIO == 0x2000000000000ULL, "found 0x%.16llxULL\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index d912f75..c0781a0 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -496,6 +496,9 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT_UMASK); CHECK_DEFINE_64X(OBD_CONNECT_EINPROGRESS); CHECK_DEFINE_64X(OBD_CONNECT_GRANT_PARAM); + CHECK_DEFINE_64X(OBD_CONNECT_FLOCK_OWNER); + CHECK_DEFINE_64X(OBD_CONNECT_LVB_TYPE); + CHECK_DEFINE_64X(OBD_CONNECT_NANOSEC_TIME); CHECK_DEFINE_64X(OBD_CONNECT_LIGHTWEIGHT); CHECK_DEFINE_64X(OBD_CONNECT_SHORTIO); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 8cd421d..a3a66e5 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1077,7 +1077,13 @@ void lustre_assert_wire_constants(void) OBD_CONNECT_EINPROGRESS); LASSERTF(OBD_CONNECT_GRANT_PARAM == 0x100000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_GRANT_PARAM); - LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n", + LASSERTF(OBD_CONNECT_FLOCK_OWNER == 0x200000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_FLOCK_OWNER); + LASSERTF(OBD_CONNECT_LVB_TYPE == 0x400000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_LVB_TYPE); + LASSERTF(OBD_CONNECT_NANOSEC_TIME == 0x800000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_NANOSEC_TIME); + LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_LIGHTWEIGHT); LASSERTF(OBD_CONNECT_SHORTIO == 0x2000000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_SHORTIO);