Index: uspace/srv/fs/exfat/exfat_fat.c
===================================================================
--- uspace/srv/fs/exfat/exfat_fat.c	(revision ae560da5d80eb3666300ce8f2ddc5a527593550b)
+++ uspace/srv/fs/exfat/exfat_fat.c	(revision ebddd71b73a35eeabdd3240f2862b3205be2d20b)
@@ -62,5 +62,5 @@
  *
  * @param bs		Buffer holding the boot sector for the file.
- * @param devmap_handle	Device handle of the device with the file.
+ * @param service_id	Service ID of the device with the file.
  * @param firstc	First cluster to start the walk with.
  * @param lastc		If non-NULL, output argument hodling the last cluster
@@ -73,5 +73,5 @@
  */
 int
-exfat_cluster_walk(exfat_bs_t *bs, devmap_handle_t devmap_handle, 
+exfat_cluster_walk(exfat_bs_t *bs, service_id_t service_id, 
     exfat_cluster_t firstc, exfat_cluster_t *lastc, uint32_t *numc,
     uint32_t max_clusters)
@@ -95,5 +95,5 @@
 			*lastc = clst;	/* remember the last cluster number */
 
-		rc = exfat_get_cluster(bs, devmap_handle, clst, &clst);
+		rc = exfat_get_cluster(bs, service_id, clst, &clst);
 		if (rc != EOK)
 			return rc;
@@ -140,5 +140,5 @@
 			* when fortunately we have the last cluster number cached.
 			*/
-			return block_get(block, nodep->idx->devmap_handle, DATA_FS(bs) + 
+			return block_get(block, nodep->idx->service_id, DATA_FS(bs) + 
 		        (nodep->lastc_cached_value-EXFAT_CLST_FIRST)*SPC(bs) + 
 			    (bn % SPC(bs)), flags);
@@ -155,5 +155,5 @@
 	}
 
-	rc = exfat_block_get_by_clst(block, bs, nodep->idx->devmap_handle,
+	rc = exfat_block_get_by_clst(block, bs, nodep->idx->service_id,
 	    nodep->fragmented, firstc, &currc, relbn, flags);
 	if (rc != EOK)
@@ -174,5 +174,5 @@
  * @param block		Pointer to a block pointer for storing result.
  * @param bs		Buffer holding the boot sector of the file system.
- * @param devmap_handle	Device handle of the file system.
+ * @param service_id	Service ID of the file system.
  * @param fcl		First cluster used by the file. Can be zero if the file
  *			is empty.
@@ -187,5 +187,5 @@
 int
 exfat_block_get_by_clst(block_t **block, exfat_bs_t *bs, 
-    devmap_handle_t devmap_handle, bool fragmented, exfat_cluster_t fcl,
+    service_id_t service_id, bool fragmented, exfat_cluster_t fcl,
     exfat_cluster_t *clp, aoff64_t bn, int flags)
 {
@@ -199,14 +199,14 @@
 
 	if (!fragmented) {
-		rc = block_get(block, devmap_handle, DATA_FS(bs) + 
+		rc = block_get(block, service_id, DATA_FS(bs) + 
 		    (fcl-EXFAT_CLST_FIRST)*SPC(bs) + bn, flags);
 	} else {
 		max_clusters = bn / SPC(bs);
-		rc = exfat_cluster_walk(bs, devmap_handle, fcl, &c, &clusters, max_clusters);
+		rc = exfat_cluster_walk(bs, service_id, fcl, &c, &clusters, max_clusters);
 		if (rc != EOK)
 			return rc;
 		assert(clusters == max_clusters);
 
-		rc = block_get(block, devmap_handle, DATA_FS(bs) + 
+		rc = block_get(block, service_id, DATA_FS(bs) + 
 		    (c-EXFAT_CLST_FIRST)*SPC(bs) + (bn % SPC(bs)), flags);
 
@@ -222,5 +222,5 @@
  *
  * @param bs		Buffer holding the boot sector for the file system.
- * @param devmap_handle	Device handle for the file system.
+ * @param service_id	Service ID for the file system.
  * @param clst		Cluster which to get.
  * @param value		Output argument holding the value of the cluster.
@@ -229,5 +229,5 @@
  */
 int
-exfat_get_cluster(exfat_bs_t *bs, devmap_handle_t devmap_handle,
+exfat_get_cluster(exfat_bs_t *bs, service_id_t service_id,
     exfat_cluster_t clst, exfat_cluster_t *value)
 {
@@ -238,5 +238,5 @@
 	offset = clst * sizeof(exfat_cluster_t);
 
-	rc = block_get(&b, devmap_handle, FAT_FS(bs) + offset / BPS(bs), BLOCK_FLAGS_NONE);
+	rc = block_get(&b, service_id, FAT_FS(bs) + offset / BPS(bs), BLOCK_FLAGS_NONE);
 	if (rc != EOK)
 		return rc;
@@ -252,5 +252,5 @@
  *
  * @param bs		Buffer holding the boot sector for the file system.
- * @param devmap_handle	Device handle for the file system.
+ * @param service_id	Service ID for the file system.
  * @param clst		Cluster which is to be set.
  * @param value		Value to set the cluster with.
@@ -259,5 +259,5 @@
  */
 int
-exfat_set_cluster(exfat_bs_t *bs, devmap_handle_t devmap_handle,
+exfat_set_cluster(exfat_bs_t *bs, service_id_t service_id,
     exfat_cluster_t clst, exfat_cluster_t value)
 {
@@ -268,5 +268,5 @@
 	offset = clst * sizeof(exfat_cluster_t);
 
-	rc = block_get(&b, devmap_handle, FAT_FS(bs) + offset / BPS(bs), BLOCK_FLAGS_NONE);
+	rc = block_get(&b, service_id, FAT_FS(bs) + offset / BPS(bs), BLOCK_FLAGS_NONE);
 	if (rc != EOK)
 		return rc;
@@ -287,5 +287,5 @@
  *
  * @param bs		Buffer holding the boot sector of the file system.
- * @param devmap_handle	Device handle of the file system.
+ * @param service_id	Service ID of the file system.
  * @param nclsts	Number of clusters to allocate.
  * @param mcl		Output parameter where the first cluster in the chain
@@ -297,5 +297,5 @@
  */
 int
-exfat_alloc_clusters(exfat_bs_t *bs, devmap_handle_t devmap_handle, unsigned nclsts,
+exfat_alloc_clusters(exfat_bs_t *bs, service_id_t service_id, unsigned nclsts,
     exfat_cluster_t *mcl, exfat_cluster_t *lcl)
 {
@@ -312,5 +312,5 @@
 	for (clst=EXFAT_CLST_FIRST; clst < DATA_CNT(bs)+2 && found < nclsts; clst++) {
 		/* Need to rewrite because of multiple exfat_bitmap_get calls */
-		if (bitmap_is_free(bs, devmap_handle, clst)==EOK) {
+		if (bitmap_is_free(bs, service_id, clst)==EOK) {
 		   /*
 			* The cluster is free. Put it into our stack
@@ -318,10 +318,10 @@
 			*/
 			lifo[found] = clst;
-			rc = exfat_set_cluster(bs, devmap_handle, clst,
+			rc = exfat_set_cluster(bs, service_id, clst,
 				(found == 0) ?  EXFAT_CLST_EOF : lifo[found - 1]);
 			if (rc != EOK)
 				break;
 			found++;
-			rc = bitmap_set_cluster(bs, devmap_handle, clst);
+			rc = bitmap_set_cluster(bs, service_id, clst);
 			if (rc != EOK)
 				break;
@@ -341,6 +341,6 @@
 	if (found > 0) {
 		while (found--) {
-			(void) bitmap_clear_cluster(bs, devmap_handle, lifo[found]);
-			(void) exfat_set_cluster(bs, devmap_handle, lifo[found], 0);
+			(void) bitmap_clear_cluster(bs, service_id, lifo[found]);
+			(void) exfat_set_cluster(bs, service_id, lifo[found], 0);
 		}
 	}
@@ -354,5 +354,5 @@
  *
  * @param bs		Buffer hodling the boot sector of the file system.
- * @param devmap_handle	Device handle of the file system.
+ * @param service_id	Service ID of the file system.
  * @param firstc	First cluster in the chain which is to be freed.
  *
@@ -360,5 +360,5 @@
  */
 int
-exfat_free_clusters(exfat_bs_t *bs, devmap_handle_t devmap_handle, exfat_cluster_t firstc)
+exfat_free_clusters(exfat_bs_t *bs, service_id_t service_id, exfat_cluster_t firstc)
 {
 	exfat_cluster_t nextc;
@@ -368,11 +368,11 @@
 	while (firstc != EXFAT_CLST_EOF) {
 		assert(firstc >= EXFAT_CLST_FIRST && firstc < EXFAT_CLST_BAD);
-		rc = exfat_get_cluster(bs, devmap_handle, firstc, &nextc);
-		if (rc != EOK)
-			return rc;
-		rc = exfat_set_cluster(bs, devmap_handle, firstc, 0);
-		if (rc != EOK)
-			return rc;
-		rc = bitmap_clear_cluster(bs, devmap_handle, firstc);
+		rc = exfat_get_cluster(bs, service_id, firstc, &nextc);
+		if (rc != EOK)
+			return rc;
+		rc = exfat_set_cluster(bs, service_id, firstc, 0);
+		if (rc != EOK)
+			return rc;
+		rc = bitmap_clear_cluster(bs, service_id, firstc);
 		if (rc != EOK)
 			return rc;
@@ -396,5 +396,5 @@
     exfat_cluster_t lcl)
 {
-	devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
+	service_id_t service_id = nodep->idx->service_id;
 	exfat_cluster_t lastc;
 	int rc;
@@ -409,5 +409,5 @@
 			nodep->lastc_cached_valid = false;
 		} else {
-			rc = exfat_cluster_walk(bs, devmap_handle, nodep->firstc,
+			rc = exfat_cluster_walk(bs, service_id, nodep->firstc,
 			    &lastc, NULL, (uint16_t) -1);
 			if (rc != EOK)
@@ -415,5 +415,5 @@
 		}
 
-		rc = exfat_set_cluster(bs, nodep->idx->devmap_handle, lastc, mcl);
+		rc = exfat_set_cluster(bs, nodep->idx->service_id, lastc, mcl);
 		if (rc != EOK)
 			return rc;
@@ -439,5 +439,5 @@
 {
 	int rc;
-	devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
+	service_id_t service_id = nodep->idx->service_id;
 
 	/*
@@ -450,5 +450,5 @@
 	if (lcl == 0) {
 		/* The node will have zero size and no clusters allocated. */
-		rc = exfat_free_clusters(bs, devmap_handle, nodep->firstc);
+		rc = exfat_free_clusters(bs, service_id, nodep->firstc);
 		if (rc != EOK)
 			return rc;
@@ -458,15 +458,15 @@
 		exfat_cluster_t nextc;
 
-		rc = exfat_get_cluster(bs, devmap_handle, lcl, &nextc);
+		rc = exfat_get_cluster(bs, service_id, lcl, &nextc);
 		if (rc != EOK)
 			return rc;
 
 		/* Terminate the cluster chain */
-		rc = exfat_set_cluster(bs, devmap_handle, lcl, EXFAT_CLST_EOF);
+		rc = exfat_set_cluster(bs, service_id, lcl, EXFAT_CLST_EOF);
 		if (rc != EOK)
 			return rc;
 
 		/* Free all following clusters. */
-		rc = exfat_free_clusters(bs, devmap_handle, nextc);
+		rc = exfat_free_clusters(bs, service_id, nextc);
 		if (rc != EOK)
 			return rc;
@@ -483,5 +483,5 @@
 
 int
-exfat_zero_cluster(exfat_bs_t *bs, devmap_handle_t devmap_handle, exfat_cluster_t c)
+exfat_zero_cluster(exfat_bs_t *bs, service_id_t service_id, exfat_cluster_t c)
 {
 	size_t i;
@@ -490,5 +490,5 @@
 
 	for (i = 0; i < SPC(bs); i++) {
-		rc = exfat_block_get_by_clst(&b, bs, devmap_handle, false, c, NULL, i,
+		rc = exfat_block_get_by_clst(&b, bs, service_id, false, c, NULL, i,
 		    BLOCK_FLAGS_NOREAD);
 		if (rc != EOK)
@@ -536,5 +536,5 @@
  * does not contain a exfat file system.
  */
-int exfat_sanity_check(exfat_bs_t *bs, devmap_handle_t devmap_handle)
+int exfat_sanity_check(exfat_bs_t *bs, service_id_t service_id)
 {
 	/* TODO */
