lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121007064222.GA436@stefanha-thinkpad>
Date:	Sun, 7 Oct 2012 08:42:22 +0200
From:	Stefan Hajnoczi <stefanha@...il.com>
To:	jaegeuk.kim@...sung.com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/16] f2fs: add on-disk layout

> +/*
> + * For superblock
> + */
> +struct f2fs_super_block {
> +	__le32 magic;		/* Magic Number */
> +	__le16 major_ver;	/* Major Version */
> +	__le16 minor_ver;	/* Minor Version */
> +	__le32 log_sectorsize;	/* log2 (Sector size in bytes) */
> +	__le32 log_sectors_per_block;	/* log2 (Number of sectors per block */
> +	__le32 log_blocksize;	/* log2 (Block size in bytes) */

Why store log_blocksize on disk when it can be calculated from
log_sectorsize and log_sectors_per_block?  It may be handy to keep this
in the in-memory superblock but keeping it on-disk means you need a
consistency check and error code path when loading the superblock.

> +struct f2fs_inode {
> +	__le16 i_mode;			/* File mode */
> +	__le16 i_reserved;		/* Reserved */
> +	__le32 i_uid;			/* User ID */
> +	__le32 i_gid;			/* Group ID */
> +	__le32 i_links;			/* Links count */
> +	__le64 i_size;			/* File size in bytes */
> +	__le64 i_blocks;		/* File size in bytes */

File size in blocks 

> +struct direct_node {
> +	__le32 addr[ADDRS_PER_BLOCK];	/* aray of data block address */

s/aray/array/

> +} __packed;
> +
> +struct indirect_node {
> +	__le32 nid[NIDS_PER_BLOCK];	/* aray of data block address */

s/aray/array/

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