Re: [PATCH take 2 08/28] UBIFS: add superblock and master node

From: Kyungmin Park
Date: Tue May 06 2008 - 19:49:15 EST


Hi Artem,

Here's one proposal. Please add the no compressed mode support.
In my simple test. it's working with no compress mode.
Yes I know, it makes the performance poor. but we can measure the
metadata operation overhead compare to the previous flash filesystems.

How do you think?

Thank you,
Kyungmin Park


> diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
> new file mode 100644
> index 0000000..2fe4c7c
> --- /dev/null
> +++ b/fs/ubifs/sb.c

> +/* The default maximum size of reserved pool in bytes */
> +#define DEFAULT_MAX_RP_SIZE (5*1024*1024)
> +
> +/* Default UBIFS compressor */
> +#define DEFAULT_COMPRESSOR UBIFS_COMPR_LZO
> +

#ifdef CONFIG_UBIFS_FS_NO_COMPR
#define DEFAULT_COMPRESSOR UBIFS_COMPR_NONE
#else
#define DEFAULT_COMPRESSOR UBIFS_COMPR_LZO
#endif


> + ino->mtime_nsec = 0;
> + ino->mode = cpu_to_le32(S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO);
> + ino->size = cpu_to_le64(UBIFS_INO_NODE_SZ);
> +
> + /* Set compression enabled by default */
> + ino->flags = cpu_to_le32(UBIFS_COMPR_FL);
> +
> + err = ubifs_write_node(c, ino, UBIFS_INO_NODE_SZ,
> + main_first + DEFAULT_DATA_LEB, 0,
> + UBI_UNKNOWN);

#ifdef CONFIG_UBIFS_FS_NO_COMPR
/* Don't use the compression */
ino->flags = 0;
#else
/* Set compression enabled by default */
ino->flags = cpu_to_le32(UBIFS_COMPR_FL);
#endif

Of course it also adds the UBIFS_FS_NO_COMPR to fs/ubifs/Kconfig properly.
--
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/