X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C898F3.5067EBE0@onstor-exch02.onstor.net>; Mon, 7 Apr 2008 14:06:57 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: PERFORCE change 28718 for review
Date: Mon, 7 Apr 2008 14:06:57 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E05DA1D1A@onstor-exch02.onstor.net>
In-Reply-To: <20080407140236.1a06e52d@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: PERFORCE change 28718 for review
Thread-Index: AciY8rUE4kT2IgnrQDyFSUkVSSxErwAAF/6Q
From: "Henry Lau" <henry.lau@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>
Cc: "Jobi Ariyamannil" <jobi.ariyamannil@onstor.com>

Hi Andy,

Please see below.

Thanks,
Henry

-----Original Message-----
From: Andy Sharp=20
Sent: Monday, April 07, 2008 2:03 PM
To: Henry Lau
Cc: Jobi Ariyamannil
Subject: Re: PERFORCE change 28718 for review

In your change, quite a few lines are modified, but with no behavioral
changes to routine at all.=20
>> Alignment changes.

 On top of that you changed 'done' to be a
byte wide, instead of an integer, for no apparent reason, but
with the result that it is slowing the whole routine down.
>> Not sure how it can slow the whole routine.

If you're getting segfaults, you're the only one.  Most likely you are
not running the code you think you are.
>> Running from the top of the tree with latest dev built.


On Mon, 7 Apr 2008 13:54:00 -0700 "Henry Lau" <henry.lau@onstor.com>
wrote:

> HI Andy,
>=20
> I hit this all the times in Bobcat, check the crash below. I need to
> understand what wrong with the changes.
>=20
> 1 #0  0x50ac9b78 in mkpath (path=3D0x50ac2d88 "/mnt1", mode=3D493,
> dir_mode=3D493)
>   2     at fs.c:637
>   3     fs.c:637: No such file or directory.
>   4     (gdb) dir /mnt/ssc-genlib
>   5     Source directories searched: /mnt/ssc-genlib:$cdir:$cwd
>   6 632         while (!done) {
>   7     633             slash +=3D strspn(slash, "/");
>   8     634             slash +=3D strcspn(slash, "/");
>   9     635
>  10     636             done =3D (*slash =3D=3D '\0');
>  11     637             *slash =3D '\0';
>  12     638
>  13     639             if (stat(path, &sb)) {
>  14     640                 if (errno !=3D ENOENT ||
>  15     641                     (mkdir(path, done ? mode : dir_mode)
> && 16 (gdb) bt
>  17 #0  0x50ac9b78 in mkpath (path=3D0x50ac2d88 "/mnt1", mode=3D493,
> dir_mode=3D493)
>  18             at fs.c:637
>  19 #1  0x50ac9d98 in mkpath1 (path=3D0x50ac2d88 "/mnt1", mode=3D493) =
at
> fs.c:667
>  20 #2  0x50ac93d8 in modify_readonly_file (path=3D0x50ac2d88 "/mnt1",
>  21                 vfun=3D0x50ac9d30, arg=3D0x1ed) at fs.c:465
>  22 #3  0x50ac9e6c in ensure_dir_exists (path=3D0x50ac2d88 "/mnt1",
> mode=3D493)
>  23                     at fs.c:689
>  24 #4  0x50ae4fec in make_secondary_fstabs (verbose=3D1) at
> fs-vector.c:91
>  25 #5  0x5023cd3c in copy_to_secondary (
>  26                         files=3D0x500dd000 ".cshrc .profile
> 4.4BSD.dist
>  27                         altroot bin bsd dev etc home mnt root sbin
> txrx_bc
>  28                         .bin fp_bc.bin fc_bc.bin stand tmp usr
> onstor var
>  29                         version", tar_only=3D1 '\001') at
> cmd_flash.c:536
>  30 #6  0x5023d268 in do_copy_all (argc=3D0, argv=3D0x7ffff468) at
> cmd_flash.c:632
>  31 #7  0x501d7f84 in system_copy_all (self=3D0x50268998,
> vty=3D0x10047200, argc=3D0,
>  32                             argv=3D0x7ffff468) at =
cmd_system.c:2411
>  33 #8  0x5021ea70 in cmd_execute_command (vline=3D0x100e5080,
> vty=3D0x10047200,
>  34                                 cmd=3D0x7ffff530) at =
command.c:1912
>  35
>=20
> -----Original Message-----
> From: Andy Sharp=20
> Sent: Monday, April 07, 2008 1:49 PM
> To: Henry Lau
> Cc: Jobi Ariyamannil
> Subject: Re: PERFORCE change 28718 for review
>=20
> On 7 Apr 2008 13:25:01 -0700 henryl <henry.lau@onstor.com> wrote:
>=20
> > Change 28718 by henryl@henryl-linux on 2008/04/07 13:20:37
> >=20
> > 	   Fixed segmentation fault like system copy all.
> > 	   In mkpath(), do not add any char to the string after
> > strcspn() once it reaches the end, ie done is set to TRUE. Reviewed
> > by Jobia.
> >=20
> > Affected files ...
> >=20
> > ... //depot/dev/nfx-tree/code/ssc-genlib/fs.c#9 edit
>=20
> This change is quite broken, please revert it.  And please send the
> review to the right person in the future?
>=20
> Thanks,
>=20
> a
>=20
