[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] vscsi 2TB patches



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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.