log.info("Flushing the contents of the filesystem");  synchronized(inodeCache) { try{ log.debug("inodecache size: "+inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while(iterator.hasNext()) { INode iNode = (INode)iterator.next(); iNode.flush(); log.debug("flush(): inodeCache.values().iterator().hasNext() "+iterator.hasNext()); } }catch(FileSystemException fse) { throw new IOException(fse); } }   updateFS();   synchronized(blockCache) { Iterator iterator = blockCache.values().iterator(); while(iterator.hasNext()) { Block block = (Block)iterator.next(); block.flush(); } }  log.info("Filesystem flushed"); }
log.info("Flushing the contents of the filesystem");  synchronized (inodeCache) { try { log.debug("inodecache size: " + inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while (iterator.hasNext()) { INode iNode = (INode) iterator.next(); iNode.flush(); log .debug("flush(): inodeCache.values().iterator().hasNext() " + iterator.hasNext()); } } catch (FileSystemException ex) { final IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } }   updateFS();   synchronized (blockCache) { Iterator iterator = blockCache.values().iterator(); while (iterator.hasNext()) { Block block = (Block) iterator.next(); block.flush(); } }  log.info("Filesystem flushed"); }
	public void flush() throws IOException {		log.info("Flushing the contents of the filesystem");		//update the inodes		synchronized(inodeCache) {			try{				log.debug("inodecache size: "+inodeCache.size());				Iterator iterator = inodeCache.values().iterator();				while(iterator.hasNext()) {					INode iNode = (INode)iterator.next();					iNode.flush();					log.debug("flush(): inodeCache.values().iterator().hasNext() "+iterator.hasNext());				}			}catch(FileSystemException fse) {				throw new IOException(fse);			}		}				//update the group descriptors and the superblock copies		updateFS();				//flush the blocks		synchronized(blockCache) {			Iterator iterator = blockCache.values().iterator();			while(iterator.hasNext()) {				Block block = (Block)iterator.next();				block.flush();			}				}						log.info("Filesystem flushed");	}