Whamcloud - gitweb
e2fsck: optimize pass 5 for CPU utilization
authorTheodore Ts'o <tytso@mit.edu>
Sun, 25 Nov 2012 00:17:44 +0000 (19:17 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 29 Nov 2012 00:01:51 +0000 (19:01 -0500)
commit53e3120c18c0cb88bc757a7800872a6ca794f163
tree8236939c8c01e3a6037ac4b17cb90f954908c542
parentb65ccfc7a4e36d152c8ab8af57da783eca965a4c
e2fsck: optimize pass 5 for CPU utilization

Add a fast path optimization in e2fsck's pass 5 for the common case
where the block bitmap is correct.  The optimization works by
extracting each block group's block allocation bitmap into a memory
buffer, and comparing it with the expected allocation bitmap using
memcmp().  If it matches, then we can just update the free block
counts and be on our way, and skip checking each bit individually.

Addresses-Google-Bug: #7534813

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
e2fsck/pass5.c