All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Mallon <ryan@bluewatersys.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Embedded <linux-embedded@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Tim Bird <tim.bird@am.sony.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 08/16 v2] pramfs: headers
Date: Mon, 08 Nov 2010 09:09:17 +1300	[thread overview]
Message-ID: <4CD7076D.80507@bluewatersys.com> (raw)
In-Reply-To: <4CD518C5.6000509@gmail.com>

On 11/06/2010 09:58 PM, Marco Stornelli wrote:
> From: Marco Stornelli <marco.stornelli@gmail.com>
> 
> Definitions for the PRAMFS filesystem.
> 
> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
> ---
> diff -Nurp linux-2.6.36-orig/fs/pramfs/pram.h linux-2.6.36/fs/pramfs/pram.h
> --- linux-2.6.36-orig/fs/pramfs/pram.h	1970-01-01 01:00:00.000000000 +0100
> +++ linux-2.6.36/fs/pramfs/pram.h	2010-10-30 12:02:45.000000000 +0200
> @@ -0,0 +1,317 @@

> +/*
> + * Structure of the super block in PRAMFS
> + */
> +struct pram_super_block {
> +	__be16	s_sum;          /* checksum of this sb, including padding */
> +	__be64	s_size;         /* total size of fs in bytes */
> +	__be32	s_blocksize;    /* blocksize in bytes */
> +	__be32	s_inodes_count;	/* total inodes count (used or free) */
> +	__be32	s_free_inodes_count;/* free inodes count */
> +	__be32	s_free_inode_hint;  /* start hint for locating free inodes */
> +	__be32	s_blocks_count;	/* total data blocks count (used or free) */
> +	__be32	s_free_blocks_count;/* free data blocks count */
> +	__be32	s_free_blocknr_hint;/* free data blocks count */
> +	__be64	s_bitmap_start; /* data block in-use bitmap location */
> +	__be32	s_bitmap_blocks;/* size of bitmap in number of blocks */
> +	__be32	s_mtime;	/* Mount time */
> +	__be32	s_wtime;	/* Write time */
> +	__be16	s_magic;	/* Magic signature */
> +	char	s_volume_name[16]; /* volume name */
> +};

Is there a particular reason to use big endian types for the data
structures? On a little endian machine you will end up converting values
everywhere. I assume that you don't expect the machine to change
endianess between reboots :-). If this is for generating/reading
filesystems from userspace, wouldn't it be better to have the userspace
tools specify the target endianess and do the conversions there?

~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan@bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

  reply	other threads:[~2010-11-07 20:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06  8:58 [PATCH 08/16 v2] pramfs: headers Marco Stornelli
2010-11-07 20:09 ` Ryan Mallon [this message]
2010-11-08  7:49   ` Marco Stornelli
2010-11-08 19:50     ` Ryan Mallon
2010-11-09  8:19       ` Marco Stornelli
2010-11-09 20:35         ` Ryan Mallon
2010-11-09 20:56           ` Geert Uytterhoeven
2010-11-09 20:56             ` Geert Uytterhoeven
2010-11-10  8:15             ` Marco Stornelli
2010-11-10 19:09               ` Ryan Mallon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD7076D.80507@bluewatersys.com \
    --to=ryan@bluewatersys.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    --cc=tim.bird@am.sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.