From: Pekka Enberg <penberg@cs.helsinki.fi>
To: "Daniel Aragonés" <danarag@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATH/RFC] minix filesystem Update to V3 for 2.6.x.y revised
Date: Tue, 24 Jan 2006 21:10:47 +0200 [thread overview]
Message-ID: <1138129847.8653.6.camel@localhost> (raw)
In-Reply-To: <43D676A9.5030304@gmail.com>
Hi Daniel,
On Tue, 2006-01-24 at 19:49 +0100, Daniel Aragonés wrote:
> According to your suggestions, I have modified the patch for better
> formatting and other. Testing is going on fine. Here comes the patch
> attached as textfile V3_2dot6_patch3.txt
Looks much better! Thanks for doing this. Few comments below. Perhaps
you should send this to Andrew for inclusion in -mm after that?
> @@ -107,15 +112,23 @@
> p = kaddr+offset;
> limit = kaddr + minix_last_byte(inode, n) - chunk_size;
> for ( ; p <= limit ; p = minix_next_entry(p, sbi)) {
> + minix3_dirent *de3 = (minix3_dirent *)p;
> minix_dirent *de = (minix_dirent *)p;
> - if (de->inode) {
> + if (sbi->s_version == MINIX_V3) {
> + name_ptr = de3->name;
> + inode_ptr = de3->inode;
> + } else {
> + name_ptr = de->name;
> + inode_ptr = de->inode;
> + }
Some formatting issues above.
> @@ -157,9 +170,11 @@
> unsigned long n;
> unsigned long npages = dir_pages(dir);
> struct page *page = NULL;
> + struct minix3_dir_entry *de3;
> struct minix_dir_entry *de;
> -
> *res_page = NULL;
> + char *name_ptr;
> + __u32 inode_ptr;
Minor nitpick, I think you can omit the "ptr" prefix.
> @@ -301,11 +348,15 @@
> memset(kaddr, 0, PAGE_CACHE_SIZE);
>
> de = (struct minix_dir_entry *)kaddr;
> + de3 = (struct minix3_dir_entry *)kaddr;
> de->inode = inode->i_ino;
> - strcpy(de->name,".");
> + de3->inode = inode->i_ino;
> + (sbi->s_version == MINIX_V3) ? strcpy(de3->name,".") : strcpy(de->name,".");
> de = minix_next_entry(de, sbi);
> + de3 = minix_next_entry(de3, sbi);
> de->inode = dir->i_ino;
> - strcpy(de->name,"..");
> + de3->inode = dir->i_ino;
> + (sbi->s_version == MINIX_V3) ? strcpy(de3->name,"..") : strcpy(de->name,"..");
if-else is preferred.
> @@ -322,9 +373,12 @@
> struct page *page = NULL;
> unsigned long i, npages = dir_pages(inode);
> struct minix_sb_info *sbi = minix_sb(inode->i_sb);
> + char *name_ptr;
> + __u32 inode_ptr;
Same nitpick as above.
> +/*
> + * V3 minix super-block data on disk
> + */
> +struct minix3_super_block {
> + __u16 s_ninodes;
> + __u16 s_nzones;
> + __u16 s_pad0;
> + __u16 s_imap_blocks;
> + __u16 s_zmap_blocks;
> + __u16 s_firstdatazone;
> + __u16 s_log_zone_size;
> + __u16 s_pad1;
> + __u32 s_max_size;
> + __u32 s_zones;
> + __u16 s_magic;
> + __u16 s_pad2;
> + __u16 s_blocksize;
> + __u8 s_disk_version;
> +};
I am wondering, doesn't minix filesystems have on-disk byteorder
defined? That is, would __le32 or __be32 be better here?
prev parent reply other threads:[~2006-01-24 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-24 18:49 [PATH/RFC] minix filesystem Update to V3 for 2.6.x.y revised Daniel Aragonés
2006-01-24 19:10 ` Pekka Enberg [this message]
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=1138129847.8653.6.camel@localhost \
--to=penberg@cs.helsinki.fi \
--cc=danarag@gmail.com \
--cc=linux-kernel@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.