lkml.org 
[lkml]   [2001]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectAssistance in understanding this...?
I'm developing a driver that performs some 'formatting' of sorts on a scsi
block device as part of the initialization process. This involves
writting a long series of non-contiguous blocks to a disk device -
something akin to:

for(i =0; i < NUM_BLOCKS; i++) {
bh = getblk(i * offset_size);
memcpy(bh->b_data,&somestructure,sizeof(struct somestruct));
mark_buffer_dirty(bh);
ll_rw_block(bh, WRITE,1);
wait_on_buffer(bh);
brelse(bh);
}

the kernel here I should mention is stock 2.4.0

This all works fine it seems, except that after awhile the system becomes
very fragile and eventually panic's with a NULL pointer derefrence. This
presumeably occurs because of a resource shortage. Thing I'm not
understand is how doing the above even for a large value of NUM_BLOCKS
creates a resource shortage. I'm obviously missing something here....

This is typically triggered by running any external program, (ie. vi, top,
or gcc seem to work fine for this). and the only noticable thing is that
the memory allocated to buffers grows to be pretty much all memory except
for the last two megs - this seems normal? I can capture some of the
panic/dumps if anyone thinks they might be of interest.

Ideas?

t.

Tracy Camp
Product Development
Miralink Corp.PDX
Portland OR
503-223-3140

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.036 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site