public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 5/6] scsi: use 64-bit value for 'max_luns'
       [not found] ` <1401785937-43581-6-git-send-email-hare@suse.de>
@ 2014-06-25 12:28   ` Christoph Hellwig
  2014-06-25 12:31     ` Hannes Reinecke
  2014-07-09  0:00     ` Rusty Russell
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2014-06-25 12:28 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: James Bottomley, Christoph Hellwig, Ewan Milne, linux-scsi,
	Rusty Russell, linux-kernel

On Tue, Jun 03, 2014 at 10:58:56AM +0200, Hannes Reinecke wrote:
> Now that we're using 64-bit LUNs internally we need to increase
> the size of max_luns to 64 bits, too.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Reviewed-by: Christoph Hellwig <hch@infradead.org>
> Reviewed-by: Ewan Milne <emilne@redhat.com>

I just noticed that this has changes to the module param code.
These should be split into a separate patch and be ACKed by the modules
maintainer.  I'd still love to take the change through the SCSI tree to
be able to get this into 3.17 easily.

moduleparam changes below:

> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
> index 204a677..21e2ba6 100644
> --- a/include/linux/moduleparam.h
> +++ b/include/linux/moduleparam.h
> @@ -381,6 +381,11 @@ extern int param_set_ulong(const char *val, const struct kernel_param *kp);
>  extern int param_get_ulong(char *buffer, const struct kernel_param *kp);
>  #define param_check_ulong(name, p) __param_check(name, p, unsigned long)
>  
> +extern struct kernel_param_ops param_ops_ullong;
> +extern int param_set_ullong(const char *val, const struct kernel_param *kp);
> +extern int param_get_ullong(char *buffer, const struct kernel_param *kp);
> +#define param_check_ullong(name, p) __param_check(name, p, unsigned long long)
> +
>  extern struct kernel_param_ops param_ops_charp;
>  extern int param_set_charp(const char *val, const struct kernel_param *kp);
>  extern int param_get_charp(char *buffer, const struct kernel_param *kp);

