lustre-devel-lustre.org archive mirror
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Andreas Dilger <adilger@whamcloud.com>,
	Oleg Drokin <green@whamcloud.com>, NeilBrown <neilb@suse.de>
Cc: Mikhail Pershin <mpershin@whamcloud.com>,
	Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH 5/9] lustre: ldlm: don't change GROUP lock GID on client
Date: Mon,  8 Feb 2021 19:54:23 -0500	[thread overview]
Message-ID: <1612832067-1449-6-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1612832067-1449-1-git-send-email-jsimmons@infradead.org>

From: Mikhail Pershin <mpershin@whamcloud.com>

GROUP lock GID is part of inodebits policy and is passed
to the server from client in policy li_gid field.
Meanwhile the ldlm_ibits_policy_wire_to_local() is used on
client also when server reply or completion AST is processed,
so client original GID can be overwritten by server value.
This is not problem if both server and client have the same
Lustre version but if server is older then it can have garbage
in li_gid field and client lock policy is updated with it.

Considering that GROUP lock GID is never changed and server should
not do that, the solution is to ignore returned li_gid from server
and never update original GID of GROUP lock on client from server
response.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14312
Lustre-commit: da18ad5628556cb ("LU-14312 ldlm: don't change GROUP lock GID on client")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/41268
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/ldlm/ldlm_inodebits.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/lustre/ldlm/ldlm_inodebits.c b/fs/lustre/ldlm/ldlm_inodebits.c
index a367ff1..32de9b9 100644
--- a/fs/lustre/ldlm/ldlm_inodebits.c
+++ b/fs/lustre/ldlm/ldlm_inodebits.c
@@ -59,7 +59,10 @@ void ldlm_ibits_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
 				     union ldlm_policy_data *lpolicy)
 {
 	lpolicy->l_inodebits.bits = wpolicy->l_inodebits.bits;
-	lpolicy->l_inodebits.li_gid = wpolicy->l_inodebits.li_gid;
+	/**
+	 * try_bits and li_gid are to be handled outside of generic
+	 * write_to_local due to different behavior on a server and client.
+	 */
 }
 
 void ldlm_ibits_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
-- 
1.8.3.1

_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

  parent reply	other threads:[~2021-02-09  0:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  0:54 [lustre-devel] [PATCH 0/9] Sync to OpenSFS as of Feb 8, 2021 James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 1/9] lustre: llite: send file mode with rename RPC James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 2/9] lustre: flr: skip unknown FLR component types James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 3/9] lustre: obdclass: connect vs disconnect race James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 4/9] lustre: osc: correctly update size/kms for fallocate James Simmons
2021-02-09  0:54 ` James Simmons [this message]
2021-02-09  0:54 ` [lustre-devel] [PATCH 6/9] lustre: sec: get rid of bad rss-counter state messages James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 7/9] lustre: obdclass: add option %H for jobid James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 8/9] lustre: osc: avoid crash if ocd reset James Simmons
2021-02-09  0:54 ` [lustre-devel] [PATCH 9/9] lustre: lov: return stripe_count=1 instead of 0 for DoM files James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1612832067-1449-6-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=adilger@whamcloud.com \
    --cc=green@whamcloud.com \
    --cc=lustre-devel@lists.lustre.org \
    --cc=mpershin@whamcloud.com \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).