From: Bob Peterson Date: Fri, 26 Aug 2016 08:46:54 -0400 (EDT) Subject: [Cluster-devel] [PATCH linux-gfs2] fs: gfs2: Check if the return value of rhashtable_walk_start is -EAGAIN In-Reply-To: <1472187180-20925-1-git-send-email-fgao@ikuai8.com> References: <1472187180-20925-1-git-send-email-fgao@ikuai8.com> Message-ID: <1309316205.9522527.1472215614669.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- | From: Gao Feng | | When rhashtable_walk_start returns -EAGAIN, it means the resize event | happened but the iterator still could be used. So it should not be | treated as an error in gfs2_glock_seq_start. | | Signed-off-by: Gao Feng | --- | fs/gfs2/glock.c | 2 +- | 1 file changed, 1 insertion(+), 1 deletion(-) | | diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c | index 3a90b2b..732721b 100644 | --- a/fs/gfs2/glock.c | +++ b/fs/gfs2/glock.c | @@ -1818,7 +1818,7 @@ static void *gfs2_glock_seq_start(struct seq_file *seq, | loff_t *pos) | n = (*pos - gi->last_pos); | | ret = rhashtable_walk_start(&gi->hti); | - if (ret) | + if (ret && ret != -EAGAIN) | return NULL; | | do { | -- | 1.9.1 Hi Feng Gao, Thanks for the updated patch, and sorry I haven't gotten back to you. I'm not familiar enough with the rhashtable internals to know whether this makes sense. I think it does, but rhashtable is a complex beast. I've asked a guy who knows rhashtable better. At first he said he patch looked wrong. Later he said it was okay. Before I apply the patch, I wanted to ask you a question: What problem are you trying to solve? Are you seeing glocks that are missing from the list in debugfs (or the glocktop tool) due to resize events? * It seems like if we don't do this patch, glocks might be accidentally not listed during a resize event. * It seems like if we do this patch, we might get glocks listed twice in debugfs. I suppose it's better to list them twice than not at all, but I don't know of anything besides the "glocktop" tool that would care. Regards, Bob Peterson Red Hat File Systems