MMC/SD cards hotplug scenario
Hi Pierre/All,
I have a query regarding one of the MMC/SD cards hotplug use case scenario and its expected behavior.
In the case where the MMC/SD card is removed physically from the slot during an active data transfer happening on the card, I notice lot of
I/O errors being generated. The numbers of I/O errors seem to depend on the size of the file being copied(the errors semm to be a mixture of FS + MMC core errors). After the end of the I/O errors I can umount the partition that was mounted and I reinsert the card. It seem not to work very well consistently. I mean some times the card removal/insertion does seem to work that well. Whereas card insertion/removal works perfectly fine if tested when no data transfer is happening.
Does MMC/SD core need to handle some things to support this scenario? Does MMC/SD core handle this scenario gracefully? Has anyone tried something similar before?
As far as I understand this type of scenario can not be handled well in the controller drivers alone. Am I missing something here?
Regards,
Madhu
Quoted 2 lines · Madhusudhan Chikkature Rajashekar
After the end of the I/O errors I can umount the partition that was mounted and I reinsert the card.
That's rather expected - outstanding IO has to be errored when the medium is removed.
Quoted 1 line
It seem not to work very well consistently.
Vague handwaving comment with no useful information. What precisely is the problem that you're seeing?
Quoted 10 lines
-----Original Message-----
From: Russell King - ARM Linux [mailto:[email protected]]
Sent: Wednesday, May 21, 2008 1:00 PM
To: Madhusudhan Chikkature Rajashekar
Cc: 'Pierre Ossman'; [email protected]; [email protected]
Subject: Re: MMC/SD cards hotplug scenario
Quoted 7 lines
Quoted 2 lines · Madhusudhan Chikkature Rajashekar
After the end of the I/O errors I can umount the partition that was mounted and I reinsert the card.
That's rather expected - outstanding IO has to be errored when the medium is removed.
Yes. I got your point. But can this be made to through few I/O errors and stop instead of resulting in I/O errors for the rest of the data?
In the case where data copied is huge, for eg 500MB, the I/O errors are quite lot.
Quoted 7 lines
Quoted 2 lines
It seem not to work very well consistently.
Vague handwaving comment with no useful information. What precisely is
the problem that you're seeing?
What I meant here is that reinsertion of the card does not seem to result in reinitialization of the card consistently.
Details of few things I noticed is listed below stepwise and to start with card is detected and mounted on mount point /mnt/mmc dir.
1. Start copy of data.
2. Removed the card in the middle of transfer. At the controller driver level this generated card removed interrupt. The mmc_detect_change fn called.
3. I/O Errors generated.
4. Reinsert the card. This generated card inserted interrupt. The mmc_detect_fn called. But the card does not seem to be reinitialized correctly.
cat /proc/partitions does not list mmc partitions.
The attached log shows that out of 3 trails, it seem to work fine correctly 2 times and failed the third time.
So my question is for the above scenario does the MMC/SD core need to take care of anything explicitely or should this be fixed at the controller
driver level?
Regards,
Madhu
p -a cp -a /etc/ /mnt/mmc/
+++++++++++++++++++++++++++++ MMC CARD REMOVED +++++++++++++++++++++++++
mmc0: card 981b removed
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 3928
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 48
Buffer I/O error on device mmcblk0p1, logical block 4
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
WARNING: at fs/buffer.c:1169 mark_buffer_dirty() [<c0033400>] (dump_stack+0x0/0x14) from [<c00d21ac>] (mark_buffer_dirty+0x44/0xb8) [<c00d2168>] (mark_buffer_dirty+0x0/0xb8) from [<c0108ae4>] (group_adjust_blocks+0x38/0x3c) r5:00000008 r4:00000000 [<c0108aac>] (group_adjust_blocks+0x0/0x3c) from [<c0109778>] (ext2_new_blocks+0x3fc/0x5cc) [<c010937c>] (ext2_new_blocks+0x0/0x5cc) from [<c010d100>] (ext2_get_block+0x2bc/0x69c) [<c010ce44>] (ext2_get_block+0x0/0x69c) from [<c00d2f70>] (__block_prepare_write+0x18c/0x414) [<c00d2de4>] (__block_prepare_write+0x0/0x414) from [<c00d32e4>] (block_write_begin+0x90/0x108) [<c00d3254>] (block_write_begin+0x0/0x108) from [<c010cdf4>] (__ext2_write_begin+0x3c/0x48) [<c010cdb8>] (__ext2_write_begin+0x0/0x48) from [<c010ce3c>] (ext2_write_begin+0x3c/0x44) [<c010ce00>] (ext2_write_begin+0x0/0x44) from [<c009185c>] (generic_file_buffered_write+0x10c/0x5f0) [<c0091750>] (generic_file_buffered_write+0x0/0x5f0) from [<c0092168>] (__generic_file_aio_write_nolock+0x428/0x478) [<c0091d40>] (__generic_file_aio_write_nolock+0x0/0x478) from [<c009222c>] (generic_file_aio_write+0x74/0xe8) [<c00921b8>] (generic_file_aio_write+0x0/0xe8) from [<c00b08d0>] (do_sync_write+0xbc/0x10c) [<c00b0814>] (do_sync_write+0x0/0x10c) from [<c00b11b8>] (vfs_write+0xb8/0x148) [<c00b1100>] (vfs_write+0x0/0x148) from [<c00b1784>] (sys_write+0x44/0x70) r7:00001000 r6:c7c1ff20 r5:00000000 r4:00000000 [<c00b1740>] (sys_write+0x0/0x70) from [<c002ee60>] (ret_fast_syscall+0x0/0x2c) r8:c002f66c r7:00000004 r6:00000004 r5:be8aa148 r4:00001000
end_request: I/O error, dev mmcblk0, sector 1048592 Buffer I/O error on device mmcblk0p1, logical block 131072 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1048600 Buffer I/O error on device mmcblk0p1, logical block 131073 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1048608 Buffer I/O error on device mmcblk0p1, logical block 131074 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1048616 Buffer I/O error on device mmcblk0p1, logical block 131075 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1048624 Buffer I/O error on device mmcblk0p1, logical block 131076 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1048632 Buffer I/O error on device mmcblk0p1, logical block 131077 lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 1064976end_request: I/O error, dev mmcblk0, sector 1064984end_request: I/O error, dev mmcblk0, sector 1064992end_request: I/O error, dev mmcblk0, sector 1065000end_request: I/O error, dev mmcblk0, sector 1065008end_request: I/O error, dev mmcblk0, sector 1065016end_request: I/O error, dev mmcblk0, sector 1065024end_request: I/O error, dev mmcblk0, sector 1065032end_request: I/O error, dev mmcblk0, sector 1065040end_request: I/O error, dev mmcblk0, sector 1065048end_request: I/O error, dev mmcblk0, sector 1065056end_request: I/O error, dev mmcblk0, sector 1065064end_request: I/O error, dev mmcblk0, sector 1065072end_request: I/O error, dev mmcblk0, sector 1065080end_request: I/O error, dev mmcblk0, sector 1065088end_request: I/O error, dev mmcblk0, sector 1065096
cp: cannot create regular file `/mnt/mmc/etc/init.d/mvltd': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/init.d/ssh': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/init.d/ppp': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/init.d/wu-ftpd': Input/EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
output error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create directory `/mnt/mmc/etc/rc.d': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/prelink.conf': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: EXT2-fs error (device mmcblk0p1): read_inode_bitmap: cannot create regular file `/mntCannot read inode bitmap - bloc k_group = 4, inode_bitmap = 131073/mmc/etc/locale.alias': Input/ou
tput error
cp: cannot create directory `/mnt/mmc/etc/hotplug.d': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/shells': Input/output eEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
rror
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/shells.conf': Input/ou tCannot read inode bitmap - block_group = 4, inode_bitmap = 131073put error
cp: cannot create regular file `/mnt/mmc/etc/ftpusers': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/hosts.equiv': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/pam.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create directory `/mnt/mmc/etc/wu-ftpd': Input/output error
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 94371840 73954940 20416900 79% / /dev/root 94371840 73954940 20416900 79% / tmpfs 62816 0 62816 0% /tmp /dev/root 94371840 73954940 20416900 79% /dev/.static/dev none 10240 792 9448 8% /dev tmpfs 62816 0 62816 0% /dev/shm /dev/mmcblk0p1 976368 536 926236 1% /mnt/mmc root@omap:~# umount /mnt/mmc printk: 138 messages suppressed. Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=62192, block=131077 Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=62113, block=131075 Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=62081, block=131074 root@omap:~# root@omap:~# root@omap:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 94371840 73954940 20416900 79% / /dev/root 94371840 73954940 20416900 79% / tmpfs 62816 0 62816 0% /tmp /dev/root 94371840 73954940 20416900 79% /dev/.static/dev none 10240 792 9448 8% /dev tmpfs 62816 0 62816 0% /dev/shm root@omap:~# root@omap:~# root@omap:~# +++++++++++++++++++++++++++++ MMC CARD INSERTED +++++++++++++++++++++++++ mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SD card at address 981b mmcblk0: mmc0:981b SU01G 992000KiB mmcblk0: p1
root@omap:~#
root@omap:~#
root@omap:~# f
-bash: f: command not found
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# mount /dev/mmcblk0p1 /mnt/mmc EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended root@omap:~# root@omap:~# root@omap:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 94371840 73954940 20416900 79% / /dev/root 94371840 73954940 20416900 79% / tmpfs 62816 0 62816 0% /tmp /dev/root 94371840 73954940 20416900 79% /dev/.static/dev none 10240 800 9440 8% /dev tmpfs 62816 0 62816 0% /dev/shm /dev/mmcblk0p1 976368 20 926752 1% /mnt/mmc root@omap:~# root@omap:~# root@omap:~# cp -a /etc/ /mnt/mmc/
+++++++++++++++++++++++++++++ MMC CARD REMOVED +++++++++++++++++++++++++
mmc0: card 981b removed
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 3928
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 48
printk: 1 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 4
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 1572880
Buffer I/O error on device mmcblk0p1, logical block 196608 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572888
Buffer I/O error on device mmcblk0p1, logical block 196609 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572896
Buffer I/O error on device mmcblk0p1, logical block 196610 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572904
Buffer I/O error on device mmcblk0p1, logical block 196611 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572912
Buffer I/O error on device mmcblk0p1, logical block 196612 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572920
Buffer I/O error on device mmcblk0p1, logical block 196613 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572928
Buffer I/O error on device mmcblk0p1, logical block 196614 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572936end_request: I/O error, dev mmcblk0, sector 1572944
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 1622032end_request: I/O error, dev mmcblk0, sector 1622040end_request: I/O error, dev mmcblk0, sector 1622048end_request: I/O error, dev mmcblk0, sector 1622056end_request: I/O error, dev mmcblk0, sector 1622064end_request: I/O error, dev mmcblk0, sector 1622072end_request: I/O error, dev mmcblk0, sector 1622080end_request: I/O error, dev mmcblk0, sector 1622088end_request: I/O error, dev mmcblk0, sector 1622096end_request: I/O error, dev mmcblk0, sector 1622104end_request: I/O error, dev mmcblk0, sector 1622112end_request: I/O error, dev mmcblk0, sector 1622120end_request: I/O error, dev mmcblk0, sector 1622128end_request: I/O error, dev mmcblk0, sector 1622136end_request: I/O error, dev mmcblk0, sector 1622144end_request: I/O error, dev mmcblk0, sector 1622152
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 1572888
mmcblk0: error -110 sending read/write command
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/squid.conf': Input/out pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create regular file `/mnt/mmc/etc/watchdog.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/syslog.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/inittab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/ypserv.conf': Input/ou tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put error
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/wgetrc': Input/output eCannot read inode bitmap - block_group = 6, inode_bitmap = 196609rror
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/cron.d': Input/output err oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/cron.hourly': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ypserv.securenets': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/nsswitch.conf.nis': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/yp.conf': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/checksecurity.conf': I nCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put/output error
cp: cannot create directory `/mnt/mmc/etc/cron.monthly': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create directory `/mnt/mmc/etc/security': Input/output erEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ror
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/crontab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/login.access': Input/o uCannot read inode bitmap - block_group = 6, inode_bitmap = 196609tput error
cp: cannot create regular file `/mnt/mmc/etc/environment': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/limits': Input/output eEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
rror
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/email-addresses': Inpu tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609/output error
cp: cannot create regular file `/mnt/mmc/etc/login.defs': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/securetty': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/anacrontab': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/aliases': Input/output
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609error
cp: cannot create directory `/mnt/mmc/etc/exim': Input/output errorEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpchroot': Input/outpuEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
t error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpusers': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/hosts.equiv': Input/ou tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put error
cp: cannot create regular file `/mnt/mmc/etc/pam.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create directory `/mnt/mmc/etc/wu-ftpd': Input/output error
root@omap:~#
root@omap:~#
root@omap:~# umount /mnt/mmc printk: 119 messages suppressed. Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93121, block=196610 Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 root@omap:~# root@omap:~# root@omap:~# +++++++++++++++++++++++++++++ MMC CARD INSERTED +++++++++++++++++++++++++ mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SD card at address 981b mmcblk0: mmc0:981b SU01G 992000KiB mmcblk0: p1
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# mount /dev/mmcblk0 p1 /mnt/mmc EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended root@omap:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 94371840 73954976 20416864 79% / /dev/root 94371840 73954976 20416864 79% / tmpfs 62816 0 62816 0% /tmp /dev/root 94371840 73954976 20416864 79% /dev/.static/dev none 10240 800 9440 8% /dev tmpfs 62816 0 62816 0% /dev/shm /dev/mmcblk0p1 976368 20 926752 1% /mnt/mmc root@omap:~# cp -a /etc/ /mnt/mmc/
+++++++++++++++++++++++++++++ MMC CARD REMOVED +++++++++++++++++++++++++
mmc0: card 981b removed
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 3928
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 48
Buffer I/O error on device mmcblk0p1, logical block 4
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 1572880
Buffer I/O error on device mmcblk0p1, logical block 196608 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572888
Buffer I/O error on device mmcblk0p1, logical block 196609 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572896
Buffer I/O error on device mmcblk0p1, logical block 196610 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572904
Buffer I/O error on device mmcblk0p1, logical block 196611 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572912
Buffer I/O error on device mmcblk0p1, logical block 196612 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572920
Buffer I/O error on device mmcblk0p1, logical block 196613 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572928
Buffer I/O error on device mmcblk0p1, logical block 196614 lost page write due to I/O error on mmcblk0p1end_request: I/O error, dev mmcblk0, sector 1572936end_request: I/O error, dev mmcblk0, sector 1572944end_request: I/O error, dev mmcblk0, sector 1572952
mmcblk0: error -110 sending read/write commandend_request: I/O error, dev mmcblk0, sector 1622032end_request: I/O error, dev mmcblk0, sector 1622040end_request: I/O error, dev mmcblk0, sector 1622048end_request: I/O error, dev mmcblk0, sector 1622056end_request: I/O error, dev mmcblk0, sector 1622064end_request: I/O error, dev mmcblk0, sector 1622072end_request: I/O error, dev mmcblk0, sector 1622080end_request: I/O error, dev mmcblk0, sector 1622088end_request: I/O error, dev mmcblk0, sector 1622096end_request: I/O error, dev mmcblk0, sector 1622104end_request: I/O error, dev mmcblk0, sector 1622112end_request: I/O error, dev mmcblk0, sector 1622120end_request: I/O error, dev mmcblk0, sector 1622128end_request: I/O error, dev mmcblk0, sector 1622136end_request: I/O error, dev mmcblk0, sector 1622144end_request: I/O error, dev mmcblk0, sector 1622152
mmcblk0: error -110 sending read/write command
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/udhcpc': Input/output err oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/dnrd': Input/output errorEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/sysctl.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/auto.master': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/auto.misc': Input/outp uCannot read inode bitmap - block_group = 6, inode_bitmap = 196609t error
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/devfs': Input/output erro rCannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/pcmcia': Input/output err oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/cups': Input/output errorEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/dhcpd.conf': Input/out pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/discover.d': Input/output
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609error
cp: cannot create regular file `/mnt/mmc/etc/nscd.conf': Input/outpuEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
t error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/mime.conf.default': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hostapd.accept': Input/EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hostapd.conf': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hostapd.deny': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/memstat.conf': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/modprobe.conf': Input/oEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
utput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/modprobe.devfs': Input/EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/modules': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/inetd.conf': Input/out pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create regular file `/mnt/mmc/etc/identd.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/radvd.conf': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/mime.conf': Input/outpuEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
t error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/squid.conf.default': I nCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put/output error
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/squid.conf': Input/out pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create regular file `/mnt/mmc/etc/watchdog.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/syslog.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/inittab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/ypserv.conf': Input/ou tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put error
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/wgetrc': Input/output eCannot read inode bitmap - block_group = 6, inode_bitmap = 196609rror
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/cron.d': Input/output err oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/cron.hourly': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ypserv.securenets': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/nsswitch.conf.nis': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/yp.conf': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/checksecurity.conf': I nCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put/output error
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/cron.monthly': Input/outp uCannot read inode bitmap - block_group = 6, inode_bitmap = 196609t error
cp: cannot create directory `/mnt/mmc/etc/security': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/crontab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/login.access': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/environment': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/limits': Input/output eEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
rror
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/email-addresses': Inpu tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609/output error
cp: cannot create regular file `/mnt/mmc/etc/login.defs': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/securetty': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/anacrontab': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/aliases': Input/output
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609error
cp: cannot create directory `/mnt/mmc/etc/exim': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpchroot': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpusers': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hosts.equiv': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/pam.conf': Input/outpu tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609 error
cp: cannot create directory `/mnt/mmc/etc/wu-ftpd': Input/output error root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 94371840 73954976 20416864 79% / /dev/root 94371840 73954976 20416864 79% / tmpfs 62816 0 62816 0% /tmp /dev/root 94371840 73954976 20416864 79% /dev/.static/dev none 10240 792 9448 8% /dev tmpfs 62816 0 62816 0% /dev/shm /dev/mmcblk0p1 976368 872 925900 1% /mnt/mmc root@omap:~# umount /mnt/mmc printk: 124 messages suppressed. Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93369, block=196617 Buffer I/O error on device mmcblk0p1, logical block 0 lost page write due to I/O error on mmcblk0p1 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93367, block=196617 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93121, block=196610 root@omap:~# +++++++++++++++++++++++++++++ MMC CARD INSERTED +++++++++++++++++++++++++
root@omap:~#
root@omap:~# cat /proc/partitions major minor #blocks name
31 0 256 mtdblock0 31 1 256 mtdblock1 31 2 2048 mtdblock2 31 3 128512 mtdblock3 31 4 512 mtdblock4 31 5 512 mtdblock5 31 6 256 mtdblock6 31 7 4096 mtdblock7 31 8 125696 mtdblock8 31 9 512 mtdblock9 31 10 256 mtdblock10 31 11 128 mtdblock11 31 12 2048 mtdblock12 31 13 259200 mtdblock13
root@omap:~#
Quoted 1 line · On Wed, 21 May 2008 15:01:00 +0530 "Madhusudhan Chikkature Rajashekar"…
What I meant here is that reinsertion of the card does not seem to result in reinitialization of the card consistently.
Previously, that has always been because of bad interactions with the block layer. 2.6.24 should be more resilient though.
Quoted 7 lines
Details of few things I noticed is listed below stepwise and to start with card is detected and mounted on mount point
/mnt/mmcdir.1. Start copy of data.
2. Removed the card in the middle of transfer. At the controller driver level this generated card removed interrupt. Themmc_detect_changefn called.
3. I/O Errors generated.
The obscene amount of noise here seems to be caused by ext2 being extremely persistent. This is generally a good thing for your data though. :)
What is missing is a decent way for a block device to tell the upper layers that is gone with no hope of ever coming back. Right now we just tell it that there was a write error, which just makes the upper layers retry and retry.
Quoted 4 lines
4. Reinsert the card. This generated card inserted interrupt. The
mmc_detect_fncalled. But the card does not seem to be reinitialized correctly.
cat/proc/partitionsdoes not list mmc partitions.
Anything in dmesg?
Quoted 4 lines
So my question is for the above scenario does the MMC/SD core need to take care of anything explicitely or should this be fixed at the controller
driver level?
Host drivers shouldn't have to bother with any of this for the simple reason that there should be no state inside the driver except for the current request. Keeping track of cards and block devices are handled in the core and mmc_block respectively.
Rgds
Pierre
Quoted 56 lines
-----Original Message-----
From: Pierre Ossman [mailto:[email protected]]
Sent: Thursday, May 22, 2008 12:02 AM
To: Madhusudhan Chikkature Rajashekar
Cc: 'Russell King - ARM Linux'; [email protected]; [email protected]
Subject: Re: MMC/SD cards hotplug scenarioQuoted 1 line · On Wed, 21 May 2008 15:01:00 +0530 "Madhusudhan Chikkature Rajashekar"…
What I meant here is that reinsertion of the card does not
seem to result in reinitialization of the card consistently.
Previously, that has always been because of bad interactions with the block layer. 2.6.24 should be more resilient though.
Quoted 2 lines
Details of few things I noticed is listed below stepwise
and to start with card is detected and mounted on mount point
/mnt/mmcdir.Quoted 3 lines
1. Start copy of data.
2. Removed the card in the middle of transfer. At thecontroller driver level this generated card removed interrupt. The
Quoted 2 lines
mmc_detect_changefn called.
3. I/O Errors generated.The obscene amount of noise here seems to be caused by ext2 being extremely persistent. This is generally a good thing for your data though. :)
What is missing is a decent way for a block device to tell the upper layers that is gone with no hope of ever coming back. Right now we just
tell it that there was a write error, which just makes the upper layers
retry and retry.Quoted 1 line
4. Reinsert the card. This generated card inserted
interrupt. The
mmc_detect_fncalled. But the card does not seem to beQuoted 3 lines
reinitialized correctly.
cat/proc/partitionsdoes not list mmc partitions.Anything in dmesg?
Quoted 2 lines
So my question is for the above scenario does the MMC/SD
core need to take care of anything explicitely or should this be fixed at
Quoted 2 lines
the controller
driver level?
Quoted 8 lines
Host drivers shouldn't have to bother with any of this for the simple reason that there should be no state inside the driver except for the current request. Keeping track of cards and block devices are handled in the core and
mmc_blockrespectively.Rgds
Pierre
Hi Pierre,
Thanks for the answers.
I am attaching the output of dmesg. I captured dmesg output after I get to the error phrase. I enabled MMC debugging as well to get some idea. It looks like upon reinsertion of the SD card, no commands are issued after CMD51. It might be the case where CMD51 (SD_APP_SEND_SCR) fails to read the SCR for some reason in this scenario.
Regards,
Madhu
dmesg
ode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
printk: 142 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609 EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
printk: 12 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93153, block=196611 EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93121, block=196610
MMC Card Inserted........
mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0 timing 0
mmc0: starting CMD0 arg 00000000 flags 000000c0
mmci-omap mmci-omap.1: mmc0: CMD0, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: starting CMD8 arg 000001aa flags 000002f5
mmci-omap mmci-omap.1: mmc0: CMD8, argument 0x000001aa mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
mmc0: starting CMD5 arg 00000000 flags 000002e1
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req failed (CMD5): -110, retrying...
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req failed (CMD5): -110, retrying...
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req failed (CMD5): -110, retrying...
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req done (CMD5): -110: 000001aa 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000
mmc0: starting CMD41 arg 00000000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 20 width 0 timing 0
mmc0: starting CMD0 arg 00000000 flags 000000c0
mmci-omap mmci-omap.1: mmc0: CMD0, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: starting CMD8 arg 000001aa flags 000002f5
mmci-omap mmci-omap.1: mmc0: CMD8, argument 0x000001aa mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000120 00000000 00000000 00000000
mmc0: starting CMD41 arg 40300000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x40300000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000120 00000000 00000000 00000000
mmc0: starting CMD41 arg 40300000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x40300000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000120 00000000 00000000 00000000
mmc0: starting CMD41 arg 40300000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x40300000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 80ff8000 00000000 00000000 00000000
mmc0: starting CMD2 arg 00000000 flags 00000067
mmci-omap mmci-omap.1: mmc0: CMD2, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD2): 0: 03534453 55303147 800008e1 b7006cad
mmc0: starting CMD3 arg 00000000 flags 00000075
mmci-omap mmci-omap.1: mmc0: CMD3, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD3): 0: 981b0520 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: starting CMD9 arg 981b0000 flags 00000007
mmci-omap mmci-omap.1: mmc0: CMD9, argument 0x981b0000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD9): 0: 00260032 5f5983c8 befbcfff 924040d7
mmc0: starting CMD7 arg 981b0000 flags 00000015
mmci-omap mmci-omap.1: mmc0: CMD7, argument 0x981b0000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD7): 0: 00000700 00000000 00000000 00000000
mmc0: starting CMD55 arg 981b0000 flags 00000095
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x981b0000 mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000920 00000000 00000000 00000000
mmc0: starting CMD51 arg 00000000 flags 000000b5
mmc0: blksz 8 blocks 1 flags 00000200 tsac 100 ms nsac 0
mmci-omap mmci-omap.1: mmc0: CMD51, argument 0x00000000 mmci-omap mmci-omap.1: IRQ Status is 1
root@omap:~#
Quoted 5 lines · On Thu, 22 May 2008 19:10:10 +0530 "Madhusudhan Chikkature Rajashekar"…
I am attaching the output of dmesg. I captured dmesg output after I get to the error phrase. I enabled MMC debugging as well to get some idea. It looks like upon reinsertion of the SD card, no commands are issued after CMD51. It might be the case where CMD51 (
SD_APP_SEND_SCR) fails to read the SCR for some reason in this scenario.
This looks like a driver/hw bug. CMD51 is the first data command in the init sequence, so the data engine of either the driver or hardware seems to be wedged. So it's not something related to the MMC core.
Rgds
Pierre
Hi Pierre,
Quoted 18 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Pierre Ossman
Sent: Thursday, May 22, 2008 12:02 AM
To: Chikkature Rajashekar, Madhusudhan
Cc: 'Russell King - ARM Linux'; [email protected]; [email protected]
Subject: Re: MMC/SD cards hotplug scenarioQuoted 1 line · On Wed, 21 May 2008 15:01:00 +0530 "Madhusudhan Chikkature Rajashekar"…
What I meant here is that reinsertion of the card does not seem to result in reinitialization of
the card consistently.
Previously, that has always been because of bad interactions with the block layer. 2.6.24 should be more resilient though.
Quoted 1 line
<snip>
Quoted 9 lines
The obscene amount of noise here seems to be caused by ext2 being extremely persistent. This is generally a good thing for your data though. :)
What is missing is a decent way for a block device to tell the upper layers that is gone with no hope of ever coming back. Right now we just tell it that there was a write error, which just makes the upper layers retry and retry.
In this scenario, do you think it would be right to kill the ongoing copy from application space, say for example an UI is running for MMC copy and when the card is removed the app gets notified may be through hotplug event or signaling and then app just kills the process that is issuing this copy request. This will prevent long running errors. Just a thought,
Regards,
Khasim
Quoted 9 lines · Khasim
Quoted 9 lines
The obscene amount of noise here seems to be caused by ext2 being extremely persistent. This is generally a good thing for your data though. :)
What is missing is a decent way for a block device to tell the upper layers that is gone with no hope of ever coming back. Right now we just tell it that there was a write error, which just makes the upper layers retry and retry.
Quoted 6 lines
In this scenario, do you think it would be right to kill the ongoing copy from application space, say for example an UI is running for MMC copy and when the card is removed the app gets notified may be through hotplug event or signaling and then app just kills the process that is issuing this copy request. This will prevent long running errors. Just a thought,
If you pick out the errors from 'cp', you'll see that the system is telling 'cp' that it's getting IO errors. Nevertheless, 'cp' carries on trying to copy each file (and rightfully so.)
However, there is another issue here - if you're going to be ejecting a medium containing an ext2fs filesystem at some random point, you absolutely must run e2fsck before remounting it - the filesystem _will_ be in an inconsistent state at the point you eject the card.
Moreover, I wouldn't be surprised if you keep doing this with a card, that the card's firmware will eventually get confused and die.
Basically, what I'm trying to say is that ejecting any medium randomly from the system is _always_ going to result in problems of some nature. Some of which you can reduce the impact from, others are fairly terminal. The only safe solution is the unmount, wait for data to be written, and then eject the card.
Hi,
Quoted 5 lines · ext Russell King - ARM Linux
Basically, what I'm trying to say is that ejecting any medium randomly from the system is _always_ going to result in problems of some nature. Some of which you can reduce the impact from, others are fairly terminal. The only safe solution is the unmount, wait for data to be written, and then eject the card.
from this point of view it is a watered down version of "what happens when the power is removed abruptly", which unfortunately cannot really be avoided on battery powered devices with removable battery.
If the system is supposed to survive such cases, then ext2 is probably not the best choice and a journaling fs (ext3 ?) should be considered.
With MMC even the way the power fails (vcore fading away before/after vio) affects the possibility of the embedded uC b0rking. So it needs to be addressed also at board HW level.
This of course cannot be really controlled when the MMC is removed from the slot, unless there is a sensor on the MMC lid.
Sensor that could be used for an emergency, controlled powerdown, with no sync.
But on the Tablets we instead show a warning and tell the user to be nice and close back the lid: UI designers prefer such approach.
Just my 2 cents.
Signature · 6 lines
Cheers, Igor --- Igor Stoppa Nokia Devices R&D - Helsinki