cvs commit: src/sys/geom/bde g_bde_crypt.c

Poul-Henning Kamp phk at FreeBSD.org
Tue Apr 29 12:46:44 PDT 2003


phk         2003/04/29 12:46:42 PDT

  FreeBSD src repository

  Modified files:
    sys/geom/bde         g_bde_crypt.c 
  Log:
  Fix an obscure fencepost error in GBDE's sector mapping code:
  
  For certain combinations of sectorsize, mediasize and random numbers
  (used to define the mapping), a multisector read or write would ignore
  some subset of the sectors past the first sector in the request because
  those sectors would be mapped past the end of the parent device, and
  normal "end of media" truncation would zap that part of the request.
  
  Rev 1.19+1.20 of g_bde_work.c added the check which should have alerted
  me to this happening.  This commit maps the request correctly and
  adds KASSERTS to make sure things stay inside the parent device.
  
  This does not change the on-disk layout of GBDE, there is no need to
  backup/restore.
  
  Revision  Changes    Path
  1.14      +26 -0     src/sys/geom/bde/g_bde_crypt.c


More information about the cvs-src mailing list