Cluster Project branch, STABLE2, updated. cluster-2.03.02-7-ga6b6a30
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".
The branch, STABLE2 has been updated
via a6b6a30358fd5e247a37e2fe493ef6a683174b66 (commit)
from edd597845e68e9826907ec1e23692e1fc394e9a4 (commit)Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit a6b6a30358fd5e247a37e2fe493ef6a683174b66
Author: David Teigland <[email protected]> Date: Tue May 13 14:04:51 2008 -0500
gfs_controld: ignore write(2) return value on plock dev
bz 446128
When plocks originate from nfs clients, the kernel mistakenly returns 0 instead of the number of bytes written to the plock device on write(2). Don't spam /var/log/messages with errors reporting a bad return value from write(2).
-----------------------------------------------------------------------
Summary of changes:
group/gfs_controld/plock.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
group/gfs_controld/plock.c +1 -5
@@ -771,12 +771,8 @@ static int add_waiter(struct mountgroup *mg, struct resource *r,static void write_result (struct mountgroup *mg,struct gdlm_plock_info *in,int rv) { -int err; - in->rv = rv; - err =write (control_fd, in,sizeof (struct gdlm_plock_info )); -if (err !=sizeof (struct gdlm_plock_info )) -log_error ("plock result write err %d errno %d" , err, errno); +write (control_fd, in,sizeof (struct gdlm_plock_info )); }static void do_waiters (struct mountgroup *mg,struct resource *r)
hooks/post-receive
--
Cluster Project
Hi,
It might be a silly question, but this looks to me like trying to fix a kernel bug by adding a userland one. Why not simply update the kernel to return the correct value?
Steve.
Quoted 60 lines · teigland at sourceware.org
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".
The branch, STABLE2 has been updated
via a6b6a30358fd5e247a37e2fe493ef6a683174b66 (commit) from edd597845e68e9826907ec1e23692e1fc394e9a4 (commit)Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit
a6b6a30358fd5e247a37e2fe493ef6a683174b66Author: David Teigland <[email protected]> Date: Tue May 13 14:04:51 2008 -0500
gfs_controld: ignore write(2) return value on plock devbz 446128
When plocks originate from nfs clients, the kernel mistakenly returns 0 instead of the number of bytes written to the plock device on write(2). Don't spam
/var/log/messageswith errors reporting a bad return value from write(2).Signed-off-by David Teigland <[email protected]>-----------------------------------------------------------------------
Summary of changes:
group/gfs_controld/plock.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)group/gfs_controld/plock.c +1
-5@@ -771,12 +771,8 @@ static int add_waiter(struct mountgroup *mg, struct resource *r,static void write_result (struct mountgroup *mg,struct gdlm_plock_info *in,int rv) { -int err; - in->rv = rv; - err =write (control_fd, in,sizeof (struct gdlm_plock_info )); -if (err !=sizeof (struct gdlm_plock_info )) -log_error ("plock result write err %d errno %d" , err, errno); +write (control_fd, in,sizeof (struct gdlm_plock_info )); }static void do_waiters (struct mountgroup *mg,struct resource *r)hooks/post-receive
--
Cluster Project
Quoted 5 lines · Steven Whitehouse
Hi,
It might be a silly question, but this looks to me like trying to fix a kernel bug by adding a userland one. Why not simply update the kernel to return the correct value?
Yes, there's already a kernel fix in dlm.git, see
"dlm: fix plock dev_write return value"
http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/teigland/dlm.git;a=shortlog;h=next
Suppressing the message spamming is a good solution in the mean time, and has a better chance of getting to customers before the kernel patch.
Hi,
Quoted 7 lines · David Teigland
Quoted 5 lines · Steven Whitehouse
Hi,
It might be a silly question, but this looks to me like trying to fix a kernel bug by adding a userland one. Why not simply update the kernel to return the correct value?
Quoted 8 lines
Yes, there's already a kernel fix in dlm.git, see
"dlm: fix plockdev_writereturn value"http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/teigland/dlm.git;a=shortlog;h=next
Suppressing the message spamming is a good solution in the mean time, and has a better chance of getting to customers before the kernel patch.
I'm afraid you've still not convinced me on this one. Why not just check errno as well as the return value, then you can detect both "correct" instances and still report errors when they occur.
Also the kernel fix doesn't look quite right to me. Surely we should be reporting the error from dlm_plock_callback() if it occurs, rather than just ignoring it?
In dlm_plock_callback() the return value from "notify()" seems to be ignored in one case too. I spotted this while looking at the code:
struct plock_xop {
struct plock_op xop;
void *callback;
void *fl;
void *file;
struct file_lock flc;
};and I can't see the need for void pointers here, why not just use the correct types? It looks like this code could do with some cleanup,
Steve.
Quoted 13 lines · Steven Whitehouse
Hi,
Quoted 10 lines · David Teigland
Quoted 5 lines · Steven Whitehouse
Hi,
It might be a silly question, but this looks to me like trying to fix a kernel bug by adding a userland one. Why not simply update the kernel to return the correct value?
Yes, there's already a kernel fix in dlm.git, see
"dlm: fix plockdev_writereturn value"
Quoted 8 lines
Quoted 5 lines
http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/teigland/dlm.git;a=shortlog;h=next
Suppressing the message spamming is a good solution in the mean time, and has a better chance of getting to customers before the kernel patch.
I'm afraid you've still not convinced me on this one. Why not just check errno as well as the return value, then you can detect both "correct" instances and still report errors when they occur.
I really didn't find it worth the time... there are lots of highly unlikely error conditions that are just not worth logging a message about. When I'm modifying that code again I'll look at putting back a check.
Quoted 6 lines
Also the kernel fix doesn't look quite right to me. Surely we should be reporting the error from
dlm_plock_callback()if it occurs, rather than just ignoring it?In
dlm_plock_callback()the return value from "notify()" seems to be ignored in one case too.
Errors from notify() are the point where this whole scheme (plocks from nfs) falls apart. There's nothing that can be done to recover from an error there, and the nfs people basically have to wait indefinitely for the notify to make sure it never causes an error. Logging the error is the best we can do.
Quoted 10 lines
I spotted this while looking at the code:
struct plock_xop { struct plock_op xop; void *callback; void *fl; void *file; struct file_lock flc; };
Quoted 2 lines
and I can't see the need for void pointers here, why not just use the correct types? It looks like this code could do with some cleanup,
I don't know, it doesn't look like they need to be void. Marc Eshel <[email protected]> is the one to ask, he added the support for nfs plocks.