Commit daa91482 authored by Lai Siyao's avatar Lai Siyao Committed by Oleg Drokin
Browse files

LU-13437 uapi: add OBD_CONNECT2_GETATTR_PFID

Add OBD_CONNECT2_GETATTR_PFID connect flag to pack parent FID in
getattr request, which will be used to check whether target is
remote object, if so, don't take LOOKUP lock, otherwise client
may see stale directory entries.

Lustre-change: https://review.whamcloud.com/39289
Lustre-commit: f384a873


Test-parameters: trivial
Signed-off-by: default avatarLai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Reviewed-by: default avatarNeil Brown <neilb@suse.de>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
Change-Id: Ibdf880934456f255f83cd4bac9d61ab5e1ed7330
Reviewed-on: https://review.whamcloud.com/39770

Tested-by: default avatarjenkins <devops@whamcloud.com>
Tested-by: default avatarMaloo <maloo@whamcloud.com>
parent 23fa920b
......@@ -834,7 +834,9 @@ struct ptlrpc_body_v2 {
#define OBD_CONNECT2_SELINUX_POLICY 0x400ULL /* has client SELinux policy */
#define OBD_CONNECT2_LSOM 0x800ULL /* LSOM support */
#define OBD_CONNECT2_ASYNC_DISCARD 0x4000ULL /* support async DoM data discard */
#define OBD_CONNECT2_ENCRYPT 0x8000ULL /* client-to-disk encrypt */
#define OBD_CONNECT2_FIDMAP 0x10000ULL /* FID map */
#define OBD_CONNECT2_GETATTR_PFID 0x20000ULL /* pack parent FID in getattr */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
* flag value is not in use on some other branch. Please clear any such
......
......@@ -788,6 +788,9 @@ static const char *obd_connect_names[] = {
"pcc", /* 0x1000 */
"unknown", /* 0x2000 */
"async_discard", /* 0x4000 */
"client_encryption", /* 0x8000 */
"fidmap", /* 0x10000 */
"getattr_pfid", /* 0x20000 */
NULL
};
......
......@@ -1345,6 +1345,12 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT2_LSOM);
LASSERTF(OBD_CONNECT2_ASYNC_DISCARD == 0x4000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_ASYNC_DISCARD);
LASSERTF(OBD_CONNECT2_ENCRYPT == 0x8000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_ENCRYPT);
LASSERTF(OBD_CONNECT2_FIDMAP== 0x10000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_FIDMAP);
LASSERTF(OBD_CONNECT2_GETATTR_PFID== 0x20000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_GETATTR_PFID);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
......
......@@ -608,6 +608,9 @@ check_obd_connect_data(void)
CHECK_DEFINE_64X(OBD_CONNECT2_SELINUX_POLICY);
CHECK_DEFINE_64X(OBD_CONNECT2_LSOM);
CHECK_DEFINE_64X(OBD_CONNECT2_ASYNC_DISCARD);
CHECK_DEFINE_64X(OBD_CONNECT2_ENCRYPT);
CHECK_DEFINE_64X(OBD_CONNECT2_FIDMAP);
CHECK_DEFINE_64X(OBD_CONNECT2_GETATTR_PFID);
CHECK_VALUE_X(OBD_CKSUM_CRC32);
CHECK_VALUE_X(OBD_CKSUM_ADLER);
......
......@@ -1366,6 +1366,12 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT2_LSOM);
LASSERTF(OBD_CONNECT2_ASYNC_DISCARD == 0x4000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_ASYNC_DISCARD);
LASSERTF(OBD_CONNECT2_ENCRYPT == 0x8000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_ENCRYPT);
LASSERTF(OBD_CONNECT2_FIDMAP== 0x10000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_FIDMAP);
LASSERTF(OBD_CONNECT2_GETATTR_PFID== 0x20000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_GETATTR_PFID);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment