Show
Ignore:
Timestamp:
07/28/11 22:56:38 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1311893798 -0400
git-parent:

[9e093855ceddcd07647592f55ed557655b1cc24d]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1311893798 -0400
Message:

Looks like the dev_t is 4 bytes and the ino_t is 8 leaving
4 bytes of unaligned trash in the jlog_file_id. We were
correctly memsetting the enclosing structure on insertion
into the hash table, but not memsetting the key for lookups
causing a failure to fetch and a subsequent failure to
insert (duplicate). Boom. Nasty.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/jlog/jlog_io.c

    rcc981f5 re153d26  
    8282  if (stat(path, &sb) == 0) { 
    8383    if (!S_ISREG(sb.st_mode)) goto out; 
     84    memset(&id, 0, sizeof(id)); 
    8485    id.st_dev = sb.st_dev; 
    8586    id.st_ino = sb.st_ino;