linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* request size limit in scsi tape driver
@ 2012-08-20 15:50 Olaf Hering
  2012-08-20 18:44 ` Kai Makisara
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2012-08-20 15:50 UTC (permalink / raw)
  To: linux-scsi


Currently the st driver does not to break up write requests into smaller
chunks to satisfy the ->max_hw_sectors limit of the underlying host driver.

 # modprobe -v scsi_debug ptype=1 opts=1 dev_size_mb=123
 # dd if=/dev/zero of=/dev/st0 bs=$((1024*54321))

This leads to -EBUSY from this call chain:
st_write -> st_do_scsi -> st_scsi_execute -> blk_rq_map_user

What is the reason for this behaviour?
Should st_write write in smaller chunks, or would that break real
hardware because they expect certain block sizes?

The specific issue at hand I have is that the (out-of-tree) Xen pvscsi
has a ->max_hw_sectors limit of 200, which limits the block size in a
guest to 100K.


Olaf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: request size limit in scsi tape driver
  2012-08-20 15:50 request size limit in scsi tape driver Olaf Hering
@ 2012-08-20 18:44 ` Kai Makisara
  2012-08-23 13:10   ` Olaf Hering
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Makisara @ 2012-08-20 18:44 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-scsi

On Mon, 20 Aug 2012, Olaf Hering wrote:

> 
> Currently the st driver does not to break up write requests into smaller
> chunks to satisfy the ->max_hw_sectors limit of the underlying host driver.
> 
>  # modprobe -v scsi_debug ptype=1 opts=1 dev_size_mb=123
>  # dd if=/dev/zero of=/dev/st0 bs=$((1024*54321))
> 
> This leads to -EBUSY from this call chain:
> st_write -> st_do_scsi -> st_scsi_execute -> blk_rq_map_user
> 
> What is the reason for this behaviour?
> Should st_write write in smaller chunks, or would that break real
> hardware because they expect certain block sizes?
> 
In variable block mode the write() byte count determines the size of the 
tape block. Exactly one SCSI command is used to write one block. This is 
why the writes can't be split in variable block mode. In fixed block mode 
the writes are split but this results in several tape blocks for each 
write().

Kai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: request size limit in scsi tape driver
  2012-08-20 18:44 ` Kai Makisara
@ 2012-08-23 13:10   ` Olaf Hering
  0 siblings, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2012-08-23 13:10 UTC (permalink / raw)
  To: Kai Makisara; +Cc: linux-scsi

On Mon, Aug 20, Kai Makisara wrote:

> On Mon, 20 Aug 2012, Olaf Hering wrote:
> 
> > 
> > Currently the st driver does not to break up write requests into smaller
> > chunks to satisfy the ->max_hw_sectors limit of the underlying host driver.
> > 
> >  # modprobe -v scsi_debug ptype=1 opts=1 dev_size_mb=123
> >  # dd if=/dev/zero of=/dev/st0 bs=$((1024*54321))
> > 
> > This leads to -EBUSY from this call chain:
> > st_write -> st_do_scsi -> st_scsi_execute -> blk_rq_map_user
> > 
> > What is the reason for this behaviour?
> > Should st_write write in smaller chunks, or would that break real
> > hardware because they expect certain block sizes?
> > 
> In variable block mode the write() byte count determines the size of the 
> tape block. Exactly one SCSI command is used to write one block. This is 
> why the writes can't be split in variable block mode. In fixed block mode 
> the writes are split but this results in several tape blocks for each 
> write().

Thats very unfortunate.
Would it be possible in theory to split and reassemble the SCSI commands
in backend/frontend to overcome this protocol limit in pvscsi?

Olaf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-23 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 15:50 request size limit in scsi tape driver Olaf Hering
2012-08-20 18:44 ` Kai Makisara
2012-08-23 13:10   ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).