Re: [PATCH/RFC] s390: Hypervisor File System

From: Pekka Enberg
Date: Tue Apr 25 2006 - 10:32:59 EST


On Mon, 2006-04-24 at 19:19 +0200, Michael Holzheu wrote:
> +static int hypfs_create_cpu_files(struct super_block *sb,
> + struct dentry *cpus_dir, void *cpu_info)
> +{
> + struct dentry *cpu_dir;
> + char buffer[TMP_SIZE];

Holy cow! That's 1 KB allocated on the stack! Please use kmalloc()
instead.

> +static int hypfs_create_phys_cpu_files(struct super_block *sb,
> + struct dentry *cpus_dir, void *cpu_info)
> +{
> + struct dentry *cpu_dir;
> + char buffer[TMP_SIZE];

Ditto.

> +static ssize_t hypfs_aio_write(struct kiocb *iocb, const char __user *buf,
> + size_t count, loff_t pos)
> +{
> + int rc;
> +
> + mutex_lock(&hypfs_lock);
> + if (last_update_time == get_seconds()) {
> + rc = -EBUSY;
> + goto out;
> + }
> + hypfs_delete_tree(hypfs_sblk->s_root);

To state what I said earlier: the use of a global hypfs_sblk is
problematic because now we can only have the filesystem mounted once. So
I would really like to see some other way of updating. How do you feel
about the s_ops->fs_remount thing?

Pekka

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/