linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Marc Smith <marc.smith@mcc.edu>
Cc: linux-raid@vger.kernel.org
Subject: Re: MD Remnants After --stop
Date: Thu, 01 Dec 2016 13:52:48 +1100	[thread overview]
Message-ID: <87shq8743j.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <CAHkw+Lc9YEdbJcRu2bOLU-gex9UYSXB32iRKD8TPS7JpjSOdQA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]

On Mon, Nov 28 2016, Marc Smith wrote:

>
> # find /sys/block/md127/md
> /sys/block/md127/md
> /sys/block/md127/md/reshape_position
> /sys/block/md127/md/layout
> /sys/block/md127/md/raid_disks
> /sys/block/md127/md/bitmap
> /sys/block/md127/md/bitmap/chunksize

This tells me that:
	sysfs_remove_group(&mddev->kobj, &md_bitmap_group);
hasn't been run, so mddev_delayed_delete() hasn't run.
That suggests the final mddev_put() hsn't run. i.e. mddev->active is > 0

Everything else suggests that array has been stopped and cleaned and
should be gone...

This seems to suggest that there is an unbalanced mddev_get() without a
matching mddev_put().  I cannot find it though.

If I could reproduce it, I would try to see what is happening by:

- putting
   printk("mddev->active = %d\n", atomic_read(&mddev->active));
 in the top of mddev_put().  That shouldn't be *too* noisy.

- putting
   printk("rd=%d empty=%d ctime=%d hold=%d\n", mddev->raid_disks,
   	list_empty(&mddev->disks), mddev->ctime, mddev->hold_active);

  in mddev_put() just before those values are tested.

 - putting
     printk("queue_work\n");
   just before the 'queue_work()' call in mddev_put.

 - putting
     printk("mddev_delayed_delete\n");
   in mddev_delayed_delete()

Then see what gets printed when you stop the array.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2016-12-01  2:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 15:35 MD Remnants After --stop Marc Smith
2016-11-07  5:44 ` NeilBrown
2016-11-18 19:31   ` Marc Smith
2016-11-21  3:42     ` NeilBrown
2016-11-21 14:08       ` Marc Smith
2016-11-22 15:12         ` Marc Smith
2016-11-22 23:51           ` NeilBrown
2016-11-23 15:21             ` Marc Smith
2016-11-23 23:38               ` NeilBrown
2016-11-26 16:41                 ` Marc Smith
2016-11-27 22:20                   ` NeilBrown
2016-11-28  2:25                     ` Marc Smith
2016-12-01  2:52                       ` NeilBrown [this message]
2016-12-01 19:40                         ` Marc Smith
2016-12-01 22:35                           ` NeilBrown
2016-12-02 18:18                             ` Stephane Thiell
2016-12-02 19:12                             ` Marc Smith
2016-12-02 20:22                               ` Marc Smith
2016-12-05  0:41                                 ` NeilBrown
2016-12-05 21:37                                   ` Marc Smith

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=87shq8743j.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=marc.smith@mcc.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).