Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 197531 Details for
Bug 241540
NBD module in RHEL5 deadlocks (regression)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
nbd updates backported from upstream kernel
linux-2.6-nbd-updates.patch (text/plain), 3.67 KB, created by
Jarod Wilson
on 2007-09-17 15:19:21 UTC
(
hide
)
Description:
nbd updates backported from upstream kernel
Filename:
MIME Type:
Creator:
Jarod Wilson
Created:
2007-09-17 15:19:21 UTC
Size:
3.67 KB
patch
obsolete
>diff -Naurp linux-2.6.18.noarch/drivers/block/nbd.c linux-2.6.18.noarch.nbd/drivers/block/nbd.c >--- linux-2.6.18.noarch/drivers/block/nbd.c 2006-09-19 23:42:06.000000000 -0400 >+++ linux-2.6.18.noarch.nbd/drivers/block/nbd.c 2007-09-14 11:43:57.000000000 -0400 >@@ -122,17 +122,12 @@ static int sock_xmit(struct socket *sock > int result; > struct msghdr msg; > struct kvec iov; >- unsigned long flags; >- sigset_t oldset; >+ sigset_t blocked, oldset; > > /* Allow interception of SIGKILL only > * Don't allow other signals to interrupt the transmission */ >- spin_lock_irqsave(¤t->sighand->siglock, flags); >- oldset = current->blocked; >- sigfillset(¤t->blocked); >- sigdelsetmask(¤t->blocked, sigmask(SIGKILL)); >- recalc_sigpending(); >- spin_unlock_irqrestore(¤t->sighand->siglock, flags); >+ siginitsetinv(&blocked, sigmask(SIGKILL)); >+ sigprocmask(SIG_SETMASK, &blocked, &oldset); > > do { > sock->sk->sk_allocation = GFP_NOIO; >@@ -151,11 +146,9 @@ static int sock_xmit(struct socket *sock > > if (signal_pending(current)) { > siginfo_t info; >- spin_lock_irqsave(¤t->sighand->siglock, flags); > printk(KERN_WARNING "nbd (pid %d: %s) got signal %d\n", > current->pid, current->comm, >- dequeue_signal(current, ¤t->blocked, &info)); >- spin_unlock_irqrestore(¤t->sighand->siglock, flags); >+ dequeue_signal_lock(current, ¤t->blocked, &info)); > result = -EINTR; > break; > } >@@ -169,10 +162,7 @@ static int sock_xmit(struct socket *sock > buf += result; > } while (size > 0); > >- spin_lock_irqsave(¤t->sighand->siglock, flags); >- current->blocked = oldset; >- recalc_sigpending(); >- spin_unlock_irqrestore(¤t->sighand->siglock, flags); >+ sigprocmask(SIG_SETMASK, &oldset, NULL); > > return result; > } >@@ -355,15 +345,36 @@ harderror: > return NULL; > } > >-static void nbd_do_it(struct nbd_device *lo) >+static ssize_t pid_show(struct gendisk *disk, char *page) >+{ >+ return sprintf(page, "%ld\n", >+ (long) ((struct nbd_device *)disk->private_data)->pid); >+} >+ >+static struct disk_attribute pid_attr = { >+ .attr = { .name = "pid", .mode = S_IRUGO }, >+ .show = pid_show, >+}; >+ >+static int nbd_do_it(struct nbd_device *lo) > { > struct request *req; >+ int ret; > > BUG_ON(lo->magic != LO_MAGIC); > >+ lo->pid = current->pid; >+ ret = sysfs_create_file(&lo->disk->kobj, &pid_attr.attr); >+ if (ret) { >+ printk(KERN_ERR "nbd: sysfs_create_file failed!"); >+ return ret; >+ } >+ > while ((req = nbd_read_stat(lo)) != NULL) > nbd_end_request(req); >- return; >+ >+ sysfs_remove_file(&lo->disk->kobj, &pid_attr.attr); >+ return 0; > } > > static void nbd_clear_que(struct nbd_device *lo) >@@ -395,7 +406,7 @@ static void nbd_clear_que(struct nbd_dev > /* > * We always wait for result of write, for now. It would be nice to make it optional > * in future >- * if ((req->cmd == WRITE) && (lo->flags & NBD_WRITE_NOCHK)) >+ * if ((rq_data_dir(req) == WRITE) && (lo->flags & NBD_WRITE_NOCHK)) > * { printk( "Warning: Ignoring result!\n"); nbd_end_request( req ); } > */ > >@@ -553,7 +564,9 @@ static int nbd_ioctl(struct inode *inode > case NBD_DO_IT: > if (!lo->file) > return -EINVAL; >- nbd_do_it(lo); >+ error = nbd_do_it(lo); >+ if (error) >+ return error; > /* on return tidy up in case we have a signal */ > /* Forcibly shutdown the socket causing all listeners > * to error >diff -Naurp linux-2.6.18.noarch/include/linux/nbd.h linux-2.6.18.noarch.nbd/include/linux/nbd.h >--- linux-2.6.18.noarch/include/linux/nbd.h 2006-09-19 23:42:06.000000000 -0400 >+++ linux-2.6.18.noarch.nbd/include/linux/nbd.h 2007-09-14 11:36:11.000000000 -0400 >@@ -62,6 +62,7 @@ struct nbd_device { > struct gendisk *disk; > int blksize; > u64 bytesize; >+ pid_t pid; /* pid of nbd-client, if attached */ > }; > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241540
: 197531 |
200431