Thanks for your patch, it worked well as far as I can see.
Only a minor issue during compilation, EIO was not declared/included.


Dave Kleikamp wrote:
> On Sun, 2005-11-27 at 01:05 +0100, Christoph Beckmeyer wrote:
>   
>> I have a volume which was rendered unmountable after a crash.
>> When I run jfs_fsck it seems to run forever, occupying 99 percent of the
>> cpu and under verbose output gives the notice
>> "Cannot read Directory Index page".
>> I'd like to know if fsck is actually doing something useful, or just got
>> stuck, because i see no disk io.
>>
>> I tried to trace the problem down a bit:  fsck is doing
>> fscktree.c:350:int xTree_binsrch_page(...)  , and executes the while loop.
>> The conditionals inside the loop seem(i have not tested in depth) to
>> bring execution always to line 405. I have added a typescript of
>> jfs_fsck's runtime.
>>
>> I would be thankful for any hints and please let me know if the
>> information I passed is insufficient.
>> What is the probability that my volume can be restored?
>>     
>
> Thanks for doing the dirty work and tracking down where it's hanging.  I
> believe xTree_search may be called against an empty xtree.
>
> Can you rebuild jfsutils with this patch and try again?
>
> Index: fsck/fsckxtre.c
> ===================================================================
> RCS file: /cvsroot/jfs/jfsutils/fsck/fsckxtre.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 fsckxtre.c
> --- fsck/fsckxtre.c   22 Nov 2005 20:43:54 -0000      1.16
> +++ fsck/fsckxtre.c   29 Nov 2005 19:46:41 -0000
> @@ -361,6 +361,9 @@ int xTree_binsrch_page(xtpage_t * xtpg_p
>       highidx = xtpg_ptr->header.nextindex - 1;
>       *xad_selected = 0;
>  
> +     if (lowidx > highidx)
> +             return -EIO;
> +
>       while ((!(*xad_selected)) && (xbp_rc == FSCK_OK)) {
>  
>               if ((highidx == lowidx) || ((highidx - lowidx) == 1)) {
>
>   




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to