Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@telent
Created August 30, 2022 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save telent/cfb12a4ec4545a5370e841166c3c2cc8 to your computer and use it in GitHub Desktop.
Save telent/cfb12a4ec4545a5370e841166c3c2cc8 to your computer and use it in GitHub Desktop.
block->blocknum = blocknum;
err = bio_read(cache->dev, block->ptr, (off_t)blocknum * cache->block_size, cache->block_size );
if(block->ptr == (void *)0x8f76c0e4) {
char * p = ((char *)block->ptr);
thread_sleep(1);
while((p < (char *) 0x8f76d0e4) && (*p != 0x99))
p++;
p-=4;
dprintf(SPEW, "%x: %x %x %x %x %x %x %x %x %d %d\n",
p,
p[0], p[1], p[2], p[3],
p[4], p[5], p[6], p[7],
cache->block_size, err);
}
if (err < 0) {
/* free the block, return an error */
list_add_tail(&cache->free_list, &block->node);
return NULL;
}
if (err < 4096) {
dprintf(SPEW, "short read %d at %d\n", err, blocknum);
}
@telent
Copy link
Author

telent commented Aug 30, 2022

[1190] 8f76d0bc: 0 0 0 0 99 99 99 99 4096 4096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment