All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: kerolasa@gmail.com
Cc: Davidlohr Bueso <dave@gnu.org>, util-linux@vger.kernel.org
Subject: Re: [PATCH] minix: v3 super-block does not have s_state field
Date: Tue, 19 Jul 2011 00:19:26 +0200	[thread overview]
Message-ID: <20110718221926.GE4354@nb.redhat.com> (raw)
In-Reply-To: <CAG27Bk0DYx+jCD-iqQvt1n=VdHszceTEAQQRvCKLvPXqpagTXA@mail.gmail.com>


 Sami, thanks for the patches, few notes:

On Thu, Jul 14, 2011 at 05:47:39PM +0200, Sami Kerola wrote:
> +++ b/include/minix.h
> @@ -1,69 +1,65 @@
>  #ifndef __MINIX_H__
>  #define __MINIX_H__

 we usually use UTIL_LINUX prefix, so #ifndef UTIL_LINUX_MINIX_H.

>  #define BLOCK_SIZE_BITS 10
>  #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)

 This is too generic. Please, use MINIX_ prefix.

>  #define Inode (((struct minix_inode *) inode_buffer)-1)
>  #define Inode2 (((struct minix2_inode *) inode_buffer)-1)
> 
>  #define INODE_SIZE (sizeof(struct minix_inode))
>  #define INODE2_SIZE (sizeof(struct minix2_inode))
> 
> -int fs_version = 1; /* this default value needs to change in a near future */
> -char *super_block_buffer, *inode_buffer = NULL;
> +static int fs_version = 1; /* this default value needs to change in a
> near future */
> +static char *super_block_buffer, *inode_buffer = NULL;
> 
>  static char *inode_map;
>  static char *zone_map;

 The global variables don't belong to this generic header file. The
 stuff around inode_buffer, fs_version and the inline functions are
 specific to the disk-utils/ utils. Please, add
 disk-utils/minix_programs.h and use it in {mkfs,fsck}.minix.

>  		/* sanity checks to be sure that the FS is really minix */
> -		if (sb->s_imap_blocks * MINIX_BLOCK_SIZE * 8 < sb->s_ninodes + 1)
> +		if (sb->s_imap_blocks * BLOCK_SIZE * 8 < sb->s_ninodes + 1)
>  			return -1;
> -		if (sb->s_zmap_blocks * MINIX_BLOCK_SIZE * 8 < zones -
> sb->s_firstdatazone + 1)
> +		if (sb->s_zmap_blocks * BLOCK_SIZE * 8 < zones - sb->s_firstdatazone + 1)
>  			return -1;

 No, please...

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2011-07-18 22:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 15:50 [PATCH] minix: v3 super-block does not have s_state field Sami Kerola
2011-07-13  4:05 ` Davidlohr Bueso
2011-07-13 11:33   ` Sami Kerola
2011-07-13 12:12     ` Karel Zak
2011-07-13 14:54       ` Sami Kerola
2011-07-13 17:34         ` Karel Zak
2011-07-14  2:03           ` Davidlohr Bueso
2011-07-14  9:18             ` Karel Zak
2011-07-14 15:47               ` Sami Kerola
2011-07-18 22:19                 ` Karel Zak [this message]
2011-07-20 18:53                   ` Sami Kerola
2011-07-21 11:21                     ` Karel Zak

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=20110718221926.GE4354@nb.redhat.com \
    --to=kzak@redhat.com \
    --cc=dave@gnu.org \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /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.