James Bottomley james.bottom...@hansenpartnership.com writes:
On Fri, 2015-01-23 at 05:17 -0800, Christoph Hellwig wrote:
On Fri, Jan 23, 2015 at 01:24:15PM +1030, Rusty Russell wrote:
The correct fix is to turn try_module_get() into __module_get(), and
always do the module_put
but then used
module_refcount() to detect the failure and not do a put.
Yep, I've put that patch in my fixes queue now.
Thanks,
Rusty.
From: Rusty Russell ru...@rustcorp.com.au
Subject: scsi: always increment reference count
James reported:
After e513cc1 module: Remove stop_machine from module
James Bottomley james.bottom...@hansenpartnership.com writes:
Actually, I don't think this is enough. Some Australian once came up
with a guide to APIs, and lectured on it at length, one of which was
that the name should be the obvious use and it is unexpected that a
refcount would go
James Bottomley james.bottom...@hansenpartnership.com writes:
On Mon, 2015-01-19 at 16:21 +1030, Rusty Russell wrote:
Masami Hiramatsu masami.hiramatsu...@hitachi.com writes:
(2015/01/19 1:55), James Bottomley wrote:
From: James Bottomley jbottom...@parallels.com
After e513cc1 module
Masami Hiramatsu masami.hiramatsu...@hitachi.com writes:
(2015/01/19 1:55), James Bottomley wrote:
From: James Bottomley jbottom...@parallels.com
After e513cc1 module: Remove stop_machine from module unloading,
module_refcount() is returning (unsigned long)-1 when called from within
a
James Bottomley james.bottom...@hansenpartnership.com writes:
From: James Bottomley jbottom...@parallels.com
After e513cc1 module: Remove stop_machine from module unloading,
module_refcount() is returning (unsigned long)-1 when called from within
a routine that runs in module_exit. This is
Michael S. Tsirkin m...@redhat.com writes:
Defer config changed notifications that arrive during
probe/scan/freeze/restore.
This will allow drivers to set DRIVER_OK earlier, without worrying about
racing with config change interrupts.
This change will also benefit old hypervisors (before
Michael S. Tsirkin m...@redhat.com writes:
virtio spec 0.9.X requires DRIVER_OK to be set before
VQs are used, but some drivers use VQs before probe
function returns.
Since DRIVER_OK is set after probe, this violates the spec.
Even though under virtio 1.0 transitional devices support this
, kstrtouint);
STANDARD_PARAM_DEF(long, long, %li, kstrtol);
STANDARD_PARAM_DEF(ulong, unsigned long, %lu, kstrtoul);
+STANDARD_PARAM_DEF(ullong, unsigned long long, %llu, kstrtoull);
Thanks Christoph!
Acked-by: Rusty Russell ru...@rustcorp.com.au
Cheers,
Rusty.
--
To unsubscribe from this list
for
signaling when protection information buffers are expected to
preceed the data buffers.
Cc rusty.
Rusty could you please Ack merging this through Nicholas' tree
together with the vhost changes?
Acked-by: Rusty Russell ru...@rustcorp.com.au
Thanks,
Rusty.
--
To unsubscribe from this list: send
-by: Rusty Russell ru...@rustcorp.com.au
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index db3b494e5926..62757afd93bb 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -433,11 +433,10 @@ static void virtscsi_event_done(struct virtqueue *vq)
* @cmd
Jason Wang jasow...@redhat.com writes:
From: Asias He asias.he...@gmail.com
vqs are freed in virtscsi_freeze but the hotcpu_notifier is not
unregistered. We will have a use-after-free usage when the notifier
callback is called after virtscsi_freeze.
Fixes:
Jason Wang jasow...@redhat.com writes:
On 10/28/2013 04:01 PM, Asias He wrote:
vqs are freed in virtscsi_freeze but the hotcpu_notifier is not
unregistered. We will have a use-after-free usage when the notifier
callback is called after virtscsi_freeze.
Signed-off-by: Asias He
Asias He as...@redhat.com writes:
vscsi-num_queues counts the number of request virtqueue which does not
include the control and event virtqueue. It is wrong to subtract
VIRTIO_SCSI_VQ_BASE from vscsi-num_queues.
This patch fixes the following panic.
Applied.
Thanks,
Rusty.
(qemu)
Asias He as...@redhat.com writes:
On Sat, Apr 06, 2013 at 09:40:13AM +0100, James Bottomley wrote:
Well, I haven't had time to look at anything other than the patch I
commented on. I'm happy with your fix, so you can add my acked by to
that one. Since it's going through the virtio tree,
Wanlong Gao gaowanl...@cn.fujitsu.com writes:
Add hot cpu notifier to reset the request virtqueue affinity
when doing cpu hotplug.
You need to be careful to get_online_cpus() and put_online_cpus() here,
so CPUs can't go up and down in the middle of operations.
In particular,
Paolo Bonzini pbonz...@redhat.com writes:
Il 07/01/2013 01:02, Rusty Russell ha scritto:
Paolo Bonzini pbonz...@redhat.com writes:
Il 02/01/2013 06:03, Rusty Russell ha scritto:
Paolo Bonzini pbonz...@redhat.com writes:
The virtqueue_add_buf function has two limitations:
1) it requires
Paolo Bonzini pbonz...@redhat.com writes:
Il 02/01/2013 06:03, Rusty Russell ha scritto:
Paolo Bonzini pbonz...@redhat.com writes:
The virtqueue_add_buf function has two limitations:
1) it requires the caller to provide all the buffers in a single call;
2) it does not support chained
interface is pretty
nasty; I think I'd prefer the chained scatterlists, if that's optimal
for you.
Cheers,
Rusty.
From: Rusty Russell ru...@rustcorp.com.au
Subject: virtio: use chained scatterlists.
Rather than handing a scatterlist[] and out and in numbers to
virtqueue_add_buf(), hand two
the affinity hint
- if the virtqueues share MSI, make the affinity OR over all affinities
requested
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Paolo Bonzini pbonz...@redhat.com
Applied, thanks.
Acked-by: Rusty Russell ru...@rustcorp.com.au
Cheers,
Rusty.
--
To unsubscribe from
.
But I've applied as-is, we can clean up that later if we want (probably
by merging the two structures, I'll have to think harder on that).
Acked-by: Rusty Russell ru...@rustcorp.com.au
Cheers,
Rusty.
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord
On Fri, 27 Jul 2012 10:11:26 +0200, Paolo Bonzini pbonz...@redhat.com wrote:
Il 27/07/2012 08:27, Rusty Russell ha scritto:
+int virtqueue_add_buf_sg(struct virtqueue *_vq,
+ struct scatterlist *sg_out,
+ unsigned int out
. it booted!).
From: Rusty Russell ru...@rustcorp.com.au
Subject: virtio: use chained scatterlists.
Rather than handing a scatterlist[] and out and in numbers to
virtqueue_add_buf(), hand two separate ones which can be chained.
I shall refrain from ranting about what a disgusting hack chained
On Thursday 10 January 2008 09:10:37 James Bottomley wrote:
On Tue, 2008-01-08 at 11:39 +1100, Rusty Russell wrote:
On Tuesday 08 January 2008 02:48:23 James Bottomley wrote:
We're always open to new APIs (or more powerful and expanded old ones).
The way we've been doing the sg_chain
On Sunday 06 January 2008 02:31:12 James Bottomley wrote:
On Wed, 2007-12-19 at 17:31 +1100, Rusty Russell wrote:
This patch series is the start of my attempt to simplify and make
explicit the chained scatterlist logic.
It's not complete: my SATA box boots and seems happy, but all
On Monday 07 January 2008 16:01:40 Tejun Heo wrote:
But we hit the same problems:
1) sg_chain loses information. The clever chain packaging makes reading
easy, but manipulation is severely limited. You can append to your own
chains by padding, but not someone elses. This works for
, so that code had to be shuffled a little.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
drivers/scsi/NCR5380.c |6 +++---
drivers/scsi/NCR53C9x.c |6 +++---
drivers/scsi/aha1542.c | 14 +++---
drivers/scsi/atari_NCR5380.c |2 +-
drivers/scsi/atp870u.c
usb_stor_bulk_transfer_sg() assumes buf is a scatterlist array if
use_sg is non-NULL. Change it to an explicit sg arg, instead, to
allow the callers to change to scsi_sglist().
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff -r 09247461cfda drivers/usb/storage/freecom.c
--- a/drivers/usb
(CONFIG_SCSI_SG_CHAIN).
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
drivers/scsi/Kconfig|6 +
drivers/scsi/scsi_error.c | 15 +--
drivers/scsi/scsi_lib.c | 219 +---
drivers/scsi/scsi_lib_dma.c | 27 ++---
drivers/scsi/scsi_tgt_lib.c | 17
On Thursday 03 January 2008 20:26:13 Boaz Harrosh wrote:
On Thu, Jan 03 2008 at 10:50 +0200, Rusty Russell [EMAIL PROTECTED]
wrote:
This patch simply converts direct uses of -use_sg and -request_buffer
to use the wrapper macros. This removes the assumption that the sg list
is overloaded
OK, after wading through many scsi drivers, I decided to change tack and try
to provide a transition path. This is in two stages:
1) These two patches. sg_ring used underneath, but if any driver asks for
scsi_sglist() they get a 2.6.24-style chained sg. No other patches are
necessary.
2)
On Thursday 27 December 2007 13:09:27 FUJITA Tomonori wrote:
On Wed, 26 Dec 2007 11:27:40 +1100
Rusty Russell [EMAIL PROTECTED] wrote:
There are many signs through the code that it needs a great deal of
work: what is the purpose of sg_break? Why does the code check if
kmap_atomic fails
if you really want a simple increment.
Various flaws in the driver have been maintained.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff -r 63176a8a6ce3 drivers/scsi/ips.c
--- a/drivers/scsi/ips.cMon Dec 24 17:40:08 2007 +1100
+++ b/drivers/scsi/ips.cWed Dec 26 11:20:52 2007
On Thursday 20 December 2007 18:42:44 David Miller wrote:
From: FUJITA Tomonori [EMAIL PROTECTED]
Date: Thu, 20 Dec 2007 16:06:31 +0900
On Thu, 20 Dec 2007 16:49:30 +1100
Rusty Russell [EMAIL PROTECTED] wrote:
+/**
+ * dma_map_sg_ring - Map an entire sg ring
+ * @dev: Device
On Thursday 20 December 2007 18:58:07 David Miller wrote:
From: Rusty Russell [EMAIL PROTECTED]
Date: Thu, 20 Dec 2007 18:53:48 +1100
Manipulating the magic chains is horrible; it looks simple to the
places which simply want to iterate through it, but it's awful for
code which wants
On Friday 21 December 2007 11:00:27 FUJITA Tomonori wrote:
We need to pass the whole sg entries to the IOMMUs at a time.
Hi Fujita,
OK, it's certainly possible to have an arch override. For which
architecture is this BTW?
Thanks,
Rusty.
-
To unsubscribe from this list: send the line
On Friday 21 December 2007 11:40:00 David Miller wrote:
From: Rusty Russell [EMAIL PROTECTED]
Date: Fri, 21 Dec 2007 11:35:12 +1100
On Friday 21 December 2007 11:00:27 FUJITA Tomonori wrote:
We need to pass the whole sg entries to the IOMMUs at a time.
Hi Fujita,
OK, it's
On Friday 21 December 2007 13:28:34 FUJITA Tomonori wrote:
I'm not sure about chaining the headers (as your sg_ring and
scsi_sgtable do) would simplify LLDs. Have you looked at ips or
qla1280?
Not yet, am working my way through the drivers, but I don't expect it will be
a simplification to
OK, some fixes since last time, as I wade through more SCSI drivers. Some
drivers use use_sg as a flag to know whether the request_buffer is a
scatterlist: I don't need the counter, but I still need the flag, so I fixed
that in a more intuitive way (an explicit -sg pointer in the cmd).
Also,
it is easy to break down the ring into
its constituent arrays.
The sg_ring header also encodes the maximum number of entries, useful
for routines which populate an sg. We need never hand around a number
of elements any more.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
include/linux/sg_ring.h
Obvious counterpart to dma_map_sg. Note that this is arch-independent
code; sg_rings are backwards compatible with simple sg arrays.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
drivers/base/dma-mapping.c | 13 +
include/linux/dma-mapping.h |4
2 files changed, 17
Obvious counterpart to blk_rq_map_sg.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -31,6 +31,7 @@
#include linux/blktrace_api.h
#include linux/fault-inject.h
#include linux/scatterlist.h
Hi Alan,
Was looking through initio.c to convert it to sg_ring, and noticed this
code:
initio_build_scb() around 2616:
sg = cblk-sglist[0];
scsi_for_each_sg(cmnd, sglist, cblk-sglen, i) {
sg-data =
, useful
for routines which populate an sg. We need never hand around a number
of elements any more.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
include/linux/sg_ring.h | 74
1 files changed, 74 insertions(+), 0 deletions(-)
create mode
blk_rq_map_sg_ring as a counterpart to blk_rq_map_sg.
Obvious counterpart to blk_rq_map_sg.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
block/ll_rw_blk.c | 55
include/linux/blkdev.h |1 +
2 files changed, 56 insertions(+), 0
Obvious counterpart to dma_map_sg. Note that this is arch-independent
code; sg_rings are backwards compatible with simple sg arrays.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
drivers/base/dma-mapping.c | 13 +
include/linux/dma-mapping.h |4
2 files changed, 17
, and buf_virt pointer, and always
initialize qc-nbytes in ata_sg_init().
It's possible that the ATA_QCFLAG_SG and ATA_QCFLAG_DMAMAP flags could
be entirely removed, and we could use whether qc-__sg is NULL or not.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff -r 8b1075c7ad47 drivers/ata/libata
simply append an sg_ring entry with the padding, and normal iterators
can be used.
I renamed qc-cursg to qc-cur_sg to catch all the users: they should
now be referring to 'qc-cur_sg[qc-cursg_i]' wherever they were using
'qc-cursg'.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff -r a867138da3e0
a scatterlist
array and two numbers indicating the number of readable and writable
elements respectively; now we can simply hand two sg_rings which is
much clearer (each sg_ring contains its own length).
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
---
drivers/block/virtio_blk.c| 33
If blk_rq_map_sg wrote more than was allocated in the scatterlist,
BUG_ON() is probably the right thing to do.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Acked-by: Jens Axboe [EMAIL PROTECTED]
---
drivers/scsi/scsi_tgt_lib.c | 11 +++
1 files changed, 3 insertions(+), 8 deletions
50 matches
Mail list logo