硬盘leftover man china怎么修复

亚马逊意外错误报歉,由于程序执行时,遇到意外错误,您刚刚操作没有执行成功,请稍后重试。或将此错误报告给我们的客服中心:推荐您,确认您的操作无误后,再继续其他操作。您可以通过亚马逊,获得更多的帮助。2-23 MSA2000存储多块盘亮红灯_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
2-23 MSA2000存储多块盘亮红灯
上传于||文档简介
&&H​P​ ​M​S​A00​文​档
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
你可能喜欢HP MSA2000-硬盘leftover-trust enable处理
HP MSA2000-硬盘leftover-trust enable处理
[摘要:本日一个HP MSA2312FC的存储收收了瑰异的事变,多个VD上的多个磁盘状况酿成了LEFTOVER。 酿成的效果是多个VD酿成QTOF状况以下 : # show vd Name Size Free Own Pref RAID Disks Spr Chk Status Jobs Serial Numb]
今天一个HP MSA2312FC的存储发送了离奇的事情,多个VD上的多个磁盘状态变成了LEFTOVER。&造成的结果是多个VD变成QTOF状态如下 :&# show vdName Size & & Free & &Own Pref & RAID & Disks Spr Chk &Status Jobs & & && Serial Number & & & & & & & & & &------------------------------------------------------------------------vd01 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &QTOF & & & & & &&& 00c0ffb00000&vd02 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffdd00&vd03 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0fff00000&vd04 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffd1a384c&vd05 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &QTOF & & & & & &&& 00c0ffc19f554e&vd06 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffce9f554e&vd07 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &QTOF & & & & & &&& 00c0ffda9f554e&vd08 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0fffc9f554e&------------------------------------------------------------------------在执行rescan之后,多个磁盘被找回,VD恢复FTOL。但是vd01上面还是有4块盘是leftover的状态。根据HP工程师的指导,关闭所有的登录MSA2312FC的WEB页面。然后通过命令行连接到这台msa2312fc。执行# trust enable# trust vdisk vd01报错Error: Command failed. (vd01) - Vdisk is not online or fault tolerant. Cannot be trusted.这下搞得比较崩溃了,HP对CASE做了升级。新的解决方案出来了。先去WEB页面解除VD01的隔离。如下。650) this.width=650;" alt="CASE : MSA2312fc MULTIDISKs LEFTOVER at the same time - 德哥@Digoal - The Heart,The World." src="/uploads02/u02/23/3e/233ea0d054321deb6c72ee9acf43f820.jpg" style="line-height:28border:0color:rgb(98,98,98);font-family:'Hiragino Sans GB W3', 'Hiragino Sans GB', Arial, Helvetica, simsun, u5b8bu4f53;white-space:background-color:rgb(236,236,236);" />右键点击vd01,选择Tools -& Dequarantine Vdisk按照指示解除vd01的隔离。然后去命令行看vd01的状态会变成OFFL# show vd & & & & & & & & & & & & & & & & & & & & & & & & &&Name Size & & Free & &Own Pref & RAID & Disks Spr Chk &Status Jobs & & && Serial Number & & & & & & & & & &------------------------------------------------------------------------vd01 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &OFFL & & & & & &&& 00c0ffb00000&vd02 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffdd00&vd03 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0fff00000&vd04 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffd1a384c&vd05 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & VRSC 56% && 00c0ffc19f554e&vd06 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffce9f554e&vd07 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & VRSC 59% && 00c0ffda9f554e&vd08 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0fffc9f554e&------------------------------------------------------------------------然后再到命令行执行# trust vdisk vd01VD恢复为FTOL状态。# show vd & & & &&Name Size & & Free & &Own Pref & RAID & Disks Spr Chk &Status Jobs & & && Serial Number & & & & & & & & & &------------------------------------------------------------------------vd01 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffb00000&vd02 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffdd00&vd03 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0fff00000&vd04 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffd1a384c&vd05 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & VRSC 56% && 00c0ffc19f554e&vd06 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0ffce9f554e&vd07 3996.7GB 751.5MB A & A & & &RAID5 &5 & & 0 & 64k &FTOL & VRSC 59% && 00c0ffda9f554e&vd08 3996.7GB 751.5MB B & B & & &RAID5 &5 & & 0 & 64k &FTOL & & & & & &&& 00c0fffc9f554e&------------------------------------------------------------------------&据HP称,这样操作可能导致部分数据丢失,可能指CACHE的脏数据。另外HP建议观察几天,没有问题的话升级一下固件。
感谢关注 Ithao123精品文库频道,是专门为互联网人打造的学习交流平台,全面满足互联网人工作与学习需求,更多互联网资讯尽在 IThao123!
Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。
Hadoop是一个由Apache基金会所开发的分布式系统基础架构。
用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。
Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。
Hadoop的框架最核心的设计就是:HDFS和MapReduce。HDFS为海量的数据提供了存储,则MapReduce为海量的数据提供了计算。
产品设计是互联网产品经理的核心能力,一个好的产品经理一定在产品设计方面有扎实的功底,本专题将从互联网产品设计的几个方面谈谈产品设计
随着国内互联网的发展,产品经理岗位需求大幅增加,在国内,从事产品工作的大部分岗位为产品经理,其实现实中,很多从事产品工作的岗位是不能称为产品经理,主要原因是对产品经理的职责不明确,那产品经理的职责有哪些,本专题将详细介绍产品经理的主要职责
IThao123周刊酷勤网 C 程序员的那点事!
浏览次数:次
作者:雪中独行
原文出自:http://www.linuxforum.net&作者:opera&&=================================================&Linux内核在缺省配置下最多支持10个IDE接口,IDE接口用ide_hwif_t结构来描述,每个IDE接口具有一对主-从驱动器接口,它们用ide_drive_t结构来描述,每个驱动器接口可接不同种类的IDE设备,如IDE硬盘,光驱等,它们用ide_driver_t结构来描述.每个驱动器接口包含一个命令请求队列,用request_queue_t结构来描述,具体的请求用request结构来描述.多个IDE驱动器可以共享一个中断,共享同一中断的驱动器形成一个组,用ide_hwgroup_t结构来描述.ide_intr()是所有的ide驱动器所共用的硬件中断入口,对之对应的ide_hwgroup_t指针将作为dev_id传递给ide_intr.每次在读写某个驱动器之前,需要用ide_set_handler()来设置ide_intr将要调用的中断函数指针.中断产生以后,该函数指针被自动清除.do_rw_disk(drive,rq,block)&从逻辑扇区号block开始向IDE硬盘驱动器drive写入rq所描述的内容.以下是硬盘PIO传输模式的有关代码.&code&;;&drivers/ide/ide-disk.cstatic&ide_startstop_t&do_rw_disk&(ide_drive_t&*drive,&struct&request&*rq,&unsigned&long&block){ if&(IDE_CONTROL_REG)
OUT_BYTE(drive-&;ctl,IDE_CONTROL_REG); OUT_BYTE(rq-&;nr_sectors,IDE_NSECTOR_REG); if&(drive-&;select.b.lba)&{&如果是逻辑块寻址模式
OUT_BYTE(block,IDE_SECTOR_REG);
OUT_BYTE(block&;&;=8,IDE_LCYL_REG);
OUT_BYTE(block&;&;=8,IDE_HCYL_REG);
OUT_BYTE(((block&;&;8)&0x0f)|drive-&;select.all,IDE_SELECT_REG); }&else&{
unsigned&int&sect,head,cyl,
track&=&block&/&drive-&;
sect&&=&block&%&drive-&;sect&+&1;
OUT_BYTE(sect,IDE_SECTOR_REG);
head&&=&track&%&drive-&;
cyl&&&=&track&/&drive-&;
OUT_BYTE(cyl,IDE_LCYL_REG);
OUT_BYTE(cyl&;&;8,IDE_HCYL_REG);
OUT_BYTE(head|drive-&;select.all,IDE_SELECT_REG); } if&(rq-&;cmd&==&READ)&{{
ide_set_handler(drive,&&read_intr,&WAIT_CMD,&NULL);&WAIT_CMD为10秒超时
OUT_BYTE(drive-&;mult_count&?&WIN_MULTREAD&:&WIN_READ,&IDE_COMMAND_REG);
return&ide_ } if&(rq-&;cmd&==&WRITE)&{
ide_startstop_t&
OUT_BYTE(drive-&;mult_count&?&WIN_MULTWRITE&:&WIN_WRITE,&IDE_COMMAND_REG);
if&(ide_wait_stat(&startstop,&drive,&DATA_READY,&drive-&;bad_wstat,&WAIT_DRQ))&{
printk(KERN_ERR&"%s:&no&DRQ&after&issuing&%s\n",&drive-&;name,
drive-&;mult_count&?&"MULTWRITE"&:&"WRITE");
if&(!drive-&;unmask)
__cli(); /*&local&CPU&only&*/
if&(drive-&;mult_count)&{&如果允许多扇区传送
ide_hwgroup_t&*hwgroup&=&HWGROUP(drive);
&*&Ugh..&this&part&looks&ugly&because&we&MUST&set&up
&*&the&interrupt&handler&before&outputting&the&first&block
&*&of&data&to&be&written.&&If&we&hit&an&error&(corrupted&buffer&list)
&*&in&ide_multwrite(),&then&we&need&to&remove&the&handler/timer
&*&before&returning.&&Fortunately,&this&NEVER&happens&(right?).
&*&Except&when&you&get&an&error&it&seems...
hwgroup-&;wrq&=&*&/*&scratchpad&*/
ide_set_handler&(drive,&&multwrite_intr,&WAIT_CMD,&NULL);
if&(ide_multwrite(drive,&drive-&;mult_count))&{
unsigned&long&
spin_lock_irqsave(&io_request_lock,&flags);
hwgroup-&;handler&=&NULL;
del_timer(&hwgroup-&;timer);
spin_unlock_irqrestore(&io_request_lock,&flags);
return&ide_
ide_set_handler&(drive,&&write_intr,&WAIT_CMD,&NULL);
idedisk_output_data(drive,&rq-&;buffer,&SECTOR_WORDS);&写入一扇区SECTOR_WORDS=512/4
return&ide_ } printk(KERN_ERR&"%s:&bad&command:&%d\n",&drive-&;name,&rq-&;cmd); ide_end_request(0,&HWGROUP(drive)); return&ide_}void&ide_set_handler&(ide_drive_t&*drive,&ide_handler_t&*handler,
&&&&&&unsigned&int&timeout,&ide_expiry_t&*expiry){ unsigned&long& ide_hwgroup_t&*hwgroup&=&HWGROUP(drive); spin_lock_irqsave(&io_request_lock,&flags); if&(hwgroup-&;handler&!=&NULL)&{
printk("%s:&ide_set_handler:&handler&not&&old=%p,&new=%p\n",
drive-&;name,&hwgroup-&;handler,&handler); } hwgroup-&;handler =& hwgroup-&;expiry
=& hwgroup-&;timer.expires =&jiffies&+& add_timer(&hwgroup-&;timer); spin_unlock_irqrestore(&io_request_lock,&flags);}static&inline&void&idedisk_output_data&(ide_drive_t&*drive,&void&*buffer,&unsigned&int&wcount){ if&(drive-&;bswap)&{
idedisk_bswap_data(buffer,&wcount);
ide_output_data(drive,&buffer,&wcount);
idedisk_bswap_data(buffer,&wcount); }&else
ide_output_data(drive,&buffer,&wcount);}void&ide_output_data&(ide_drive_t&*drive,&void&*buffer,&unsigned&int&wcount){ byte&io_32bit&=&drive-&;io_32 if&(io_32bit)&{#if&SUPPORT_VLB_SYNC
if&(io_32bit&&&2)&{
unsigned&long&
__save_flags(flags); /*&local&CPU&only&*/
/*&local&CPU&only&*/
do_vlb_sync(IDE_NSECTOR_REG);
outsl(IDE_DATA_REG,&buffer,&wcount);
__restore_flags(flags); /*&local&CPU&only&*/
}&else#endif&/*&SUPPORT_VLB_SYNC&*/
outsl(IDE_DATA_REG,&buffer,&wcount); }&else&{#if&SUPPORT_SLOW_DATA_PORTS
if&(drive-&;slow)&{
unsigned&short&*ptr&=&(unsigned&short&*)&
while&(wcount--)&{
outw_p(*ptr++,&IDE_DATA_REG);
outw_p(*ptr++,&IDE_DATA_REG);
}&else#endif&/*&SUPPORT_SLOW_DATA_PORTS&*/
outsw(IDE_DATA_REG,&buffer,&wcount&&1); }}int&ide_multwrite&(ide_drive_t&*drive,&unsigned&int&mcount){& ide_hwgroup_t *hwgroup=&HWGROUP(drive); /* &* This&may&look&a&bit&odd,&but&remember&wrq&is&a&copy&of&the &* request&not&the&original.&The&pointers&are&real&however&so&the &* bh's&are&not&copies.&Remember&that&or&bad&stuff&will&happen &* &* At&the&point&we&are&called&the&drive&has&asked&us&for&the &* data,&and&its&our&job&to&feed&it,&walking&across&bh&boundaries &* if&need&be. &*/& struct&request *rq&=&&hwgroup-&;&& do&{&
unsigned&long&&&
unsigned&int&nsect&=&rq-&;current_nr_
if&(nsect&&;&mcount)
mcount&-=&
;&这时mcount为剩余的必需传送的扇区数
idedisk_output_data(drive,&rq-&;buffer,&nsect&&7);
spin_lock_irqsave(&io_request_lock,&flags); /*&Is&this&really&necessary?&*/#ifdef&CONFIG_BLK_DEV_PDC4030
rq-&;sector&+=&#endif
if&(((long)(rq-&;nr_sectors&-=&nsect))&&=&0)
spin_unlock_irqrestore(&io_request_lock,&flags);
if&((rq-&;current_nr_sectors&-=&nsect)&==&0)&{
if&((rq-&;bh&=&rq-&;bh-&;b_reqnext)&!=&NULL)&{{
rq-&;current_nr_sectors&=&rq-&;bh-&;b_size&;&;9;
rq-&;buffer&&&&&&&&&&&&&=&rq-&;bh-&;b_
spin_unlock_irqrestore(&io_request_lock,&flags);
printk("%s:&buffer&list&corrupted&(%ld,&%ld,&%d)\n",
drive-&;name,&rq-&;current_nr_sectors,
rq-&;nr_sectors,&nsect);
ide_end_request(0,&hwgroup);
/*&Fix&the&pointer..&we&ate&data&*/
rq-&;buffer&+=&nsect&&&&9;
}&&&&&&&&&&&&&&&&spin_unlock_irqrestore(&io_request_lock,&flags); }&while&(mcount);&&&&&&&&return&0;};&IDE接口共用中断入口void&ide_intr&(int&irq,&void&*dev_id,&struct&pt_regs&*regs){ unsigned&long& ide_hwgroup_t&*hwgroup&=&(ide_hwgroup_t&*)dev_ ide_hwif_t&* ide_drive_t&* ide_handler_t&* ide_startstop_t& spin_lock_irqsave(&io_request_lock,&flags); hwif&=&hwgroup-&; if&(!ide_ack_intr(hwif))&{
spin_unlock_irqrestore(&io_request_lock,&flags);
} if&((handler&=&hwgroup-&;handler)&==&NULL&||&hwgroup-&;poll_timeout&!=&0)&{
&*&Not&expecting&an&interrupt&from&this&drive.
&*&That&means&this&could&be:
&* (1)&an&interrupt&from&another&PCI&device
&* sharing&the&same&PCI&INT#&as&us.
&*&or (2)&a&drive&just&entered&sleep&or&standby&mode,
&* and&is&interrupting&to&let&us&know.
&*&or (3)&a&spurious&interrupt&of&unknown&origin.
&*&For&PCI,&we&cannot&tell&the&difference,
&*&so&in&that&case&we&just&ignore&it&and&hope&it&goes&away.
&*/#ifdef&CONFIG_BLK_DEV_IDEPCI
if&(IDE_PCI_DEVID_EQ(hwif-&;pci_devid,&IDE_PCI_DEVID_NULL))#endif /*&CONFIG_BLK_DEV_IDEPCI&*/
&*&Probably&not&a&shared&PCI&interrupt,
&*&so&we&can&safely&try&to&do&something&about&it:
unexpected_intr(irq,&hwgroup);#ifdef&CONFIG_BLK_DEV_IDEPCI
&*&Whack&the&status&register,&just&in&case&we&have&a&leftover&pending&IRQ.
(void)&IN_BYTE(hwif-&;io_ports[IDE_STATUS_OFFSET]);#endif&/*&CONFIG_BLK_DEV_IDEPCI&*/
spin_unlock_irqrestore(&io_request_lock,&flags);
} drive&=&hwgroup-&; if&(!drive)&{
&*&This&should&NEVER&happen,&and&there&isn't&much&we&could&do&about&it&here.
spin_unlock_irqrestore(&io_request_lock,&flags);
} if&(!drive_is_ready(drive))&{
&*&This&happens&regularly&when&we&share&a&PCI&IRQ&with&another&device.
&*&Unfortunately,&it&can&also&happen&with&some&buggy&drives&that&trigger
&*&the&IRQ&before&their&status&register&is&up&to&date.&&Hopefully&we&have
&*&enough&advance&overhead&that&the&latter&isn't&a&problem.
spin_unlock_irqrestore(&io_request_lock,&flags);
} if&(!hwgroup-&;busy)&{
hwgroup-&;busy&=&1; /*&paranoia&*/
printk("%s:&ide_intr:&hwgroup-&;busy&was&0&??\n",&drive-&;name); } hwgroup-&;handler&=&NULL; del_timer(&hwgroup-&;timer); spin_unlock(&io_request_lock); if&(drive-&;unmask)
ide__sti(); /*&local&CPU&only&*/ startstop&=&handler(drive);
/*&service&this&interrupt,&may&set&handler&for&next&interrupt&*/ spin_lock_irq(&io_request_lock); /* &*&Note&that&handler()&may&have&set&things&up&for&another &*&interrupt&to&occur&soon,&but&it&cannot&happen&until &*&we&exit&from&this&routine,&because&it&will&be&the &*&same&irq&as&is&currently&being&serviced&here,&and&Linux &*&won't&allow&another&of&the&same&(on&any&CPU)&until&we&return. &*/ set_recovery_timer(HWIF(drive)); drive-&;service_time&=&jiffies&-&drive-&;service_ if&(startstop&==&ide_stopped)&{
if&(hwgroup-&;handler&==&NULL)&{ /*&paranoia&*/
hwgroup-&;busy&=&0;
ide_do_request(hwgroup,&hwif-&;irq);
printk("%s:&ide_intr:&huh?&expected&NULL&handler&on&exit\n",&drive-&;name);
} } spin_unlock_irqrestore(&io_request_lock,&flags);};&单个扇区写入之后的中断处理static&ide_startstop_t&write_intr&(ide_drive_t&*drive){ byte& int&i; ide_hwgroup_t&*hwgroup&=&HWGROUP(drive); struct&request&*rq&=&hwgroup-&; if&(!OK_STAT(stat=GET_STAT(),DRIVE_READY,drive-&;bad_wstat))&{
printk("%s:&write_intr&error1:&nr_sectors=%ld,&stat=0x%02x\n",&drive-&;name,&rq-&;nr_sectors,&stat);&&&&&&&&}&else&{
if&((rq-&;nr_sectors&==&1)&^&((stat&&&DRQ_STAT)&!=&0))&{
rq-&;sector++;
rq-&;buffer&+=&512;
rq-&;errors&=&0;
i&=&--rq-&;nr_
--rq-&;current_nr_
if&(((long)rq-&;current_nr_sectors)&&=&0)
ide_end_request(1,&hwgroup);
if&(i&&;&0)&{
idedisk_output_data&(drive,&rq-&;buffer,&SECTOR_WORDS);
ide_set_handler&(drive,&&write_intr,&WAIT_CMD,&NULL);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&return&ide_
}&&&&&&&&&&&&&&&&&&&&&&&&return&ide_
return&ide_ /*&the&original&code&did&this&here&(?)&*/ } return&ide_error(drive,&"write_intr",&stat);};&多重扇区写入后的中断处理static&ide_startstop_t&multwrite_intr&(ide_drive_t&*drive){ byte& int&i; ide_hwgroup_t&*hwgroup&=&HWGROUP(drive); struct&request&*rq&=&&hwgroup-&; if&(OK_STAT(stat=GET_STAT(),DRIVE_READY,drive-&;bad_wstat))&{
if&(stat&&&DRQ_STAT)&{
&* The&drive&wants&data.&Remember&rq&is&the&copy
&* of&the&request
if&(rq-&;nr_sectors)&{
if&(ide_multwrite(drive,&drive-&;mult_count))
return&ide_
ide_set_handler&(drive,&&multwrite_intr,&WAIT_CMD,&NULL);
return&ide_
&* If&the&copy&has&all&the&blocks&completed&then
&* we&can&end&the&original&request.
if&(!rq-&;nr_sectors)&{ /*&all&done?&*/
rq&=&hwgroup-&;
for&(i&=&rq-&;nr_&i&&;&0;){
i&-=&rq-&;current_nr_
ide_end_request(1,&hwgroup);
return&ide_
return&ide_ /*&the&original&code&did&this&here&(?)&*/ } return&ide_error(drive,&"multwrite_intr",&stat);};&读扇区的中断处理static&ide_startstop_t&read_intr&(ide_drive_t&*drive){ byte& int&i; unsigned&int&msect,& struct&request&* /*&new&way&for&dealing&with&premature&shared&PCI&interrupts&*/ if&(!OK_STAT(stat=GET_STAT(),DATA_READY,BAD_R_STAT))&{
if&(stat&&&(ERR_STAT|DRQ_STAT))&{
return&ide_error(drive,&"read_intr",&stat);
/*&no&data&yet,&so&wait&for&another&interrupt&*/
ide_set_handler(drive,&&read_intr,&WAIT_CMD,&NULL);
return&ide_ } msect&=&drive-&;mult_ read_next: rq&=&HWGROUP(drive)-&; if&(msect)&{
if&((nsect&=&rq-&;current_nr_sectors)&&;&msect)
msect&-=& }&else
nsect&=&1; idedisk_input_data(drive,&rq-&;buffer,&nsect&*&SECTOR_WORDS); rq-&;sector&+=& rq-&;buffer&+=&nsect&&9; rq-&;errors&=&0; i&=&(rq-&;nr_sectors&-=&nsect); if&(((long)(rq-&;current_nr_sectors&-=&nsect))&&=&0)
ide_end_request(1,&HWGROUP(drive)); if&(i&&;&0)&{
if&(msect)
goto&read_
ide_set_handler&(drive,&&read_intr,&WAIT_CMD,&NULL);&&&&&&&&&&&&&&&&return&ide_ }&&&&&&&&return&ide_}static&inline&void&idedisk_input_data&(ide_drive_t&*drive,&void&*buffer,&unsigned&int&wcount){ ide_input_data(drive,&buffer,&wcount); if&(drive-&;bswap)
idedisk_bswap_data(buffer,&wcount);}void&ide_input_data&(ide_drive_t&*drive,&void&*buffer,&unsigned&int&wcount){ byte&io_32bit&=&drive-&;io_32 if&(io_32bit)&{#if&SUPPORT_VLB_SYNC
if&(io_32bit&&&2)&{
unsigned&long&
__save_flags(flags); /*&local&CPU&only&*/
/*&local&CPU&only&*/
do_vlb_sync(IDE_NSECTOR_REG);
insl(IDE_DATA_REG,&buffer,&wcount);
__restore_flags(flags); /*&local&CPU&only&*/
}&else#endif&/*&SUPPORT_VLB_SYNC&*/
insl(IDE_DATA_REG,&buffer,&wcount); }&else&{#if&SUPPORT_SLOW_DATA_PORTS
if&(drive-&;slow)&{
unsigned&short&*ptr&=&(unsigned&short&*)&
while&(wcount--)&{
*ptr++&=&inw_p(IDE_DATA_REG);
*ptr++&=&inw_p(IDE_DATA_REG);
}&else#endif&/*&SUPPORT_SLOW_DATA_PORTS&*/
insw(IDE_DATA_REG,&buffer,&wcount&&1); }}atomic_t&queued_#define&blk_finished_io(nsects)
\ atomic_sub(nsects,&&queued_sectors);
\ if&(atomic_read(&queued_sectors)&&&0)&{
printk("block:&queued_sectors&&&0\n"); \
atomic_set(&queued_sectors,&0);
\ }static&inline&void&blkdev_dequeue_request(struct&request&*&req){ list_del(&req-&;queue);}void&ide_end_request&(byte&uptodate,&ide_hwgroup_t&*hwgroup){ struct&request&* unsigned&long& spin_lock_irqsave(&io_request_lock,&flags); rq&=&hwgroup-&; if&(!end_that_request_first(rq,&uptodate,&hwgroup-&;drive-&;name))&{
add_blkdev_randomness(MAJOR(rq-&;rq_dev));
blkdev_dequeue_request(rq);&&&&&&&& hwgroup-&;rq&=&NULL;
end_that_request_last(rq); } spin_unlock_irqrestore(&io_request_lock,&flags);}int&end_that_request_first&(struct&request&*req,&int&uptodate,&char&*name){ struct&buffer_head&*& int& req-&;errors&=&0; if&(!uptodate)
printk("end_request:&I/O&error,&dev&%s&(%s),&sector&%lu\n",
kdevname(req-&;rq_dev),&name,&req-&;sector); if&((bh&=&req-&;bh)&!=&NULL)&{
nsect&=&bh-&;b_size&&;&;&9;
blk_finished_io(nsect);
req-&;bh&=&bh-&;b_
bh-&;b_reqnext&=&NULL;
bh-&;b_end_io(bh,&uptodate);
if&((bh&=&req-&;bh)&!=&NULL)&{
req-&;hard_sector&+=&
req-&;hard_nr_sectors&-=&
req-&;sector&=&req-&;hard_
req-&;nr_sectors&=&req-&;hard_nr_
req-&;current_nr_sectors&=&bh-&;b_size&&;&;&9;
if&(req-&;nr_sectors&&&req-&;current_nr_sectors)&{
req-&;nr_sectors&=&req-&;current_nr_
printk("end_request:&buffer-list&destroyed\n");
req-&;buffer&=&bh-&;b_
} } return&0;}void&end_that_request_last(struct&request&*req){ if&(req-&;sem&!=&NULL)
up(req-&;sem); blkdev_release_request(req);}void&inline&blkdev_release_request(struct&request&*req){ request_queue_t&*q&=&req-&;q; int&rw&=&req-&; req-&;rq_status&=&RQ_INACTIVE; req-&;q&=&NULL; /* &*&Request&may&not&have&originated&from&ll_rw_blk.&if&not, &*&asumme&it&has&free&buffers&and&check&waiters &*/ if&(q)&{
&*&we've&released&enough&buffers&to&start&I/O&again
if&(waitqueue_active(&blk_buffers_wait)
&&&&&&&atomic_read(&queued_sectors)&&&low_queued_sectors)
wake_up(&blk_buffers_wait);
&*&Add&to&pending&free&list&and&batch&wakeups
list_add(&req-&;table,&&q-&;pending_freelist[rw]);
if&(++q-&;pending_free[rw]&&;=&batch_requests)&{
int&wake_up&=&q-&;pending_free[rw];
blk_refill_freelist(q,&rw);
wake_up_nr(&q-&;wait_for_request,&wake_up);
} }}void&inline&blk_refill_freelist(request_queue_t&*q,&int&rw){ if&(q-&;pending_free[rw])&{
list_splice(&q-&;pending_freelist[rw],&&q-&;request_freelist[rw]);
INIT_LIST_HEAD(&q-&;pending_freelist[rw]);
q-&;pending_free[rw]&=&0; }}&/code&;
&wzy9681 回复于: 09:39:03
&itisok96 回复于: 21:10:43
原文链接:http://linux.chinaunix.net/bbs/viewthread.php?tid=11848
转载请注明作者名及原文出处
& 相关主题:

我要回帖

更多关于 leftover space 的文章

 

随机推荐