From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH V2] xfs_repair: fix record_allocation list manipulation
Date: Tue, 22 Sep 2009 08:02:31 -0400 [thread overview]
Message-ID: <20090922120231.GB8143@infradead.org> (raw)
In-Reply-To: <4AB4EDBC.9050609@sandeen.net>
On Sat, Sep 19, 2009 at 09:42:04AM -0500, Eric Sandeen wrote:
> clang found this one too as a "Dead assignment"
>
> Unless my pointer-fu is totally messed up, this function
> was never actually updating the list head.
>
> This would mean that the later free_allocations() calls in
> incore_ext_teardown() and free_rt_dup_extent_tree() don't
> actually free any items, and therefore leak memory.
>
> V2: now with correct pointer-fu.
Barry already had this in his repair speedups patchkit, but I left it
out for now because I wasn't too sure how this could work at all.
After reviewing it again I noticed that it can actually work because the
addr pointer in the ba_rec_t is unused, and we make use of the fact that
the ba_rec_t is the first field in the structure to be tacked. Entirely
to subtile for my taste. Id' prefer to just put a list_head into the
extent_alloc_rec_t and rt_extent_alloc_rec_t and openconde the
tracking/freeing of the beast. The list_head if just as large as the
ba_rec_t and make sure the list handlinjg is right, and the openconding
gets rid of the annoying assumption that the ba_rec_t is the first thing
in the structure to be tracked. It should also be a net-removal of
code.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-09-22 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 3:38 [PATCH] xfs_repair: fix record_allocation list manipulation Eric Sandeen
2009-09-18 4:54 ` Eric Sandeen
2009-09-18 5:19 ` [PATCH] repair: replaced custom block allocation linked lists with list_heads Josef 'Jeff' Sipek
2009-09-25 14:41 ` Eric Sandeen
2009-09-19 14:42 ` [PATCH V2] xfs_repair: fix record_allocation list manipulation Eric Sandeen
2009-09-22 12:02 ` Christoph Hellwig [this message]
2009-09-22 15:21 ` Eric Sandeen
2009-09-22 20:04 ` Christoph Hellwig
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=20090922120231.GB8143@infradead.org \
--to=hch@infradead.org \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox