DragonFly BSD
DragonFly commits List (threaded) for 2010-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: HAMMER VFS - Fix over-enthusiastic cluster read


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Aug 2010 08:26:01 -0700 (PDT)

commit 06b113947ac0a810bbb3d53ea14cc0dfe7ce40bb
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sun Aug 15 08:14:53 2010 -0700

    HAMMER VFS - Fix over-enthusiastic cluster read
    
    * The block device I/O was over-enthusiastic in calling cluster_read()
      and could wind up creating the buffers of the wrong size which
      would then overlap the address space later buffer requests for the
      right size.
    
      This could result in the corruption of large-data (64K) blocks,
      usually causing a hammer reblock to fail with a CRC error but
      not corrupting the actual filesystem on-media.
    
      Meta data could not usually get corrupted by this unless the
      cluster-read happened to cross a large-block (8MB) boundary.
    
    * Particularly easy to reproduce with the dm_crypt module due to
      crypt overheads.
    
    * Fixed by disallowing read-aheads in the large-data zone (the only
      zone which can contain a mix of 16K and 64K blocks), and ensuring
      that any other cluster_read does not cross a large-block boundary.

Summary of changes:
 sys/vfs/hammer/hammer_io.c |   50 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/06b113947ac0a810bbb3d53ea14cc0dfe7ce40bb


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]