> diff --git a/kernel/params.c b/kernel/params.c
> index b00142e..2b2a9dd 100644
> --- a/kernel/params.c
> +++ b/kernel/params.c
> @@ -253,6 +253,7 @@ STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
>  STANDARD_PARAM_DEF(uint, unsigned int, "%u", 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);
>  
>  int param_set_charp(const char *val, const struct kernel_param *kp)
>  {
> -- 
> 1.7.12.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
---end quoted text---

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

* Re: [PATCH 5/6] scsi: use 64-bit value for 'max_luns'
  2014-06-25 12:28   ` [PATCH 5/6] scsi: use 64-bit value for 'max_luns' Christoph Hellwig
@ 2014-06-25 12:31     ` Hannes Reinecke
  2014-06-25 12:33       ` Christoph Hellwig
  2014-07-09  0:00     ` Rusty Russell
  1 sibling, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2014-06-25 12:31 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: James Bottomley, Ewan Milne, linux-scsi, Rusty Russell,
	linux-kernel

On 06/25/2014 02:28 PM, Christoph Hellwig wrote:
> On Tue, Jun 03, 2014 at 10:58:56AM +0200, Hannes Reinecke wrote:
>> Now that we're using 64-bit LUNs internally we need to increase
>> the size of max_luns to 64 bits, too.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> Reviewed-by: Christoph Hellwig <hch@infradead.org>
>> Reviewed-by: Ewan Milne <emilne@redhat.com>
>
> I just noticed that this has changes to the module param code.
> These should be split into a separate patch and be ACKed by the modules
> maintainer.  I'd still love to take the change through the SCSI tree to
> be able to get this into 3.17 easily.
>
> moduleparam changes below:
>
Guess I need to redo the patchset yet again ...
Oh well.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

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

* Re: [PATCH 5/6] scsi: use 64-bit value for 'max_luns'
  2014-06-25 12:31     ` Hannes Reinecke
@ 2014-06-25 12:33       ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2014-06-25 12:33 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Christoph Hellwig, James Bottomley, Ewan Milne, linux-scsi,
	Rusty Russell, linux-kernel

On Wed, Jun 25, 2014 at 02:31:31PM +0200, Hannes Reinecke wrote:
> Guess I need to redo the patchset yet again ...

If you plan to resend it please also include these fixes for the
mptfusion driver:


diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 02a3eef..bf2a2ce 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -204,7 +204,7 @@ mptfc_block_error_handler(struct scsi_cmnd *SCpnt,
 	 || (loops > 0 && ioc->active == 0)) {
 		spin_unlock_irqrestore(shost->host_lock, flags);
 		dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT
-			"mptfc_block_error_handler.%d: %d:%d, port status is "
+			"mptfc_block_error_handler.%d: %d:%llu, port status is "
 			"%x, active flag %d, deferring %s recovery.\n",
 			ioc->name, ioc->sh->host_no,
 			SCpnt->device->id, SCpnt->device->lun,
@@ -218,7 +218,7 @@ mptfc_block_error_handler(struct scsi_cmnd *SCpnt,
 	if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata
 	 || ioc->active == 0) {
 		dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT
-			"%s.%d: %d:%d, failing recovery, "
+			"%s.%d: %d:%llu, failing recovery, "
 			"port state %x, active %d, vdevice %p.\n", caller,
 			ioc->name, ioc->sh->host_no,
 			SCpnt->device->id, SCpnt->device->lun, ready,
@@ -226,7 +226,7 @@ mptfc_block_error_handler(struct scsi_cmnd *SCpnt,
 		return FAILED;
 	}
 	dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT
-		"%s.%d: %d:%d, executing recovery.\n", caller,
+		"%s.%d: %d:%llu, executing recovery.\n", caller,
 		ioc->name, ioc->sh->host_no,
 		SCpnt->device->id, SCpnt->device->lun));
 	return (*func)(SCpnt);
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 82d991d..5b06d68 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -536,7 +536,7 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, struct scsi_cmnd *sc, SCSIIOReply_t * pSc
 	}
 
 	scsi_print_command(sc);
-	printk(MYIOC_s_DEBUG_FMT "\tfw_channel = %d, fw_id = %d, lun = %d\n",
+	printk(MYIOC_s_DEBUG_FMT "\tfw_channel = %d, fw_id = %d, lun = %llu\n",
 	    ioc->name, pScsiReply->Bus, pScsiReply->TargetID, sc->device->lun);
 	printk(MYIOC_s_DEBUG_FMT "\trequest_len = %d, underflow = %d, "
 	    "resid = %d\n", ioc->name, scsi_bufflen(sc), sc->underflow,
@@ -1155,7 +1155,7 @@ mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSI
 		return;
 	ioc = hd->ioc;
 	if (time - hd->last_queue_full > 10 * HZ) {
-		dprintk(ioc, printk(MYIOC_s_WARN_FMT "Device (%d:%d:%d) reported QUEUE_FULL!\n",
+		dprintk(ioc, printk(MYIOC_s_WARN_FMT "Device (%d:%d:%llu) reported QUEUE_FULL!\n",
 				ioc->name, 0, sc->device->id, sc->device->lun));
 		hd->last_queue_full = time;
 	}
@@ -2380,7 +2380,7 @@ mptscsih_slave_configure(struct scsi_device *sdev)
 	vdevice = sdev->hostdata;
 
 	dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-		"device @ %p, channel=%d, id=%d, lun=%d\n",
+		"device @ %p, channel=%d, id=%d, lun=%llu\n",
 		ioc->name, sdev, sdev->channel, sdev->id, sdev->lun));
 	if (ioc->bus_type == SPI)
 		dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT

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

* Re: [PATCH 5/6] scsi: use 64-bit value for 'max_luns'
  2014-06-25 12:28   ` [PATCH 5/6] scsi: use 64-bit value for 'max_luns' Christoph Hellwig
  2014-06-25 12:31     ` Hannes Reinecke
@ 2014-07-09  0:00     ` Rusty Russell
  1 sibling, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2014-07-09  0:00 UTC (permalink / raw)
  To: Christoph Hellwig, Hannes Reinecke
  Cc: James Bottomley, Christoph Hellwig, Ewan Milne, linux-scsi,
	linux-kernel

Christoph Hellwig <hch@infradead.org> writes:
> On Tue, Jun 03, 2014 at 10:58:56AM +0200, Hannes Reinecke wrote:
>> Now that we're using 64-bit LUNs internally we need to increase
>> the size of max_luns to 64 bits, too.
>> 
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> Reviewed-by: Christoph Hellwig <hch@infradead.org>
>> Reviewed-by: Ewan Milne <emilne@redhat.com>
>
> I just noticed that this has changes to the module param code.
> These should be split into a separate patch and be ACKed by the modules
> maintainer.  I'd still love to take the change through the SCSI tree to
> be able to get this into 3.17 easily.
>
> moduleparam changes below:
>
>> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
>> index 204a677..21e2ba6 100644
>> --- a/include/linux/moduleparam.h
>> +++ b/include/linux/moduleparam.h
>> @@ -381,6 +381,11 @@ extern int param_set_ulong(const char *val, const struct kernel_param *kp);
>>  extern int param_get_ulong(char *buffer, const struct kernel_param *kp);
>>  #define param_check_ulong(name, p) __param_check(name, p, unsigned long)
>>  
>> +extern struct kernel_param_ops param_ops_ullong;
>> +extern int param_set_ullong(const char *val, const struct kernel_param *kp);
>> +extern int param_get_ullong(char *buffer, const struct kernel_param *kp);
>> +#define param_check_ullong(name, p) __param_check(name, p, unsigned long long)
>> +
>>  extern struct kernel_param_ops param_ops_charp;
>>  extern int param_set_charp(const char *val, const struct kernel_param *kp);
>>  extern int param_get_charp(char *buffer, const struct kernel_param *kp);
>
>> diff --git a/kernel/params.c b/kernel/params.c
>> index b00142e..2b2a9dd 100644
>> --- a/kernel/params.c
>> +++ b/kernel/params.c
>> @@ -253,6 +253,7 @@ STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
>>  STANDARD_PARAM_DEF(uint, unsigned int, "%u", 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 <rusty@rustcorp.com.au>

Cheers,
Rusty.

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

end of thread, other threads:[~2014-07-09  0:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1401785937-43581-1-git-send-email-hare@suse.de>
     [not found] ` <1401785937-43581-6-git-send-email-hare@suse.de>
2014-06-25 12:28   ` [PATCH 5/6] scsi: use 64-bit value for 'max_luns' Christoph Hellwig
2014-06-25 12:31     ` Hannes Reinecke
2014-06-25 12:33       ` Christoph Hellwig
2014-07-09  0:00     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox