All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Kwolek, Adam" <adam.kwolek@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
	"Neubauer, Wojciech" <Wojciech.Neubauer@intel.com>
Subject: Re: [PATCH 2/9] FIX: Cannot add spare to monitored container
Date: Thu, 13 Jan 2011 14:07:29 +1100	[thread overview]
Message-ID: <20110113140729.141ff645@notabene.brown> (raw)
In-Reply-To: <905EDD02F158D948B186911EB64DB3D176E1ADE0@irsmsx503.ger.corp.intel.com>

On Wed, 12 Jan 2011 15:57:45 +0000 "Kwolek, Adam" <adam.kwolek@intel.com>
wrote:

> > -----Original Message-----
> > From: NeilBrown [mailto:neilb@suse.de]
> > Sent: Wednesday, January 12, 2011 6:43 AM
> > To: Kwolek, Adam
> > Cc: linux-raid@vger.kernel.org; Williams, Dan J; Ciechanowski, Ed;
> > Neubauer, Wojciech
> > Subject: Re: [PATCH 2/9] FIX: Cannot add spare to monitored container
> > 
> > On Tue, 11 Jan 2011 15:04:03 +0100 Adam Kwolek <adam.kwolek@intel.com>
> > wrote:
> > 
> > > This fix rolls backs some changes introduced by patch:
> > > 	"Add spares to raid0 in mdadm"
> > >
> > > Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> > 
> > It would help a lot if you explained *why* you were rolling back these
> > changes.
> > 
> > Not applied.
> > 
> > NeilBrown
> 
> 
> I cannot add spare to i.e. raid5 array. In my unit tests, I'm creating raid5 array and then I'm adding spares for expansion (mdadm --add).
> If I've create container with more disks than create array that is using fewer disks, I can test expansion.
> Spares can be added to raid0 with no monitor usage without problems.
> I've started to observe this problem when patch for adding spares to raid0 was applied.
> I've identify code change that makes problem. This causes this code rollback. 
> 
> Problem that is visible is  that. Monitor cannot write major:minor to new_dev in sysfs /without code roll back/.
> I didn't dig this problem deeply. This patch is rather reminder to signalize problem /and not forget about it/.
> 

Fair enough.
Having a patch which works around a problem and reminds you to fix it later
is a good idea.  However you should make sure that the notes at the top of
the patch make it clear that is the purpose of the patch  - especially when
you post it to me.
It is just SO important to include completed details in the notes at the top
of the patch!!!!

NeilBrown


> BR
> Adam
> 
> > 
> > > ---
> > >
> > >  Manage.c |    8 ++++----
> > >  1 files changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/Manage.c b/Manage.c
> > > index 4e6afb5..fa1b13f 100644
> > > --- a/Manage.c
> > > +++ b/Manage.c
> > > @@ -800,16 +800,16 @@ int Manage_subdevs(char *devname, int fd,
> > >  				if (dv->writemostly == 1)
> > >  					disc.state |= 1 << MD_DISK_WRITEMOSTLY;
> > >  				dfd = dev_open(dv->devname, O_RDWR |
> > O_EXCL|O_DIRECT);
> > > -				if (tst->ss->external &&
> > > -				    mdmon_running(tst->container_dev))
> > > -					tst->update_tail = &tst->updates;
> > >  				if (tst->ss->add_to_super(tst, &disc, dfd,
> > >  							  dv->devname)) {
> > >  					close(dfd);
> > >  					return 1;
> > >  				}
> > >  				/* write_init_super will close 'dfd' */
> > > -				if (tst->ss->write_init_super(tst))
> > > +				if (tst->ss->external)
> > > +					/* mdmon will write the metadata */
> > > +					close(dfd);
> > > +				else if (tst->ss->write_init_super(tst))
> > >  					return 1;
> > >  			} else if (dv->re_add) {
> > >  				/*  this had better be raid1.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2011-01-13  3:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 14:03 [PATCH 0/9] OLCE for external meta (cont.) Adam Kwolek
2011-01-11 14:03 ` [PATCH 1/9] imsm: FIX: set correct slot information in metadata (raid0) Adam Kwolek
2011-01-11 14:04 ` [PATCH 2/9] FIX: Cannot add spare to monitored container Adam Kwolek
2011-01-12  5:43   ` NeilBrown
2011-01-12 15:57     ` Kwolek, Adam
2011-01-13  3:07       ` NeilBrown [this message]
2011-01-13 15:15         ` Czarnowska, Anna
2011-01-11 14:04 ` [PATCH 3/9] imsm:FIX: one spare can be added to raid0 only Adam Kwolek
2011-01-12  5:44   ` NeilBrown
2011-01-12 15:15     ` Kwolek, Adam
2011-01-11 14:04 ` [PATCH 4/9] imsm: FIX: only one spare is passed in update Adam Kwolek
2011-01-12  5:46   ` NeilBrown
2011-01-11 14:04 ` [PATCH 5/9] imsm: Update metadata for second array Adam Kwolek
2011-01-12  5:48   ` NeilBrown
2011-01-11 14:04 ` [PATCH 6/9] imsm: FIX: container content gathering is not needed for size set Adam Kwolek
2011-01-12  5:52   ` NeilBrown
2011-01-12 15:30     ` Kwolek, Adam
2011-01-13  3:04       ` NeilBrown
2011-01-11 14:04 ` [PATCH 7/9] imsm: FIX: monitor should initialize 2nd reshape only Adam Kwolek
2011-01-12  5:57   ` NeilBrown
2011-01-11 14:04 ` [PATCH 8/9] FIX: container has to be frozen during reshape Adam Kwolek
2011-01-11 14:04 ` [PATCH 9/9] imsm: Proceed with second array reshape only for frozen container Adam Kwolek
2011-01-11 15:23 ` [PATCH 0/4] RAID 0 to/from RAID5 migration Labun, Marcin

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=20110113140729.141ff645@notabene.brown \
    --to=neilb@suse.de \
    --cc=Wojciech.Neubauer@intel.com \
    --cc=adam.kwolek@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@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 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.