From: Azat Khuzhin <a3at.mail@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-ext4@vger.kernel.org, adilger@dilger.ca, tytso@mit.edu
Subject: Re: [PATCH 4/4] lib: add EXT2_ prefix for SUPERBLOCK_{OFFSET,SIZE}
Date: Thu, 10 Jul 2014 00:05:27 +0400 [thread overview]
Message-ID: <20140709200527.GS4622@azat> (raw)
In-Reply-To: <20140709195844.GD10417@birch.djwong.org>
On Wed, Jul 09, 2014 at 12:58:44PM -0700, Darrick J. Wong wrote:
> On Wed, Jul 09, 2014 at 11:51:18PM +0400, Azat Khuzhin wrote:
> > Since mostly all macros have this prefix, and to avoid potential name
> > clashes.
> >
> > Proposed-by: Andreas Dilger <adilger@dilger.ca>
> > Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
> > ---
> > e2fsck/journal.c | 2 +-
> > e2fsck/super.c | 4 ++--
> > e2fsck/util.c | 4 ++--
> > lib/blkid/probe.h | 2 +-
> > lib/ext2fs/closefs.c | 18 +++++++++---------
> > lib/ext2fs/dupfs.c | 8 ++++----
> > lib/ext2fs/ext2fs.h | 10 ++++++++--
> > lib/ext2fs/imager.c | 4 ++--
> > lib/ext2fs/initialize.c | 4 ++--
> > lib/ext2fs/mkjournal.c | 6 +++---
> > lib/ext2fs/openfs.c | 12 ++++++------
> > lib/ext2fs/tst_badblocks.c | 4 ++--
> > lib/ext2fs/undo_io.c | 4 ++--
> > misc/e2undo.c | 4 ++--
> > misc/mke2fs.c | 4 ++--
> > misc/tune2fs.c | 12 ++++++------
> > 16 files changed, 54 insertions(+), 48 deletions(-)
> >
> > diff --git a/e2fsck/journal.c b/e2fsck/journal.c
> > index 6df0165..785d283 100644
> > --- a/e2fsck/journal.c
> > +++ b/e2fsck/journal.c
> > @@ -454,7 +454,7 @@ static errcode_t e2fsck_get_journal(e2fsck_t ctx, journal_t **ret_journal)
> > brelse(bh);
> > goto errout;
> > }
> > - memcpy(&jsuper, start ? bh->b_data : bh->b_data + SUPERBLOCK_OFFSET,
> > + memcpy(&jsuper, start ? bh->b_data : bh->b_data + EXT2_SUPERBLOCK_OFFSET,
> > sizeof(jsuper));
> > brelse(bh);
> > #ifdef WORDS_BIGENDIAN
> > diff --git a/e2fsck/super.c b/e2fsck/super.c
> > index c8669f8..d58a789 100644
> > --- a/e2fsck/super.c
> > +++ b/e2fsck/super.c
> > @@ -921,7 +921,7 @@ int check_backup_super_block(e2fsck_t ctx)
> > dgrp_t g;
> > blk64_t sb;
> > int ret = 0;
> > - char buf[SUPERBLOCK_SIZE];
> > + char buf[EXT2_SUPERBLOCK_SIZE];
> > struct ext2_super_block *backup_sb;
> >
> > /*
> > @@ -944,7 +944,7 @@ int check_backup_super_block(e2fsck_t ctx)
> >
> > sb = ext2fs_group_first_block2(fs, g);
> >
> > - retval = io_channel_read_blk(fs->io, sb, -SUPERBLOCK_SIZE,
> > + retval = io_channel_read_blk(fs->io, sb, -EXT2_SUPERBLOCK_SIZE,
> > buf);
> > if (retval)
> > continue;
> > diff --git a/e2fsck/util.c b/e2fsck/util.c
> > index fec6179..75e11de 100644
> > --- a/e2fsck/util.c
> > +++ b/e2fsck/util.c
> > @@ -540,7 +540,7 @@ blk64_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
> > if (manager->open(name, 0, &io) != 0)
> > goto cleanup;
> >
> > - if (ext2fs_get_mem(SUPERBLOCK_SIZE, &buf))
> > + if (ext2fs_get_mem(EXT2_SUPERBLOCK_SIZE, &buf))
> > goto cleanup;
> > sb = (struct ext2_super_block *) buf;
> >
> > @@ -551,7 +551,7 @@ blk64_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
> > superblock++;
> > io_channel_set_blksize(io, blocksize);
> > if (io_channel_read_blk64(io, superblock,
> > - -SUPERBLOCK_SIZE, buf))
> > + -EXT2_SUPERBLOCK_SIZE, buf))
> > continue;
> > #ifdef WORDS_BIGENDIAN
> > if (sb->s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC))
> > diff --git a/lib/blkid/probe.h b/lib/blkid/probe.h
> > index d6809e1..06141ea 100644
> > --- a/lib/blkid/probe.h
> > +++ b/lib/blkid/probe.h
> > @@ -403,7 +403,7 @@ struct iso_volume_descriptor {
> > /* Common gfs/gfs2 constants: */
> > #define GFS_MAGIC 0x01161970
> > #define GFS_DEFAULT_BSIZE 4096
> > -#define GFS_SUPERBLOCK_OFFSET (0x10 * GFS_DEFAULT_BSIZE)
> > +#define GFS_EXT2_SUPERBLOCK_OFFSET (0x10 * GFS_DEFAULT_BSIZE)
>
> I doubt the e2fsprogs blkid does much these days, but .... huh???
Ops, this was matched by simple pattern, next time I will be smarter.
Thanks.
>
> The rest looks ok to me.
>
> --D
--
Respectfully
Azat Khuzhin
next prev parent reply other threads:[~2014-07-09 20:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 19:51 [PATCH 4/4] lib: add EXT2_ prefix for SUPERBLOCK_{OFFSET,SIZE} Azat Khuzhin
2014-07-09 19:58 ` Darrick J. Wong
2014-07-09 20:05 ` Azat Khuzhin [this message]
2014-07-09 20:08 ` [PATCH 4/4 v2] " Azat Khuzhin
2014-07-09 20:32 ` Andreas Dilger
2014-07-10 6:00 ` Azat Khuzhin
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=20140709200527.GS4622@azat \
--to=a3at.mail@gmail.com \
--cc=adilger@dilger.ca \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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.