if (rdev->faulty) 
if (test_bit(Faulty, &rdev->flags)) 
static void md_update_sb(mddev_t * mddev){	int err;	struct list_head *tmp;	mdk_rdev_t *rdev;	int sync_req;repeat:	spin_lock(&mddev->write_lock);	sync_req = mddev->in_sync;	mddev->utime = get_seconds();	mddev->events ++;	if (!mddev->events) {		/*		 * oops, this 64-bit counter should never wrap.		 * Either we are in around ~1 trillion A.C., assuming		 * 1 reboot per second, or we have a bug:		 */		MD_BUG();		mddev->events --;	}	mddev->sb_dirty = 2;	sync_sbs(mddev);	/*	 * do not write anything to disk if using	 * nonpersistent superblocks	 */	if (!mddev->persistent) {		mddev->sb_dirty = 0;		spin_unlock(&mddev->write_lock);		wake_up(&mddev->sb_wait);		return;	}	spin_unlock(&mddev->write_lock);	dprintk(KERN_INFO 		"md: updating %s RAID superblock on device (in sync %d)\n",		mdname(mddev),mddev->in_sync);	err = bitmap_update_sb(mddev->bitmap);	ITERATE_RDEV(mddev,rdev,tmp) {		char b[BDEVNAME_SIZE];		dprintk(KERN_INFO "md: ");		if (rdev->faulty)			dprintk("(skipping faulty ");		dprintk("%s ", bdevname(rdev->bdev,b));		if (!rdev->faulty) {			md_super_write(mddev,rdev,				       rdev->sb_offset<<1, rdev->sb_size,				       rdev->sb_page);			dprintk(KERN_INFO "(write) %s's sb offset: %llu\n",				bdevname(rdev->bdev,b),				(unsigned long long)rdev->sb_offset);		} else			dprintk(")\n");		if (mddev->level == LEVEL_MULTIPATH)			/* only need to write one superblock... */			break;	}	wait_event(mddev->sb_wait, atomic_read(&mddev->pending_writes)==0);	/* if there was a failure, sb_dirty was set to 1, and we re-write super */	spin_lock(&mddev->write_lock);	if (mddev->in_sync != sync_req|| mddev->sb_dirty == 1) {		/* have to write it out again */		spin_unlock(&mddev->write_lock);		goto repeat;	}	mddev->sb_dirty = 0;	spin_unlock(&mddev->write_lock);	wake_up(&mddev->sb_wait);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b2d444d7ad975d555bb919601bcdc0e58975a40e/md.c/buggy/drivers/md/md.c