Skip to contentSkip to conversation

New: scsi_debug doesn't manage more than 1Tb

Bug 13143 [email protected] 3 participants 12 messages Apr 21, 2009 – Oct 6, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Summary: scsi_debug doesn't manage more than 1Tb
Product: SCSI Drivers
Version: 2.5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

While debugging a partitionner software that has issues with disks bigger than 1Tb, I found out that scsi_debug doesn't manage more than 1Tb:

# modprobe scsi_debug virtual_gb=1000
# cat /proc/partitions |fgrep sdc
   8       32 1048576000 sdc
# rmmod scsi_debug
# modprobe scsi_debug virtual_gb=1100
# cat /proc/partitions |fgrep sdc
   8       32 9223372035860725760 sdc

dmesg shows that the additionnal 100Gb makes it loose sight:
sd 16:0:0:0: [sdc] 2097152000 512-byte hardware sectors: (1.07 TB/1000 GiB) versus:
sd 15:0:0:0: [sdc] 18446744071721451520 512-byte hardware sectors: (18.4 EB/15.9 EiB)

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#1 lore raw
Quoted 29 lines · On Tue, 21 Apr 2009 16:07:08 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Summary: scsi_debug doesn't manage more than 1Tb
Product: SCSI Drivers
Version: 2.5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

While debugging a partitionner software that has issues with disks bigger than 1Tb, I found out that scsi_debug doesn't manage more than 1Tb:

# modprobe scsi_debug virtual_gb=1000
# cat /proc/partitions |fgrep sdc
   8       32 1048576000 sdc
# rmmod scsi_debug
# modprobe scsi_debug virtual_gb=1100
# cat /proc/partitions |fgrep sdc
   8       32 9223372035860725760 sdc
Quoted 5 lines

dmesg shows that the additionnal 100Gb makes it loose sight:
sd 16:0:0:0: [sdc] 2097152000 512-byte hardware sectors: (1.07 TB/1000 GiB) versus:
sd 15:0:0:0: [sdc] 18446744071721451520 512-byte hardware sectors: (18.4 EB/15.9 EiB)

=
From: FUJITA Tomonori <[email protected]>
Subject: [PATCH] scsi_debug: fix virtual disk larger than 1TB

---
 drivers/scsi/scsi_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/scsi_debug.c +1 -1
