From: Lai Siyao Date: Fri, 23 May 2014 03:32:09 +0000 (+0800) Subject: LU-4367 ptlrpc: add OBD_CONNECT_UNLINK_CLOSE flag X-Git-Tag: 2.6.0-RC1~59 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F10426%2F12;p=fs%2Flustre-release.git LU-4367 ptlrpc: add OBD_CONNECT_UNLINK_CLOSE flag Add OBD_CONNECT_UNLINK_CLOSE flag for interop, once this is supported, client packs file handle in unlink RPC, and MDT will close file before unlink. Signed-off-by: Lai Siyao Change-Id: If2f89a5268b95386e01cdc2f8613fd5c4cbd1d2c Reviewed-on: http://review.whamcloud.com/10426 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index d18b8ca..bd9aa6c 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -1349,6 +1349,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); #define OBD_CONNECT_OPEN_BY_FID 0x20000000000000ULL /* open by fid won't pack name in request */ #define OBD_CONNECT_LFSCK 0x40000000000000ULL/* support online LFSCK */ +#define OBD_CONNECT_UNLINK_CLOSE 0x100000000000000ULL/* close file in unlink */ /* XXX README XXX: * Please DO NOT add flag values here before first ensuring that this same diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 25f66b1..e894f33 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -888,6 +888,10 @@ static const char *obd_connect_names[] = { "pingless", "flock_deadlock", "disp_stripe", + "open_by_fid", + "lfsck", + "unknown", + "unlink_close", "unknown", NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 72d0bb0..a3b036a 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1178,6 +1178,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT_OPEN_BY_FID); LASSERTF(OBD_CONNECT_LFSCK == 0x40000000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_LFSCK); + LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_UNLINK_CLOSE); LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_CRC32); LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 20d2b04..5e9d2ab 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -525,6 +525,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT_FLOCK_DEAD); CHECK_DEFINE_64X(OBD_CONNECT_OPEN_BY_FID); CHECK_DEFINE_64X(OBD_CONNECT_LFSCK); + CHECK_DEFINE_64X(OBD_CONNECT_UNLINK_CLOSE); CHECK_VALUE_X(OBD_CKSUM_CRC32); CHECK_VALUE_X(OBD_CKSUM_ADLER); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 129ad4f..182f7f0 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1184,6 +1184,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT_OPEN_BY_FID); LASSERTF(OBD_CONNECT_LFSCK == 0x40000000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_LFSCK); + LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_UNLINK_CLOSE); LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_CRC32); LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",