diff --git a/fs/namespace.c b/fs/namespace.c
index 9ebd113..a7eee20 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -386,6 +386,14 @@ static int prepare_mnt_root_mangle(struct vfsmount *mnt,
 	return 0;
 }
 
+static void show_type(struct seq_file *m, struct super_block *sb)
+{
+	if (!sb->s_op->show_type)
+		mangle(m, sb->s_type->name);
+	else
+	        sb->s_op->show_type(m, sb);
+}
+
 static int show_vfsmnt(struct seq_file *m, void *v)
 {
 	struct vfsmount *mnt = v;
@@ -422,7 +430,7 @@ static int show_vfsmnt(struct seq_file *m, void *v)
 		mangle(m, mnt->mnt_sb->s_type->name);
 	}
 	seq_putc(m, ' ');
-	mangle(m, path);
+	show_type(m, mnt->mnt_sb);
 	free_page((unsigned long) path_buf);
 	seq_putc(m, ' ');
 	mangle(m, mnt->mnt_sb->s_type->name);
diff --git a/fs/simfs.c b/fs/simfs.c
index a84fc3a..c56f681 100644
--- a/fs/simfs.c
+++ b/fs/simfs.c
@@ -22,6 +22,9 @@
 #include <linux/faudit.h>
 #include <linux/genhd.h>
 #include <linux/reiserfs_fs.h>
+#include <linux/seq_file.h>
+#include <linux/quotaops.h>
+#include <linux/string.h>
 
 #include <asm/unistd.h>
 #include <asm/uaccess.h>
@@ -223,8 +226,32 @@ static void sim_quota_free(struct super_block *sb)
 	virtinfo_notifier_call(VITYPE_QUOTA, VIRTINFO_QUOTA_OFF, &viq);
 }
 
+static void sim_show_type(struct seq_file *m, struct super_block *sb)
+{
+	if (need_fake_fstype(current))
+		seq_escape(m,  SIMFS_GET_LOWER_FS_SB(sb)->s_type->name,
+			" \t\n\\");
+	else
+		seq_escape(m, sb->s_type->name, " \t\n\\");
+}
+
+static int sim_show_options(struct seq_file *m, struct vfsmount *mnt)
+{
+#ifdef CONFIG_QUOTA
+	if (sb_has_quota_enabled(mnt->mnt_sb, USRQUOTA))
+		seq_puts(m, ",usrquota");
+	if (sb_has_quota_enabled(mnt->mnt_sb, GRPQUOTA))
+		seq_puts(m, ",grpquota");
+#endif
+	return 0;
+}
+
 static struct super_operations sim_super_ops = {
-	.get_quota_root	= sim_quota_root,
+#ifdef CONFIG_QUOTA
+	.show_type	= &sim_show_type,
+	.show_options	= &sim_show_options,
+#endif
+	.get_quota_root	= &sim_quota_root,
 };
 
 extern struct export_operations export_op_default;
diff --git a/fs/vzdquot.c b/fs/vzdquot.c
index 1caabc3..9ca19d9 100644
--- a/fs/vzdquot.c
+++ b/fs/vzdquot.c
@@ -123,6 +123,41 @@ static kmem_cache_t *vzquota_cachep;
 struct list_head vzquota_hash_table[VZ_QUOTA_HASH_SIZE];
 int vzquota_hash_size = VZ_QUOTA_HASH_SIZE;
 
+/* This is the ugliest hack of the release, we have to fixup filesystem type
+ * in order to support quota tools.
+ */
+int need_fake_fstype(const struct task_struct *tsk)
+{
+	const char **p;
+	const char *comm;
+	const char *comm_list[] = {
+		"edquota",
+		"quotacheck",
+		"quotadebug",
+		"quotaon",
+		"quotastats",
+		"repquota",
+		"setquota",
+		"setup_quota_group",
+		"warnquota",
+		NULL,
+	};
+	comm = strrchr(tsk->comm, '/');
+	if (comm)
+		comm++;
+	else
+		comm = tsk->comm;
+
+	p = comm_list;
+	while (*p != NULL) {
+		if (!strcmp(*p, comm))
+			return 1;
+		p++;
+	}
+	return 0;
+}
+EXPORT_SYMBOL(need_fake_fstype);
+
 static inline int vzquota_hash_func(unsigned int qid)
 {
 	return (((qid >> QHASH_BITS) ^ qid) & QHASH_MASK);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d43614a..25e303f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1341,6 +1341,7 @@ struct super_operations {
 	void (*clear_inode) (struct inode *);
 	void (*umount_begin) (struct vfsmount *, int);
 
+	void (*show_type)(struct seq_file *, struct super_block *sb);
 	int (*show_options)(struct seq_file *, struct vfsmount *);
 	int (*show_stats)(struct seq_file *, struct vfsmount *);
 
diff --git a/include/linux/vzquota.h b/include/linux/vzquota.h
index 0b5efcd..d122d2a 100644
--- a/include/linux/vzquota.h
+++ b/include/linux/vzquota.h
@@ -404,6 +404,7 @@ void vzaquota_fini(void);
 
 extern int vzquota_snap_init(struct super_block *super, struct vzsnap_struct *vzs);
 extern int vzquota_snap_stop(struct super_block *super, struct vzsnap_struct *vzs);
+int need_fake_fstype(const struct task_struct * tsk);
 
 #endif /* __KERNEL__ */
 
-- 1.6.6.1 . 
