xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Pasi Kärkkäinen" <pasik@iki.fi>
To: Samuel Kvasnica <bugreports@list.ims.co.at>
Cc: xen-devel@lists.xensource.com
Subject: Re: vscsi 2TB patches
Date: Tue, 4 Jan 2011 01:06:21 +0200	[thread overview]
Message-ID: <20110103230621.GP2754@reaktio.net> (raw)
In-Reply-To: <4D222D71.9020508@list.ims.co.at>

On Mon, Jan 03, 2011 at 09:11:29PM +0100, Samuel Kvasnica wrote:
> Hello xen developers,
> 

Hello,

> the current xen vscsi driver implementation has a nasty >2TB limitation.
> Both the
> backend and frontend driver need a patch - included in the attachments.
> 

Thanks for the patch!

> Basically, for the frontend, just the max_cmd_len needs to be set correctly.
> For for the backend, at least the READ_16 and WRITE_16 scsi commands
> vere missing.
> I also enabled/added some more scsi commands to allow tape drives and
> autoloader
> work properly.
> 
> Could please somebody here take care to add this to mainstream code ?
> SuSE people were not interested really and the original author is not
> really known, i.e. "Copyright by Fujitsu Limited". I'm really sick of
> patching every new kernel over and over...
> 

Which kernels did you test this against? I assume this should be
applied to linux-2.6.18-xen tree.

Note that pvops kernels don't have pvscsi drivers yet! 
(Noone ported them yet from Xenlinux kernels).

Also two minor things:
	- Please send patches made with "diff -u" (unified diffs)
	- Include Signed-Off-By line

-- Pasi

> best ragards,
> 
> Sam
> 
> 

