From: Jan Kara <jack@suse.cz>
To: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Cc: Ted Ts'o <tytso@mit.edu>,
linux-ext4@vger.kernel.org, adilger@whamcloud.com,
colyli@gmail.com, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 1/3] ext4: Fix compilation with -DDX_DEBUG v2
Date: Wed, 20 Jul 2011 23:25:11 +0200 [thread overview]
Message-ID: <20110720212511.GA17353@quack.suse.cz> (raw)
In-Reply-To: <4E259C7A.5030506@itwm.fraunhofer.de>
On Tue 19-07-11 17:02:18, Bernd Schubert wrote:
> On 07/17/2011 01:41 AM, Ted Ts'o wrote:
> > On Mon, Jun 20, 2011 at 10:28:49PM +0200, Bernd Schubert wrote:
> >> changes from v1 -> v2:
> >> Use %p as suggested by Coly Li
> >
> > The problem with %p:
> >
> > 1) It prints numbers that will never be larger than 4096 with as
> > "00000012"
> > 2) It prints the number 0 as " (null)".
> >
> > These two things mean that we get messages like this:
> >
> > names: foo:7141e93c. (null) bar:745c4a06.00000012 baz:79817344.00000024 quux:7e85a800.00000036 ...
> >
> > instead of:
> >
> > names: foo:7141e93c.0 bar:745c4a06.12 baz:79817344.24 quux:7e85a800.36 ...
> >
> > (did anyone even try this and check to see what would happen with %p?)
> >
> > I've applied this patch, with a change so that we print the number
> > with %u and with an explicit cast to unsigned.
> >
> > - Ted
>
> Ooops, sorry, I should have checked %p output more thoroughly.
>
> Could you please also apply almost the same patch for ext3?
>
>
> ext3: Fix compilation with -DDX_DEBUG v2
>
> From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
>
> Compilation of ext3/namei.c brought up an error and warning messages
> when compiled with -DDX_DEBUG.
>
> Signed-off-by: Bernd Schubert<bernd.schubert@itwm.fraunhofer.de>
I've merged this patch to my tree.
Honza
> diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
> index 34b6d9b..e54e87a 100644
> --- a/fs/ext3/namei.c
> +++ b/fs/ext3/namei.c
> @@ -287,7 +287,7 @@ static struct stats dx_show_leaf(struct dx_hash_info *hinfo, struct ext3_dir_ent
> while (len--) printk("%c", *name++);
> ext3fs_dirhash(de->name, de->name_len, &h);
> printk(":%x.%u ", h.hash,
> - ((char *) de - base));
> + (unsigned) ((char *) de - base));
> }
> space += EXT3_DIR_REC_LEN(de->name_len);
> names++;
> @@ -1013,7 +1013,7 @@ static struct buffer_head * ext3_dx_find_entry(struct inode *dir,
>
> *err = -ENOENT;
> errout:
> - dxtrace(printk("%s not found\n", name));
> + dxtrace(printk("%s not found\n", entry->name));
> dx_release (frames);
> return NULL;
> }
>
>
>
> Thanks,
> Bernd
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2011-07-20 21:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 20:28 [PATCH 0/3] directory index patch set v2 Bernd Schubert
2011-06-20 20:28 ` [PATCH 1/3] ext4: Fix compilation with -DDX_DEBUG v2 Bernd Schubert
[not found] ` <4E0012A4.1010608@gmail.com>
2011-06-21 15:26 ` Bernd Schubert
2011-07-16 23:41 ` Ted Ts'o
2011-07-19 15:02 ` Bernd Schubert
2011-07-20 21:25 ` Jan Kara [this message]
2011-06-20 20:28 ` [PATCH 2/3] ext4 directory index: read-ahead blocks v2 Bernd Schubert
2011-07-16 23:59 ` Ted Ts'o
2011-07-17 1:02 ` Bernd Schubert
2011-07-17 13:12 ` Theodore Tso
2011-07-18 0:23 ` Ted Ts'o
2011-07-19 14:22 ` Bernd Schubert
2011-06-20 20:29 ` [PATCH 3/3] dx read-ahead: Map blocks with a single semaphore lock Bernd Schubert
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=20110720212511.GA17353@quack.suse.cz \
--to=jack@suse.cz \
--cc=adilger@whamcloud.com \
--cc=bernd.schubert@itwm.fraunhofer.de \
--cc=colyli@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).