* 3GB limit? *2* GB limit?!
@ 2009-02-04 0:58 Miles Nordin
2009-02-04 7:40 ` Artem Bityutskiy
0 siblings, 1 reply; 6+ messages in thread
From: Miles Nordin @ 2009-02-04 0:58 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
I'm trying to experiment with ubifs on a 16GB USB stick. I've
downloaded and built:
~2009-02-01
git://git.infradead.org/~dedekind/ubifs-v2.6.25.git -- full kernel tree. :(
git://git.infradead.org/mtd-utils.git (sys-fs/mtd-utils-9999 in gentoo)
I'm running these commands and getting this output:
-----8<-----
# uname -a
Linux fishstick 2.6.25-gentoo-r8 #2 SMP PREEMPT Wed Feb 4 05:23:36 UTC 2009 i686 AMD Phenom(tm) 9850 Quad-Core Processor AuthenticAMD GNU/Linux
# ls -l /dev/mtd*
ls: cannot access /dev/mtd*: No such file or directory
# modprobe block2mtd block2mtd=/dev/sdj,128KiB
# modprobe mtdchar
# ls -l /dev/mtd*
crw-rw---- 1 root root 90, 0 Feb 4 06:29 /dev/mtd0
crw-rw---- 1 root root 90, 1 Feb 4 06:29 /dev/mtd0ro
fishstick devices # ubiformat /dev/mtd0
ubiformat: mtd0 (RAM-based), size 3246391296 bytes (3.0 GiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 1 bytes
libscan: scanning eraseblock 16384 -- 66 % complete libmtd: error!: cannot seek mtd0 to offset 18446744071562067968
error 22 (Invalid argument)
ubiformat: error!: failed to scan mtd0 (/dev/mtd0)
# fdisk /dev/sdj
Device contains neither a valid DOS partition table, nor Sun, SGI
[...]
Command (m for help): p
Disk /dev/sdj: 16.1 GB, 16131293184 bytes
-----8<-----
sooo.....first, size is 3.0GiB? not 16GiB?
second, ubiformat has 2GB limit? Is this FAT or something---what
gives? Have I missed a ``wings stay on'' switch in 'make menuconfig'?
[-- Attachment #2: Type: application/pgp-signature, Size: 304 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 3GB limit? *2* GB limit?!
2009-02-04 0:58 3GB limit? *2* GB limit?! Miles Nordin
@ 2009-02-04 7:40 ` Artem Bityutskiy
2009-02-04 15:54 ` Mike Frysinger
2009-02-04 18:47 ` Miles Nordin
0 siblings, 2 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2009-02-04 7:40 UTC (permalink / raw)
To: Miles Nordin; +Cc: linux-mtd
On Tue, 2009-02-03 at 19:58 -0500, Miles Nordin wrote:
> I'm trying to experiment with ubifs on a 16GB USB stick. I've
> downloaded and built:
snip
> -----8<-----
> # uname -a
> Linux fishstick 2.6.25-gentoo-r8 #2 SMP PREEMPT Wed Feb 4 05:23:36 UTC 2009 i686 AMD Phenom(tm) 9850 Quad-Core Processor AuthenticAMD GNU/Linux
> # ls -l /dev/mtd*
> ls: cannot access /dev/mtd*: No such file or directory
> # modprobe block2mtd block2mtd=/dev/sdj,128KiB
> # modprobe mtdchar
> # ls -l /dev/mtd*
> crw-rw---- 1 root root 90, 0 Feb 4 06:29 /dev/mtd0
> crw-rw---- 1 root root 90, 1 Feb 4 06:29 /dev/mtd0ro
> fishstick devices # ubiformat /dev/mtd0
> ubiformat: mtd0 (RAM-based), size 3246391296 bytes (3.0 GiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 1 bytes
> libscan: scanning eraseblock 16384 -- 66 % complete libmtd: error!: cannot seek mtd0 to offset 18446744071562067968
> error 22 (Invalid argument)
> ubiformat: error!: failed to scan mtd0 (/dev/mtd0)
> # fdisk /dev/sdj
> Device contains neither a valid DOS partition table, nor Sun, SGI
MTD user-space interface is 32-bit, and is simited by 2GiB. You have to
upgrade it to use larger devices.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 3GB limit? *2* GB limit?!
2009-02-04 7:40 ` Artem Bityutskiy
@ 2009-02-04 15:54 ` Mike Frysinger
2009-02-05 9:17 ` Adrian Hunter
2009-02-04 18:47 ` Miles Nordin
1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2009-02-04 15:54 UTC (permalink / raw)
To: dedekind; +Cc: Miles Nordin, linux-mtd
On Wed, Feb 4, 2009 at 02:40, Artem Bityutskiy wrote:
> On Tue, 2009-02-03 at 19:58 -0500, Miles Nordin wrote:
>> -----8<-----
>> # uname -a
>> Linux fishstick 2.6.25-gentoo-r8 #2 SMP PREEMPT Wed Feb 4 05:23:36 UTC 2009 i686 AMD Phenom(tm) 9850 Quad-Core Processor AuthenticAMD GNU/Linux
>> # ls -l /dev/mtd*
>> ls: cannot access /dev/mtd*: No such file or directory
>> # modprobe block2mtd block2mtd=/dev/sdj,128KiB
>> # modprobe mtdchar
>> # ls -l /dev/mtd*
>> crw-rw---- 1 root root 90, 0 Feb 4 06:29 /dev/mtd0
>> crw-rw---- 1 root root 90, 1 Feb 4 06:29 /dev/mtd0ro
>> fishstick devices # ubiformat /dev/mtd0
>> ubiformat: mtd0 (RAM-based), size 3246391296 bytes (3.0 GiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 1 bytes
>> libscan: scanning eraseblock 16384 -- 66 % complete libmtd: error!: cannot seek mtd0 to offset 18446744071562067968
>> error 22 (Invalid argument)
>> ubiformat: error!: failed to scan mtd0 (/dev/mtd0)
>> # fdisk /dev/sdj
>> Device contains neither a valid DOS partition table, nor Sun, SGI
>
> MTD user-space interface is 32-bit, and is simited by 2GiB. You have to
> upgrade it to use larger devices.
you mean the MTD user-space code he is currently using, not current
MTD user-space in general ?
-mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 3GB limit? *2* GB limit?!
2009-02-04 7:40 ` Artem Bityutskiy
2009-02-04 15:54 ` Mike Frysinger
@ 2009-02-04 18:47 ` Miles Nordin
2009-02-05 9:26 ` Artem Bityutskiy
1 sibling, 1 reply; 6+ messages in thread
From: Miles Nordin @ 2009-02-04 18:47 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
>>>>> "ab" == Artem Bityutskiy <dedekind@infradead.org> writes:
ab> MTD user-space interface is 32-bit, and is simited by
ab> 2GiB. You have to upgrade it to use larger devices.
I am using mtd-tools from git, pulled a couple days ago. or thought I
was. What do you mean by upgrade? Do you mean ``redesign the
interface and rewrite the tools'' or ``use Linux/amd64'' or ``pull
something else from git''?
[-- Attachment #2: Type: application/pgp-signature, Size: 304 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 3GB limit? *2* GB limit?!
2009-02-04 15:54 ` Mike Frysinger
@ 2009-02-05 9:17 ` Adrian Hunter
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2009-02-05 9:17 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Miles Nordin, linux-mtd@lists.infradead.org
Mike Frysinger wrote:
> On Wed, Feb 4, 2009 at 02:40, Artem Bityutskiy wrote:
>> On Tue, 2009-02-03 at 19:58 -0500, Miles Nordin wrote:
>>> -----8<-----
>>> # uname -a
>>> Linux fishstick 2.6.25-gentoo-r8 #2 SMP PREEMPT Wed Feb 4 05:23:36 UTC 2009 i686 AMD Phenom(tm) 9850 Quad-Core Processor AuthenticAMD GNU/Linux
>>> # ls -l /dev/mtd*
>>> ls: cannot access /dev/mtd*: No such file or directory
>>> # modprobe block2mtd block2mtd=/dev/sdj,128KiB
>>> # modprobe mtdchar
>>> # ls -l /dev/mtd*
>>> crw-rw---- 1 root root 90, 0 Feb 4 06:29 /dev/mtd0
>>> crw-rw---- 1 root root 90, 1 Feb 4 06:29 /dev/mtd0ro
>>> fishstick devices # ubiformat /dev/mtd0
>>> ubiformat: mtd0 (RAM-based), size 3246391296 bytes (3.0 GiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 1 bytes
>>> libscan: scanning eraseblock 16384 -- 66 % complete libmtd: error!: cannot seek mtd0 to offset 18446744071562067968
>>> error 22 (Invalid argument)
>>> ubiformat: error!: failed to scan mtd0 (/dev/mtd0)
>>> # fdisk /dev/sdj
>>> Device contains neither a valid DOS partition table, nor Sun, SGI
>> MTD user-space interface is 32-bit, and is simited by 2GiB. You have to
>> upgrade it to use larger devices.
>
> you mean the MTD user-space code he is currently using, not current
> MTD user-space in general ?
> -mike
>From 2.6.29, the internal MTD API will support 64-bit sizes,
however, presently it only supports 32-bits (probably only 1GiB
safely).
However, in any case, the MTD ioctls use unsigned 32-bit integers
for sizes, so they must be hacked or 64-bit ioctls added to use
MTD's that are 4GiB or over.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 3GB limit? *2* GB limit?!
2009-02-04 18:47 ` Miles Nordin
@ 2009-02-05 9:26 ` Artem Bityutskiy
0 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2009-02-05 9:26 UTC (permalink / raw)
To: Miles Nordin; +Cc: linux-mtd
On Wed, 2009-02-04 at 13:47 -0500, Miles Nordin wrote:
> >>>>> "ab" == Artem Bityutskiy <dedekind@infradead.org> writes:
>
> ab> MTD user-space interface is 32-bit, and is simited by
> ab> 2GiB. You have to upgrade it to use larger devices.
>
> I am using mtd-tools from git, pulled a couple days ago. or thought I
> was. What do you mean by upgrade? Do you mean ``redesign the
> interface and rewrite the tools'' or ``use Linux/amd64'' or ``pull
> something else from git''?
Miles,
please, glance at the include/mtd/mtd-abi.h file. This file defines the
interface between user-space applications and MTD devices. Notice that
the "size" field in the "struct mtd_info_user" data structure is 32-bit.
So the size of the MTD device is limited by 4GiB. Look at other data
structures and notice a similar thing.
Thus, you have to invent a new user-space interface for MTD. Internally,
it is 64-bit already. You do not have to have amd64. You have to code,
unfortunately.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-05 9:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 0:58 3GB limit? *2* GB limit?! Miles Nordin
2009-02-04 7:40 ` Artem Bityutskiy
2009-02-04 15:54 ` Mike Frysinger
2009-02-05 9:17 ` Adrian Hunter
2009-02-04 18:47 ` Miles Nordin
2009-02-05 9:26 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox