From: Phillip Susi <psusi@ubuntu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] loop: cleanup partitions when detaching loop device
Date: Thu, 14 Mar 2013 21:45:59 -0400 [thread overview]
Message-ID: <51427D57.7080702@ubuntu.com> (raw)
In-Reply-To: <20130314150709.056aa4de5fadf3a5e94103d4@linux-foundation.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/14/2013 06:07 PM, Andrew Morton wrote:
> huh. What is the user-visible effect of this bug? Just a memory
> leak or something more serious?
Not serious, but user-visible in that the partition devnodes still
show up after detaching the backing file, and I think the partitions
remained in place after attaching a new file even though it had
different or no partitions at all.
> scripts/checkpatch.pl is your friend.
Oops. I see you pushed a patch fixing up the brace position and
breaking the long line. Did you want me to squash it and resubmit, or
just sign off on it? If the latter, consider it signed off.
> Can you please suggest a code comment which we can slip in here to
> tell readers what's going on and why we're doing this?
How about "Remove all partitions, since BLKRRPART won't remove user
added partitions when max_part=0"?
>> + struct disk_part_iter piter; + struct hd_struct *part; + +
>> mutex_lock_nested(&bdev->bd_mutex, 1); +
>> invalidate_partition(bdev->bd_disk, 0); +
>> disk_part_iter_init(&piter, bdev->bd_disk,
>> DISK_PITER_INCL_EMPTY); + while ((part =
>> disk_part_iter_next(&piter))) + delete_partition(bdev->bd_disk,
>> part->partno); + disk_part_iter_exit(&piter); +
>> mutex_unlock(&bdev->bd_mutex); + }
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEcBAEBAgAGBQJRQn1XAAoJEJrBOlT6nu75QIEIAIM4skpZoKWYzAYXCK84JjP2
7Z0toyWfpQ63ku7grFPMST8wpGrsq31zcwa7zvya2Tg0ivi0vHOZmw0QBVic3mw0
Ce88iVkCDQSoASwPdHRLwNLj7Lj/cvHkwqZIHbDXR5u15v1sr3NTrCDMP33kZlPi
Z8TbX+3fTTMYriYXUOI8fmqnC+d1gj8w+fsNNAB23/mVgN6ed9uGMQqEQjXGQOnQ
By9R7dD5SZ9hqstLBSCvochBVfNjWm2rMtKTnixcY1qTDGCLWZ2sUpxns6WTjAZl
lWL/S80kt+sbpkQorXWWDZJAvyRhQny4703rwPRhzgMWPDY7qJkn465tDT4S/ic=
=3/XD
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-03-15 1:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-03 18:49 [PATCH] loop: cleanup partitions when detaching loop device Phillip Susi
2013-03-14 22:07 ` Andrew Morton
2013-03-15 1:45 ` Phillip Susi [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-12-02 23:54 Phillip Susi
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=51427D57.7080702@ubuntu.com \
--to=psusi@ubuntu.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox