sanmaoljh

sanmaoljh

0个粉丝

32

问答

0

专栏

0

资料

sanmaoljh  发布于  2018-05-21 18:01:26
采纳率 0%
32个问答
2204

hi3536平台 正在往u盘写文件,直接拔出的异常处理

 
本帖最后由 sanmaoljh 于 2018-5-21 18:02 编辑

问:hi3536平台 正在往u盘写文件,直接拔出u盘的异常处理?

U盘挂载到/mnt/udisk下目录
~ # mount
rootfs on / type rootfs (rw)
/dev/root on / type yaffs2 (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime)
tmpfs on /opt/tmp type tmpfs (rw,relatime,size=307200k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock6 on /userdata type yaffs2 (rw,relatime)
/dev/sda1 on /mnt/udisk type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

拔出U盘后串口打印记录
usb 2-1.1: USB disconnect, device number 13
sd 12:0:0:0: [sda] Unhandled error code
sd 12:0:0:0: [sda]  
Result: hostbyte=0x01 driverbyte=0x00
sd 12:0:0:0: [sda] CDB:
cdb[0]=0x2a: 2a 00 00 10 37 40 00 00 f0 00
end_request: I/O error, dev sda, sector 1062720
FAT-fs (sda1): FAT read failed (blocknr 2792)
sd 12:0:0:0: [sda] Unhandled error code
sd 12:0:0:0: [sda]  
Result: hostbyte=0x01 driverbyte=0x00
sd 12:0:0:0: [sda] CDB:
cdb[0]=0x2a: 2a 00 00 10 38 30 00 00 f0 00
end_request: I/O error, dev sda, sector 1062960
FAT-fs (sda1): FAT read failed (blocknr 2791)
FAT-fs (sda1): Directory bread(block 85760) failed
FAT-fs (sda1): Directory bread(block 85761) failed
FAT-fs (sda1): Directory bread(block 85762) failed
FAT-fs (sda1): Directory bread(block 85763) failed
FAT-fs (sda1): Directory bread(block 85764) failed
FAT-fs (sda1): Directory bread(block 85765) failed
FAT-fs (sda1): Directory bread(block 85766) failed
FAT-fs (sda1): Directory bread(block 85767) failed
FAT-fs (sda1): Directory bread(block 85760) failed
FAT-fs (sda1): Directory bread(block 85761) failed
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
/dev/sda1
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
FAT-fs (sda1): FAT read failed (blocknr 2792)
/dev/sda
FAT-fs (sda1): unable to read inode block for updating (i_pos 1306517)
FAT-fs (sda1): unable to read inode block for updating (i_pos 262537)
FAT-fs (sda1): unable to read inode block for updating (i_pos 262153)


同时执行cp测试也提示错误
~ #
~ # cp /opt/hdmeeting/ /mnt/udisk/ -rf
cp: write error: Input/output error
cp: can't create '/mnt/udisk/hdmeeting/plugins/platforms/libqoffscreen.so': Input/output error
cp: can't create '/mnt/udisk/hdmeeting/plugins/platforms/libqeglfs.so': Input/output error
cp: can't create '/mnt/udisk/hdmeeting/plugins/platforms/libqminimalegl.so': Input/output error
cp: can't create '/mnt/udisk/hdmeeting/plugins/platforms/libqlinuxfb.so': Input/output error
cp: can't create '/mnt/udisk/hdmeeting/plugins/platforms/libqminimal.so': Input/output error
cp: can't create directory '/mnt/udisk/hdmeeting/config': Input/output error
cp: can't create directory '/mnt/udisk/hdmeeting/firmware': Input/output error
cp: can't create directory '/mnt/udisk/hdmeeting/lib': Input/output error
cp: can't create directory '/mnt/udisk/hdmeeting/web': Input/output error
cp: can't create directory '/mnt/udisk/hdmeeting/bin': Input/output error


同时出现错误后,挂载点还存在,如果安全操作的话,拔出u盘挂载点也会消失
~ # mount
rootfs on / type rootfs (rw)
/dev/root on / type yaffs2 (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime)
tmpfs on /opt/tmp type tmpfs (rw,relatime,size=307200k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock6 on /userdata type yaffs2 (rw,relatime)
/dev/sda1 on /mnt/udisk type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

比如这种正在往U盘写文件,突然拔出U盘的操作,在嵌入式linux平台应该怎么处理,谢谢!


我来回答
回答0个
时间排序
认可量排序
易百纳技术社区暂无数据
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区