On 5/28/15 1:25 PM, Theodore Ts'o wrote:
> On Wed, May 27, 2015 at 08:32:23PM -0500, Eric Sandeen wrote:
>>
>>> +errout:
>>> +    chdir("..");
>>
>> This seems unrelated, no?
> 
> This is needed to so that we leave doproc with the same CWD that we
> entered with.  At the beginning of the doproc, we do the eqvuialent of
> 
>       mkdir -p pN
>       cd pN
> 
> (where N is 0, 1, 2, 3, ..)
> 
> previously doproc was only executed once, so it didn't matter what the
> CWD was when we were doing with doproc().  But since with this patch
> we are now calling doproc in the loop, the chdir("..") is required or
> each successive loop will result in a new p0 directory being created,
> and then at the end of the run, the files will be in
> 
> .../p0/p0/p0/p0/p0/p0/p0/p0/p0/...

Oh, right.  I'm sorry, inferred too much from the patch, w/o reading the
context around the context.

-Eric

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to