From: Paul Clements <paul.clements@steeleye.com>
To: Pavel Machek <pavel@suse.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: do not allow two nbd-clients at same time
Date: Mon, 12 Jan 2009 08:55:10 -0500 [thread overview]
Message-ID: <496B4BBE.5040701@steeleye.com> (raw)
In-Reply-To: <20090112110322.GA2001@elf.ucw.cz>
Pavel Machek wrote:
> Two nbd-clients at same time are bad idea, and cause WARN_ON from nbd
> in 2.6.28-rc7 from sysfs_add_one. This simply prevents that from
> happening.
Thanks for this. But I think we also need the following:
--- drivers/block/nbd.c 2008-12-24 18:26:37.000000000 -0500
+++ drivers/block/nbd.c 2009-01-12 08:50:17.000000000 -0500
@@ -406,6 +406,7 @@ static int nbd_do_it(struct nbd_device *
ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj,
&pid_attr.attr);
if (ret) {
printk(KERN_ERR "nbd: sysfs_create_file failed!");
+ lo->pid = 0;
return ret;
}
To zero out pid in the error case. Otherwise, it looks good.
Thanks,
Paul
next prev parent reply other threads:[~2009-01-12 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 21:35 warn-on from nbd in 2.6.28-rc7 from sysfs_add_one() Pavel Machek
2008-12-08 22:58 ` Pavel Machek
2009-01-12 11:04 ` do not allow two nbd-clients at same time Pavel Machek
2009-01-12 13:55 ` Paul Clements [this message]
2009-01-13 8:27 ` Pavel Machek
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=496B4BBE.5040701@steeleye.com \
--to=paul.clements@steeleye.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/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