Index: uspace/srv/fs/minixfs/mfs.c
===================================================================
--- uspace/srv/fs/minixfs/mfs.c	(revision 54caa41b481059a83c03d23b3b1c963d412cced2)
+++ uspace/srv/fs/minixfs/mfs.c	(revision 41202a9d66cecf6b158011395b2b0b804d542107)
@@ -94,5 +94,8 @@
 	
 		callid = async_get_call(&call);
-		switch  (IPC_GET_IMETHOD(call)) {
+		int method = IPC_GET_IMETHOD(call);
+
+		mfsdebug(NAME "method = %d\n", method);
+		switch  (method) {
 		case IPC_M_PHONE_HUNGUP:
 			return;
@@ -108,4 +111,5 @@
 			break;
 		case VFS_OUT_LOOKUP:
+			mfsdebug("lookup called\n");
 			mfs_lookup(callid, &call);
 			break;
Index: uspace/srv/fs/minixfs/mfs.h
===================================================================
--- uspace/srv/fs/minixfs/mfs.h	(revision 54caa41b481059a83c03d23b3b1c963d412cced2)
+++ uspace/srv/fs/minixfs/mfs.h	(revision 41202a9d66cecf6b158011395b2b0b804d542107)
@@ -98,4 +98,5 @@
 
 	bool dirty;
+	fs_index_t index;
 };
 
Index: uspace/srv/fs/minixfs/mfs_dentry.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_dentry.c	(revision 41202a9d66cecf6b158011395b2b0b804d542107)
+++ uspace/srv/fs/minixfs/mfs_dentry.c	(revision 41202a9d66cecf6b158011395b2b0b804d542107)
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2011 Maurizio Lombardi
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup fs
+ * @{
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include "mfs.h"
+#include "mfs_utils.h"
+
+struct mfs_dentry_info *
+read_directory_entry(struct mfs_node *mnode, unsigned index)
+{
+	const struct mfs_instance *inst = mnode->instance;
+	const struct mfs_sb_info *sbi = inst->sbi;
+	const bool longnames = sbi->long_names;
+	uint32_t block;
+	block_t *b;
+
+	struct mfs_dentry_info *d_info = malloc(sizeof *d_info);
+
+	if (!d_info)
+		return NULL;
+
+	int r = read_map(&block, mnode, index *sbi->dirsize);
+
+	if (r != EOK || block == 0)
+		goto out_err;
+
+	r = block_get(&b, inst->handle, block, BLOCK_FLAGS_NONE);
+
+	if (r != EOK)
+		goto out_err;
+
+	if (sbi->fs_version == MFS_VERSION_V3) {
+		struct mfs3_dentry *d3;
+
+		d3 = b->data;
+		d3->d_inum = conv32(sbi->native, d3->d_inum);
+
+		d_info->d_inum = d3->d_inum;
+		memcpy(d_info->d_name, d3->d_name, MFS3_MAX_NAME_LEN);
+	} else {
+		const int namelen = longnames ? MFS_L_MAX_NAME_LEN :
+					MFS_MAX_NAME_LEN;
+
+		struct mfs_dentry *d;
+
+		d = b->data;
+		d->d_inum = conv16(sbi->native, d->d_inum);
+
+		d_info->d_inum = d->d_inum;
+		memcpy(d_info->d_name, d->d_name, namelen);
+	}
+
+	block_put(b);
+
+	d_info->dirty = false;
+	return d_info;
+
+out_err:
+	free(d_info);
+	return NULL;
+}
+
+/**
+ * @}
+ */ 
+
Index: uspace/srv/fs/minixfs/mfs_ops.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_ops.c	(revision 54caa41b481059a83c03d23b3b1c963d412cced2)
+++ uspace/srv/fs/minixfs/mfs_ops.c	(revision 41202a9d66cecf6b158011395b2b0b804d542107)
@@ -44,4 +44,9 @@
 			fs_index_t index);
 
+static int mfs_node_put(fs_node_t *fsnode);
+static int mfs_node_open(fs_node_t *fsnode);
+static fs_index_t mfs_index_get(fs_node_t *fsnode);
+static unsigned mfs_lnkcnt_get(fs_node_t *fsnode);
+
 static LIST_INITIALIZE(inst_list);
 static FIBRIL_MUTEX_INITIALIZE(inst_list_mutex);
@@ -54,6 +59,10 @@
 	.is_file = mfs_is_file,
 	.node_get = mfs_node_get,
+	.node_put = mfs_node_put,
+	.node_open = mfs_node_open,
+	.index_get = mfs_index_get,
 	.plb_get_char = mfs_plb_get_char,
-	.has_children = mfs_has_children
+	.has_children = mfs_has_children,
+	.lnkcnt_get = mfs_lnkcnt_get
 };
 
@@ -221,4 +230,6 @@
 	assert(mnode->ino_i);
 
+	mfsdebug("inode size is %d\n", (int) mnode->ino_i->i_size);
+
 	return mnode->ino_i->i_size;
 }
@@ -236,4 +247,6 @@
 	struct mfs_instance *instance;
 
+	mfsdebug("node_get called\n");
+
 	rc = mfs_instance_get(devmap_handle, &instance);
 
@@ -242,4 +255,55 @@
 
 	return mfs_node_core_get(rfn, instance, index);
+}
+
+static int mfs_node_put(fs_node_t *fsnode)
+{
+	struct mfs_node *mnode = fsnode->data;
+
+	mfsdebug("mfs_node_put()\n");
+
+	assert(mnode->ino_i);
+
+	if (mnode->ino_i->dirty) {
+		/*TODO: Write inode on disk*/
+	}
+
+	free(mnode->ino_i);
+	free(mnode);
+
+	return EOK;
+}
+
+static int mfs_node_open(fs_node_t *fsnode)
+{
+	mfsdebug("mfs_node_open()\n");
+	/*
+	 * Opening a file is stateless, nothing
+	 * to be done here.
+	 */
+	return EOK;
+}
+
+static fs_index_t mfs_index_get(fs_node_t *fsnode)
+{
+	struct mfs_node *mnode = fsnode->data;
+
+	mfsdebug("mfs_index_get()\n");
+
+	assert(mnode->ino_i);
+	return mnode->ino_i->index;
+}
+
+static unsigned mfs_lnkcnt_get(fs_node_t *fsnode)
+{
+	unsigned rc;
+	struct mfs_node *mnode = fsnode->data;
+
+	assert(mnode);
+	assert(mnode->ino_i);
+
+	rc = mnode->ino_i->i_nlinks;
+	mfsdebug("mfs_lnkcnt_get(): %u\n", rc);
+	return rc;
 }
 
@@ -280,4 +344,5 @@
 		return -1;
 
+	ino_i->index = index;
 	mnode->ino_i = ino_i;
 
@@ -285,4 +350,6 @@
 	node->data = mnode;
 	*rfn = node;
+
+	mfsdebug("node_get_core(%d) OK\n", (int) index);
 
 	return EOK;
@@ -310,5 +377,8 @@
 int mfs_root_get(fs_node_t **rfn, devmap_handle_t handle)
 {
-	return mfs_node_get(rfn, handle, MFS_ROOT_INO);
+	int rc = mfs_node_get(rfn, handle, MFS_ROOT_INO);
+
+	mfsdebug("mfs_root_get %s\n", rc == EOK ? "OK" : "FAIL");
+	return rc;
 }
 
@@ -353,4 +423,6 @@
 	}
 
+out:
+
 	if (*has_children)
 		mfsdebug("Has children\n");
@@ -358,5 +430,4 @@
 		mfsdebug("Has not children\n");
 
-out:
 	return EOK;
 }