> diff -r ./scsiback.orig/emulate.c scsiback/emulate.c
> 30a31,35
> > /*
> > * Patched to support >2TB drives + allow tape & autoloader operations
> > * 2010, Samuel Kvasnica, IMS Nanofabrication AG
> > */
> > 
> 384,385c389,390
> < 	NO_EMULATE(TEST_UNIT_READY);       /*0x00*/
> < 	NO_EMULATE(REZERO_UNIT);           /*0x01*/
> ---
> > 	NO_EMULATE(TEST_UNIT_READY);       /*0x00*/ /* sd,st */
> > 	NO_EMULATE(REZERO_UNIT);           /*0x01*/ /* st */
> 388c393
> < 	NO_EMULATE(READ_BLOCK_LIMITS);     /*0x05*/
> ---
> > 	NO_EMULATE(READ_BLOCK_LIMITS);     /*0x05*/ /* st */
> 390,393c395,398
> < 	/*NO_EMULATE(INITIALIZE_ELEMENT_STATUS); *//*0x07*/
> < 	NO_EMULATE(READ_6);                /*0x08*/
> < 	NO_EMULATE(WRITE_6);               /*0x0a*/
> < 	/*NO_EMULATE(SEEK_6);                *//*0x0b*/
> ---
> > 	NO_EMULATE(INITIALIZE_ELEMENT_STATUS); /*0x07*/ /* ch */
> > 	NO_EMULATE(READ_6);                /*0x08*/ /* sd,st */
> > 	NO_EMULATE(WRITE_6);               /*0x0a*/ /* sd,st */
> > 	NO_EMULATE(SEEK_6);                /*0x0b*/
> 395,396c400,401
> < 	NO_EMULATE(WRITE_FILEMARKS);       /*0x10*/
> < 	NO_EMULATE(SPACE);                 /*0x11*/
> ---
> > 	NO_EMULATE(WRITE_FILEMARKS);       /*0x10*/ /* st */
> > 	NO_EMULATE(SPACE);                 /*0x11*/ /* st */
> 399c404
> < 	/*NO_EMULATE(MODE_SELECT);           *//*0x15*/
> ---
> > 	NO_EMULATE(MODE_SELECT);           /*0x15*/ /* st */
> 403,406c408,411
> < 	NO_EMULATE(ERASE);                 /*0x19*/
> < 	NO_EMULATE(MODE_SENSE);            /*0x1a*/
> < 	/*NO_EMULATE(START_STOP);            *//*0x1b*/
> < 	/*NO_EMULATE(RECEIVE_DIAGNOSTIC);    *//*0x1c*/
> ---
> > 	NO_EMULATE(ERASE);                 /*0x19*/ /* st */
> > 	NO_EMULATE(MODE_SENSE);            /*0x1a*/ /* st */
> > 	NO_EMULATE(START_STOP);            /*0x1b*/ /* sd,st */
> > 	NO_EMULATE(RECEIVE_DIAGNOSTIC);    /*0x1c*/
> 408c413
> < 	/*NO_EMULATE(ALLOW_MEDIUM_REMOVAL);  *//*0x1e*/
> ---
> > 	NO_EMULATE(ALLOW_MEDIUM_REMOVAL);  /*0x1e*/
> 411,415c416,420
> < 	NO_EMULATE(READ_CAPACITY);         /*0x25*/
> < 	NO_EMULATE(READ_10);               /*0x28*/
> < 	NO_EMULATE(WRITE_10);              /*0x2a*/
> < 	/*NO_EMULATE(SEEK_10);               *//*0x2b*/
> < 	/*NO_EMULATE(POSITION_TO_ELEMENT);   *//*0x2b*/
> ---
> > 	NO_EMULATE(READ_CAPACITY);         /*0x25*/ /* sd */
> > 	NO_EMULATE(READ_10);               /*0x28*/ /* sd */
> > 	NO_EMULATE(WRITE_10);              /*0x2a*/ /* sd */
> > 	NO_EMULATE(SEEK_10);               /*0x2b*/ /* st */
> > 	NO_EMULATE(POSITION_TO_ELEMENT);   /*0x2b*/ /* ch */
> 421,427c426,432
> < 	/*NO_EMULATE(SET_LIMITS);            *//*0x33*/
> < 	/*NO_EMULATE(PRE_FETCH);             *//*0x34*/
> < 	/*NO_EMULATE(READ_POSITION);         *//*0x34*/
> < 	/*NO_EMULATE(SYNCHRONIZE_CACHE);     *//*0x35*/
> < 	/*NO_EMULATE(LOCK_UNLOCK_CACHE);     *//*0x36*/
> < 	/*NO_EMULATE(READ_DEFECT_DATA);      *//*0x37*/
> < 	/*NO_EMULATE(MEDIUM_SCAN);           *//*0x38*/
> ---
> > 	NO_EMULATE(SET_LIMITS);            /*0x33*/
> > 	NO_EMULATE(PRE_FETCH);             /*0x34*/ /* st! */
> > 	NO_EMULATE(READ_POSITION);          /*0x34*/ /* st */
> > 	NO_EMULATE(SYNCHRONIZE_CACHE);      /*0x35*/ /* sd */
> > 	NO_EMULATE(LOCK_UNLOCK_CACHE);     /*0x36*/
> > 	NO_EMULATE(READ_DEFECT_DATA);      /*0x37*/
> > 	NO_EMULATE(MEDIUM_SCAN);           /*0x38*/
> 430,431c435,436
> < 	/*NO_EMULATE(WRITE_BUFFER);          *//*0x3b*/
> < 	/*NO_EMULATE(READ_BUFFER);           *//*0x3c*/
> ---
> > 	NO_EMULATE(WRITE_BUFFER);          /*0x3b*/
> > 	NO_EMULATE(READ_BUFFER);           /*0x3c*/ /* osst */
> 437,439c442,444
> < 	/*NO_EMULATE(READ_TOC);              *//*0x43*/
> < 	/*NO_EMULATE(LOG_SELECT);            *//*0x4c*/
> < 	/*NO_EMULATE(LOG_SENSE);             *//*0x4d*/
> ---
> > 	NO_EMULATE(READ_TOC);              /*0x43*/ /* sr */
> > 	NO_EMULATE(LOG_SELECT);            /*0x4c*/
> > 	NO_EMULATE(LOG_SENSE);             /*0x4d*/ /* st! */
> 443c448
> < 	/*NO_EMULATE(MODE_SENSE_10);         *//*0x5a*/
> ---
> > 	NO_EMULATE(MODE_SENSE_10);         /*0x5a*/ /* scsi_lib */
> 447,448c452,455
> < 	/*NO_EMULATE(MOVE_MEDIUM);           *//*0xa5*/
> < 	/*NO_EMULATE(EXCHANGE_MEDIUM);       *//*0xa6*/
> ---
> > 	NO_EMULATE(MAINTENANCE_IN);           /*0xa3*/ /* IFT alua */
> > 	NO_EMULATE(MAINTENANCE_OUT);       /*0xa4*/ /* IFT alua */
> > 	NO_EMULATE(MOVE_MEDIUM);           /*0xa5*/ /* ch */
> > 	NO_EMULATE(EXCHANGE_MEDIUM);       /*0xa6*/ /* ch */
> 455,456c462,463
> < 	/*NO_EMULATE(READ_ELEMENT_STATUS);   *//*0xb8*/
> < 	/*NO_EMULATE(SEND_VOLUME_TAG);       *//*0xb6*/
> ---
> > 	NO_EMULATE(READ_ELEMENT_STATUS);   /*0xb8*/ /* ch */
> > 	NO_EMULATE(SEND_VOLUME_TAG);       /*0xb6*/ /* ch */
> 458,461c465,468
> < 	/*NO_EMULATE(READ_16);               *//*0x88*/
> < 	/*NO_EMULATE(WRITE_16);              *//*0x8a*/
> < 	/*NO_EMULATE(VERIFY_16);	      *//*0x8f*/
> < 	/*NO_EMULATE(SERVICE_ACTION_IN);     *//*0x9e*/
> ---
> > 	NO_EMULATE(READ_16);               /*0x88*/ /* sd >2TB */
> > 	NO_EMULATE(WRITE_16);              /*0x8a*/ /* sd >2TB */
> > 	NO_EMULATE(VERIFY_16);	           /*0x8f*/
> > 	NO_EMULATE(SERVICE_ACTION_IN);     /*0x9e*/ /* sd >2TB */
> 462a470
> > /* st: QFA_REQUEST_BLOCK, QFA_SEEK_BLOCK */

