return result;
	public BlockReservation testAndSetBlock(long blockNr) throws IOException{		if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount())			return new BlockReservation(false, -1, -1);		int group = translateToGroup(blockNr);		int index = translateToIndex(blockNr);		/* Return false if the block is not a data block but a filesystem		 * metadata block, as the beginning of each block group is filesystem		 * metadata:		 * superblock copy (if present)		 * block bitmap		 * inode bitmap		 * inode table		 * Free blocks begin after the inode table.		 */		long iNodeTableBlock = 	groupDescriptors[group].getInodeTable();		long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this);		 		if(blockNr<firstNonMetadataBlock)			return new BlockReservation(false, -1, -1);		byte[] bitmap = getBlock(groupDescriptors[group].getBlockBitmap());				//at any time, only one copy of the Block exists in the cache, so it is		//safe to synchronize to the bitmapBlock object (it's part of Block)		synchronized( bitmap ) {			BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index );			//update the block bitmap			if(result.isSuccessful()) {				writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false);				modifyFreeBlocksCount(group, -1-result.getPreallocCount());				//result.setBlock( result.getBlock()+superblock.getFirstDataBlock() );				result.setBlock(blockNr);			}			return result;		}	}