* RAID0 - unitialised zone->dev_start for zone[0] @ 2009-05-13 17:08 SandeepKsinha 2009-05-13 21:11 ` NeilBrown 0 siblings, 1 reply; 6+ messages in thread From: SandeepKsinha @ 2009-05-13 17:08 UTC (permalink / raw) To: Linux RAID Hi Neil, [22:33:46 sinhas]$ diff raid0.c raid0.c.orig 160d159 < zone->dev_start = 0; [/usr/src/linux-2.6.29/drivers/md] [22:33:59 sinhas]$ I see this piece of code missing and being used later. Not very sure of the code flow, but still as part of defensive programming. Am i missing something? -- Regards, Sandeep. “To learn is to change. Education is a process that changes the learner.” -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAID0 - unitialised zone->dev_start for zone[0] 2009-05-13 17:08 RAID0 - unitialised zone->dev_start for zone[0] SandeepKsinha @ 2009-05-13 21:11 ` NeilBrown 2009-05-14 3:14 ` SandeepKsinha 2009-05-18 14:45 ` Bill Davidsen 0 siblings, 2 replies; 6+ messages in thread From: NeilBrown @ 2009-05-13 21:11 UTC (permalink / raw) To: SandeepKsinha; +Cc: Linux RAID On Thu, May 14, 2009 3:08 am, SandeepKsinha wrote: > Hi Neil, > > > [22:33:46 sinhas]$ diff raid0.c raid0.c.orig Always, always, always use "diff -u". It provides context so the diff is much easier to read. > 160d159 > < zone->dev_start = 0; > [/usr/src/linux-2.6.29/drivers/md] > [22:33:59 sinhas]$ > > I see this piece of code missing and being used later. > Not very sure of the code flow, but still as part of defensive > programming. > > Am i missing something? conf->strip_zone is allocated with kzalloc, so all values are initialised to 0. NeilBrown > > > > -- > Regards, > Sandeep. > > > > > > > To learn is to change. Education is a process that changes the learner. > -- > 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 > -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAID0 - unitialised zone->dev_start for zone[0] 2009-05-13 21:11 ` NeilBrown @ 2009-05-14 3:14 ` SandeepKsinha 2009-05-14 4:24 ` NeilBrown 2009-05-18 14:45 ` Bill Davidsen 1 sibling, 1 reply; 6+ messages in thread From: SandeepKsinha @ 2009-05-14 3:14 UTC (permalink / raw) To: NeilBrown; +Cc: Linux RAID On Thu, May 14, 2009 at 2:41 AM, NeilBrown <neilb@suse.de> wrote: > On Thu, May 14, 2009 3:08 am, SandeepKsinha wrote: >> Hi Neil, >> >> >> [22:33:46 sinhas]$ diff raid0.c raid0.c.orig > > Always, always, always use "diff -u". It provides context > so the diff is much easier to read. > >> 160d159 >> < zone->dev_start = 0; >> [/usr/src/linux-2.6.29/drivers/md] >> [22:33:59 sinhas]$ >> >> I see this piece of code missing and being used later. >> Not very sure of the code flow, but still as part of defensive >> programming. >> >> Am i missing something? > > conf->strip_zone is allocated with kzalloc, so all values are > initialised to 0. > zone->zone_start = 0; Sorry, this confused me. > NeilBrown > > >> >> >> >> -- >> Regards, >> Sandeep. >> >> >> >> >> >> >> “To learn is to change. Education is a process that changes the learner.” >> -- >> 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 >> > > -- Regards, Sandeep. “To learn is to change. Education is a process that changes the learner.” -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAID0 - unitialised zone->dev_start for zone[0] 2009-05-14 3:14 ` SandeepKsinha @ 2009-05-14 4:24 ` NeilBrown 2009-05-14 5:46 ` SandeepKsinha 0 siblings, 1 reply; 6+ messages in thread From: NeilBrown @ 2009-05-14 4:24 UTC (permalink / raw) To: SandeepKsinha; +Cc: Linux RAID On Thu, May 14, 2009 1:14 pm, SandeepKsinha wrote: > On Thu, May 14, 2009 at 2:41 AM, NeilBrown <neilb@suse.de> wrote: >> On Thu, May 14, 2009 3:08 am, SandeepKsinha wrote: >>> Hi Neil, >>> >>> >>> [22:33:46 sinhas]$ diff raid0.c raid0.c.orig >> >> Always, always, always use "diff -u". It provides context >> so the diff is much easier to read. >> >>> 160d159 >>> < zone->dev_start = 0; >>> [/usr/src/linux-2.6.29/drivers/md] >>> [22:33:59 sinhas]$ >>> >>> I see this piece of code missing and being used later. >>> Not very sure of the code flow, but still as part of defensive >>> programming. >>> >>> Am i missing something? >> >> conf->strip_zone is allocated with kzalloc, so all values are >> initialised to 0. >> > > zone->zone_start = 0; > > Sorry, this confused me. Are you saying that you think this code is unnecessary? Yes, you are right. It is indeed inconsistent to set zone_start to zero but not to set dev_start to zero. It is the sort of thing that is probably worth fixing (I'd be inclined to set them both, it makes the code clearer) if you are making other changes to code in that area, but probably isn't worth fixing just by itself. NeilBrown -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAID0 - unitialised zone->dev_start for zone[0] 2009-05-14 4:24 ` NeilBrown @ 2009-05-14 5:46 ` SandeepKsinha 0 siblings, 0 replies; 6+ messages in thread From: SandeepKsinha @ 2009-05-14 5:46 UTC (permalink / raw) To: NeilBrown; +Cc: Linux RAID On Thu, May 14, 2009 at 9:54 AM, NeilBrown <neilb@suse.de> wrote: > On Thu, May 14, 2009 1:14 pm, SandeepKsinha wrote: >> On Thu, May 14, 2009 at 2:41 AM, NeilBrown <neilb@suse.de> wrote: >>> On Thu, May 14, 2009 3:08 am, SandeepKsinha wrote: >>>> Hi Neil, >>>> >>>> >>>> [22:33:46 sinhas]$ diff raid0.c raid0.c.orig >>> >>> Always, always, always use "diff -u". It provides context >>> so the diff is much easier to read. >>> >>>> 160d159 >>>> < zone->dev_start = 0; >>>> [/usr/src/linux-2.6.29/drivers/md] >>>> [22:33:59 sinhas]$ >>>> >>>> I see this piece of code missing and being used later. >>>> Not very sure of the code flow, but still as part of defensive >>>> programming. >>>> >>>> Am i missing something? >>> >>> conf->strip_zone is allocated with kzalloc, so all values are >>> initialised to 0. >>> >> >> zone->zone_start = 0; >> >> Sorry, this confused me. > > Are you saying that you think this code is unnecessary? > Yes, you are right. > Exactly. > It is indeed inconsistent to set zone_start to zero but not to > set dev_start to zero. It is the sort of thing that is probably > worth fixing (I'd be inclined to set them both, it makes the code > clearer) if you are making other changes to code in that area, > but probably isn't worth fixing just by itself. > Even I felt that its inconistent. But felt a bit aggressive to report so. Yes, I am looking forward to some changes but may be after the recent patches go through, its otherwise difficult to sync. > NeilBrown > > > -- Regards, Sandeep. “To learn is to change. Education is a process that changes the learner.” -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RAID0 - unitialised zone->dev_start for zone[0] 2009-05-13 21:11 ` NeilBrown 2009-05-14 3:14 ` SandeepKsinha @ 2009-05-18 14:45 ` Bill Davidsen 1 sibling, 0 replies; 6+ messages in thread From: Bill Davidsen @ 2009-05-18 14:45 UTC (permalink / raw) To: NeilBrown; +Cc: SandeepKsinha, Linux RAID NeilBrown wrote: > On Thu, May 14, 2009 3:08 am, SandeepKsinha wrote: > >> Hi Neil, >> >> >> [22:33:46 sinhas]$ diff raid0.c raid0.c.orig >> > > Always, always, always use "diff -u". It provides context > so the diff is much easier to read. > > >> 160d159 >> < zone->dev_start = 0; >> [/usr/src/linux-2.6.29/drivers/md] >> [22:33:59 sinhas]$ >> >> I see this piece of code missing and being used later. >> Not very sure of the code flow, but still as part of defensive >> programming. >> >> Am i missing something? >> > > conf->strip_zone is allocated with kzalloc, so all values are > initialised to 0. > To prevent future unnecessary analysis of this section, perhaps a comment instead of code would be appropriate? -- bill davidsen <davidsen@tmr.com> CTO TMR Associates, Inc "You are disgraced professional losers. And by the way, give us our money back." - Representative Earl Pomeroy, Democrat of North Dakota on the A.I.G. executives who were paid bonuses after a federal bailout. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-18 14:45 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-05-13 17:08 RAID0 - unitialised zone->dev_start for zone[0] SandeepKsinha 2009-05-13 21:11 ` NeilBrown 2009-05-14 3:14 ` SandeepKsinha 2009-05-14 4:24 ` NeilBrown 2009-05-14 5:46 ` SandeepKsinha 2009-05-18 14:45 ` Bill Davidsen
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).