From: Zoltan Boszormenyi <zboszor@dunaweb.hu>
To: linux-kernel@vger.kernel.org
Subject: Is there a way to limit VFAT allocation?
Date: Mon, 16 Oct 2006 12:06:02 +0200 [thread overview]
Message-ID: <4533598A.3040909@dunaweb.hu> (raw)
Hi,
I have bought a 2GB MP3 player / flash disk
that erroneously partitions and formats its storage.
The built-in firmware has an off-by-one bug that
creates the partition one cylinder larger that the
disk size allows and then it formats the VFAT fs
according to the buggy partition size. No wonder
when I try to copy large amounts of data to the
flash disk it detects errors and then remounts it
read-only.
I tried to repartition and reformat it three times
with different mformat or mkdosfs options
but as soon as I remove it from the USB port,
the device detects changed disk format and
automatically reformats itself again, so it
stays buggy.
Here's the excerpt from the logs on one occasion
I tried to copy some large stuff onto it:
Oct 3 22:56:31 host-81-17-177-202 kernel: SCSI device sdb: 4095765
512-byte hdwr sectors (2097 MB)
Oct 3 22:56:31 host-81-17-177-202 kernel: sdb: Write Protect is off
Oct 3 22:56:32 host-81-17-177-202 kernel: sdb: assuming drive cache:
write through
Oct 3 22:56:32 host-81-17-177-202 kernel: SCSI device sdb: 4095765
512-byte hdwr sectors (2097 MB)
Oct 3 22:56:32 host-81-17-177-202 kernel: sdb: Write Protect is off
Oct 3 22:56:32 host-81-17-177-202 kernel: sdb: assuming drive cache:
write through
Oct 3 22:56:33 host-81-17-177-202 kernel: sdb: sdb1
Oct 3 22:56:33 host-81-17-177-202 kernel: sdb: p1 exceeds device capacity
Oct 3 22:56:33 host-81-17-177-202 kernel: sd 6:0:0:0: Attached scsi
removable disk sdb
Oct 3 22:56:33 host-81-17-177-202 kernel: sd 6:0:0:0: Attached scsi
generic sg1 type 0
Oct 3 22:56:33 host-81-17-177-202 kernel: sd 5:0:0:0: Attached scsi
removable disk sdc
Oct 3 22:56:33 host-81-17-177-202 kernel: sd 5:0:0:0: Attached scsi
generic sg2 type 0
Oct 3 22:56:33 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095616
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095617
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095618
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095619
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095620
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095621
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095622
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095623
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095616
Oct 3 22:56:34 host-81-17-177-202 kernel: Buffer I/O error on device
sdb1, logical block 4095617
Oct 3 22:56:34 host-81-17-177-202 kernel: SELinux: initialized (dev
sdb1, type vfat), uses genfs_contexts
...
Oct 3 23:26:53 host-81-17-177-202 kernel: FAT: Filesystem panic (dev sdb1)
Oct 3 23:26:53 host-81-17-177-202 kernel: fat_get_cluster: invalid
cluster chain (i_pos 0)
Oct 3 23:26:53 host-81-17-177-202 kernel: File system has been set
read-only
...
Oct 3 23:31:35 host-81-17-177-202 kernel: FAT: Filesystem panic (dev sdb1)
Oct 3 23:31:35 host-81-17-177-202 kernel: fat_get_cluster: invalid
cluster chain (i_pos 0)
Oct 3 23:35:33 host-81-17-177-202 kernel: FAT: Filesystem panic (dev sdb1)
Oct 3 23:35:33 host-81-17-177-202 kernel: fat_bmap_cluster: request
beyond EOF (i_pos 47395744)
Oct 3 23:35:33 host-81-17-177-202 kernel: FAT: Filesystem panic (dev sdb1)
Oct 3 23:35:33 host-81-17-177-202 kernel: fat_bmap_cluster: request
beyond EOF (i_pos 47395744)
Oct 3 23:35:33 host-81-17-177-202 kernel: FAT: Filesystem panic (dev sdb1)
Oct 3 23:35:33 host-81-17-177-202 kernel: fat_bmap_cluster: request
beyond EOF (i_pos 47395744)
Oct 3 23:35:33 host-81-17-177-202 kernel: FAT: Filesystem panic (dev sdb1)
Oct 3 23:35:33 host-81-17-177-202 kernel: fat_bmap_cluster: request
beyond EOF (i_pos 47395744)
...
Unfortunately, the firmware is not upgradeable.
The device in question is a Telstar UFM-102B.
Is there a way to tell the VFAT driver to exclude
the last N sectors from the allocation strategy?
Best regards,
Zoltán Böszörményi
next reply other threads:[~2006-10-16 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-16 10:06 Zoltan Boszormenyi [this message]
2006-10-16 10:25 ` Is there a way to limit VFAT allocation? Prakash Punnoor
2006-10-16 10:57 ` Zoltan Boszormenyi
2006-10-16 17:10 ` Rene Scharfe
2006-10-17 7:27 ` Zoltan Boszormenyi
2006-10-16 10:37 ` Grzegorz Kulewski
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=4533598A.3040909@dunaweb.hu \
--to=zboszor@dunaweb.hu \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.