> diff -r ./scsifront.orig/xenbus.c ./scsifront/xenbus.c
> 30c30,34
> <  
> ---
> > 
> > /*
> > * Patched to support >2TB drives
> > * 2010, Samuel Kvasnica, IMS Nanofabrication AG
> > */
> 125d128
> < 
> 222a226
> > 	host->max_cmd_len = VSCSIIF_MAX_COMMAND_SIZE;

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2011-01-03 23:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 20:11 vscsi 2TB patches Samuel Kvasnica
2011-01-03 23:06 ` Pasi Kärkkäinen [this message]
2011-01-04 11:24   ` Samuel Kvasnica
2011-01-04 11:44     ` Jan Beulich
     [not found]       ` <4D231A46.2000209@list.ims.co.at>
     [not found]         ` <4D232ADB020000780002A33B@vpn.id2.novell.com>
     [not found]           ` <4D2321DE.9030706@list.ims.co.at>
     [not found]             ` <4D233968020000780002A36E@vpn.id2.novell.com>
2011-01-04 14:46               ` Samuel Kvasnica
2011-01-04 14:55                 ` Jan Beulich
2011-01-04 11:47     ` Jan Beulich
2011-01-04 13:03       ` Samuel Kvasnica
2011-01-04 13:07         ` Jan Beulich
2011-01-04 13:23           ` Samuel Kvasnica
2011-01-04 14:06             ` Jan Beulich
2011-01-11 16:26             ` Jan Beulich
2011-01-18 11:45             ` Jan Beulich
2011-01-24 12:24               ` Samuel Kvasnica
2011-01-04  9:47 ` Jan Beulich
2011-01-04 12:57   ` Samuel Kvasnica
2011-01-04 13:01     ` Jan Beulich

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=20110103230621.GP2754@reaktio.net \
    --to=pasik@iki.fi \
    --cc=bugreports@list.ims.co.at \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).