@Override
	public void init() {
		System.out.println("Initializing DFS...");
		try {
			myCache = new MyDBufferCache(Constants.NUM_OF_CACHE_BLOCKS);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} 

		//Saving first few i's for inode blocks
		for (int i = Constants.MAX_DFILES; i < myBlockBitMap.length; i++) {
			myBlockBitMap[i] = true;
		}
		for (int i = 0; i < myInodeBitMap.length; i++) {
			myInodeBitMap[i] = true;
		}

		/*
		 * Need to retrieve the bitmap from virtual disk. 
		 */
		for (int i = 0; i < Constants.MAX_DFILES; i++) {
			DBuffer inodeBlock = myCache.getBlock(i);
			List<Integer> blockList = inodeBlock.getBlockmap();
			//			System.out.println("Initializing: " + i);
			if (blockList.size() > 0) {
				System.out.println("MyDFS.init(): " + i + " file is in use");
				myInodeBitMap[i] = false;
			}
			for (int b = 0; b < blockList.size(); b++) {
				//				System.out.println("MyDFS.init(): " + blockList.get(b) + " block is in use");
				myBlockBitMap[blockList.get(b)] = false;
			}
		}

	}