index 213123b..41a2177 100644
@@ -887,7 +887,7 @@ static int resp_start_stop(struct scsi_cmnd * scp,
 static sector_t get_sdebug_capacity(void)
 {
 	if (scsi_debug_virtual_gb > 0)
-		return 2048 * 1024 * scsi_debug_virtual_gb;
+		return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb;
 	else
 		return sdebug_store_sectors;
 }
Signature · 1 line
1.5.6.5
#2 lore raw
Quoted 39 lines · FUJITA Tomonori
Quoted 29 lines · On Tue, 21 Apr 2009 16:07:08 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Summary: scsi_debug doesn't manage more than 1Tb
Product: SCSI Drivers
Version: 2.5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

While debugging a partitionner software that has issues with disks bigger than 1Tb, I found out that scsi_debug doesn't manage more than 1Tb:

# modprobe scsi_debug virtual_gb=1000
# cat /proc/partitions |fgrep sdc
   8       32 1048576000 sdc
# rmmod scsi_debug
# modprobe scsi_debug virtual_gb=1100
# cat /proc/partitions |fgrep sdc
   8       32 9223372035860725760 sdc
Quoted 5 lines

dmesg shows that the additionnal 100Gb makes it loose sight:
sd 16:0:0:0: [sdc] 2097152000 512-byte hardware sectors: (1.07 TB/1000 GiB) versus:
sd 15:0:0:0: [sdc] 18446744071721451520 512-byte hardware sectors: (18.4 EB/15.9 EiB)

Quoted 5 lines

=
From: FUJITA Tomonori <[email protected]>
Subject: [PATCH] scsi_debug: fix virtual disk larger than 1TB

Wow, a 1 TB ram disk!

Quoted 17 lines
---
 drivers/scsi/scsi_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/scsi_debug.c +1 -1
index 213123b..41a2177 100644
@@ -887,7 +887,7 @@ static int resp_start_stop(struct scsi_cmnd * scp,
 static sector_t get_sdebug_capacity(void)
 {
 	if (scsi_debug_virtual_gb > 0)
-		return 2048 * 1024 * scsi_debug_virtual_gb;
+		return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb;
 	else
 		return sdebug_store_sectors;
 }
#3 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Cheng Renquan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Cheng Renquan <[email protected]> 2009-04-24 11:07:32 --- it seems invalid that you tested linux 2.5 ?

And could you describe it more detailed as in REPORTING-BUGS ?

I have also ITB disks and it cannot reproduce. Thanks.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#4 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #2 from Anonymous Emailer <[email protected]> 2009-04-24 18:25:45 ---
Reply-To: [email protected]

Quoted 39 lines · FUJITA Tomonori
Quoted 29 lines · On Tue, 21 Apr 2009 16:07:08 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Summary: scsi_debug doesn't manage more than 1Tb
Product: SCSI Drivers
Version: 2.5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

While debugging a partitionner software that has issues with disks bigger than 1Tb, I found out that scsi_debug doesn't manage more than 1Tb:

# modprobe scsi_debug virtual_gb=1000
# cat /proc/partitions |fgrep sdc
   8       32 1048576000 sdc
# rmmod scsi_debug
# modprobe scsi_debug virtual_gb=1100
# cat /proc/partitions |fgrep sdc
   8       32 9223372035860725760 sdc
Quoted 5 lines

dmesg shows that the additionnal 100Gb makes it loose sight:
sd 16:0:0:0: [sdc] 2097152000 512-byte hardware sectors: (1.07 TB/1000 GiB) versus:
sd 15:0:0:0: [sdc] 18446744071721451520 512-byte hardware sectors: (18.4 EB/15.9 EiB)

Quoted 5 lines

=
From: FUJITA Tomonori <[email protected]>
Subject: [PATCH] scsi_debug: fix virtual disk larger than 1TB

Wow, a 1 TB ram disk!

Quoted 17 lines
---
 drivers/scsi/scsi_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/scsi_debug.c +1 -1
index 213123b..41a2177 100644
@@ -887,7 +887,7 @@ static int resp_start_stop(struct scsi_cmnd * scp,
 static sector_t get_sdebug_capacity(void)
 {
 	if (scsi_debug_virtual_gb > 0)
-		return 2048 * 1024 * scsi_debug_virtual_gb;
+		return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb;
 	else
 		return sdebug_store_sectors;
 }
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#5 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #3 from Anonymous Emailer <[email protected]> 2009-04-25 04:41:58 ---
Reply-To: [email protected]

Quoted 29 lines · On Tue, 21 Apr 2009 16:07:08 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Summary: scsi_debug doesn't manage more than 1Tb
Product: SCSI Drivers
Version: 2.5
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

While debugging a partitionner software that has issues with disks bigger than 1Tb, I found out that scsi_debug doesn't manage more than 1Tb:

# modprobe scsi_debug virtual_gb=1000
# cat /proc/partitions |fgrep sdc
   8       32 1048576000 sdc
# rmmod scsi_debug
# modprobe scsi_debug virtual_gb=1100
# cat /proc/partitions |fgrep sdc
   8       32 9223372035860725760 sdc
Quoted 5 lines

dmesg shows that the additionnal 100Gb makes it loose sight:
sd 16:0:0:0: [sdc] 2097152000 512-byte hardware sectors: (1.07 TB/1000 GiB) versus:
sd 15:0:0:0: [sdc] 18446744071721451520 512-byte hardware sectors: (18.4 EB/15.9 EiB)

=
From: FUJITA Tomonori <[email protected]>
Subject: [PATCH] scsi_debug: fix virtual disk larger than 1TB

---
 drivers/scsi/scsi_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/scsi_debug.c +1 -1
index 213123b..41a2177 100644
@@ -887,7 +887,7 @@ static int resp_start_stop(struct scsi_cmnd * scp,
 static sector_t get_sdebug_capacity(void)
 {
     if (scsi_debug_virtual_gb > 0)
-        return 2048 * 1024 * scsi_debug_virtual_gb;
+        return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb;
     else
         return sdebug_store_sectors;
 }
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#6 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #4 from Thierry Vignaud <[email protected]> 2009-04-27 10:39:15 --- (In reply to comment #1)

Quoted 1 line

it seems invalid that you tested linux 2.5 ?

Version was auto filled by bugzilla. Really was 2.6.29.1

Quoted 1 line

And could you describe it more detailed as in REPORTING-BUGS ?

All needed data was provided in initial comment. And it was enough in order to provide a fix.

Quoted 1 line

I have also ITB disks and it cannot reproduce. Thanks.

It's not about 1Tb disks but about the scsi_debug driver.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#7 lore raw

Re: [Bug 13143] scsi_debug doesn't manage more than 1Tb

Quoted 8 lines · On Mon, 27 Apr 2009 10:41:00 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #4 from Thierry Vignaud <[email protected]> 2009-04-27 10:39:15 --- (In reply to comment #1)

Quoted 8 lines
Quoted 1 line

it seems invalid that you tested linux 2.5 ?

Version was auto filled by bugzilla. Really was 2.6.29.1

Quoted 1 line

And could you describe it more detailed as in REPORTING-BUGS ?

All needed data was provided in initial comment. And it was enough in order to provide a fix.

The patch is available:

http://marc.info/?l=linux-scsi&m=124063464410711&w=2

Can you confirm that it fixes the problem?

#8 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Alan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
     Kernel Version|                            |2.6.29.1
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#9 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #5 from Anonymous Emailer <[email protected]> 2009-04-28 08:32:02 ---
Reply-To: [email protected]

Quoted 8 lines · On Mon, 27 Apr 2009 10:41:00 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #4 from Thierry Vignaud <[email protected]> 2009-04-27 10:39:15 --- (In reply to comment #1)

Quoted 8 lines
Quoted 1 line

it seems invalid that you tested linux 2.5 ?

Version was auto filled by bugzilla. Really was 2.6.29.1

Quoted 1 line

And could you describe it more detailed as in REPORTING-BUGS ?

All needed data was provided in initial comment. And it was enough in order to provide a fix.

The patch is available:

http://marc.info/?l=linux-scsi&m=124063464410711&w=2

Can you confirm that it fixes the problem?

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#10 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

--- Comment #6 from Thierry Vignaud <[email protected]> 2009-04-29 06:31:39 --- It fixes it indeed.
You can queue it for upstream :-)

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#11 lore raw

[Bug 13143] scsi_debug doesn't manage more than 1Tb

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13143

Thierry Vignaud <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |CODE_FIX

--- Comment #7 from Thierry Vignaud <[email protected]> 2009-10-06 20:51:11 --- Fix merged upstream quite a long time ago...

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.