From: Anton Altaparmakov <aia21@cus.cam.ac.uk>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [patch 2.5.8 ] nbd compile fix - Was: Re: [PATCH] 2.5.8 IDE 36
Date: Tue, 16 Apr 2002 17:05:21 +0100 (BST) [thread overview]
Message-ID: <E16xVSL-0005Tw-00@libra.cus.cam.ac.uk> (raw)
Linus,
You just mentioned using nbd but nbd doesn't even compile at the moment
(and it hasn't for a while). Below is a patch that fixes compilation.
Note patch compiles but is otherwise untested as no kernel after 2.5.7
boots on my 2.5 box due to IDE hanging the box hard during device
discovery. )-:
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
IRC: #ntfs on irc.openprojects.net / ICQ: 8561279
WWW: http://www-stu.christs.cam.ac.uk/~aia21/
--- nbd-2.5.patch ---
--- nbd.c.old Tue Apr 16 16:58:42 2002
+++ nbd.c Thu Apr 11 00:13:33 2002
@@ -240,11 +240,11 @@ void nbd_do_it(struct nbd_device *lo)
{
struct request *req;
- down (&lo->queue_lock);
+ down (&lo->tx_lock);
while (1) {
- up (&lo->queue_lock);
+ up (&lo->tx_lock);
req = nbd_read_stat(lo);
- down (&lo->queue_lock);
+ down (&lo->tx_lock);
if (!req) {
printk(KERN_ALERT "req should never be null\n" );
@@ -264,14 +264,14 @@ void nbd_do_it(struct nbd_device *lo)
}
#endif
blkdev_dequeue_request(req);
- up (&lo->queue_lock);
+ up (&lo->tx_lock);
nbd_end_request(req);
- down (&lo->queue_lock);
+ down (&lo->tx_lock);
}
out:
- up (&lo->queue_lock);
+ up (&lo->tx_lock);
}
void nbd_clear_que(struct nbd_device *lo)
@@ -299,11 +299,11 @@ void nbd_clear_que(struct nbd_device *lo
#endif
req->errors++;
blkdev_dequeue_request(req);
- up(&lo->queue_lock);
+ up(&lo->tx_lock);
nbd_end_request(req);
- down(&lo->queue_lock);
+ down(&lo->tx_lock);
}
}
@@ -351,10 +351,10 @@ static void do_nbd_request(request_queue
blkdev_dequeue_request(req);
spin_unlock_irq(q->queue_lock);
- down (&lo->queue_lock);
+ down (&lo->tx_lock);
list_add(&req->queuelist, &lo->queue_head);
nbd_send_req(lo->sock, req); /* Why does this block? */
- up (&lo->queue_lock);
+ up (&lo->tx_lock);
spin_lock_irq(q->queue_lock);
continue;
@@ -396,14 +396,14 @@ static int nbd_ioctl(struct inode *inode
return 0 ;
case NBD_CLEAR_SOCK:
- down(&lo->queue_lock);
+ down(&lo->tx_lock);
nbd_clear_que(lo);
if (!list_empty(&lo->queue_head)) {
- up(&lo->queue_lock);
+ up(&lo->tx_lock);
printk(KERN_ERR "nbd: Some requests are in progress -> can not turn off.\n");
return -EBUSY;
}
- up(&lo->queue_lock);
+ up(&lo->tx_lock);
file = lo->file;
if (!file)
return -EINVAL;
@@ -527,7 +527,7 @@ static int __init nbd_init(void)
nbd_dev[i].magic = LO_MAGIC;
nbd_dev[i].flags = 0;
INIT_LIST_HEAD(&nbd_dev[i].queue_head);
- init_MUTEX(&nbd_dev[i].queue_lock);
+ init_MUTEX(&nbd_dev[i].tx_lock);
nbd_blksizes[i] = 1024;
nbd_blksize_bits[i] = 10;
nbd_bytesizes[i] = 0x7ffffc00; /* 2GB */
reply other threads:[~2002-04-16 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E16xVSL-0005Tw-00@libra.cus.cam.ac.uk \
--to=aia21@cus.cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®