/** Find the file corresponding to the block and return it if it exists. */
 File validateBlockFile(Block b) {
   // Should we check for metadata file too?
   File f = getFile(b);
   if (f != null && f.exists()) return f;
   if (InterDatanodeProtocol.LOG.isDebugEnabled()) {
     InterDatanodeProtocol.LOG.debug("b=" + b + ", f=" + f);
   }
   return null;
 }
 /** Get File name for a given block. */
 public synchronized File getBlockFile(Block b) throws IOException {
   File f = validateBlockFile(b);
   if (f == null) {
     if (InterDatanodeProtocol.LOG.isDebugEnabled()) {
       InterDatanodeProtocol.LOG.debug("b=" + b + ", volumeMap=" + volumeMap);
     }
     throw new IOException("Block " + b + " is not valid.");
   }
   return f;
 }