#10850 NORM Future : zhashfs: use FIEMAP for detecting unused disk blocks

Zarro Boogs per Child bugtracker at laptop.org
Wed May 4 14:29:11 EDT 2011


#10850: zhashfs: use FIEMAP for detecting unused disk blocks
--------------------------+-------------------------------------------------
 Reporter:  dsd           |                 Owner:  dsd           
     Type:  enhancement   |                Status:  new           
 Priority:  normal        |             Milestone:  Future Release
Component:  build-system  |               Version:  not specified 
 Keywords:                |           Next_action:  code          
 Verified:  0             |   Deployment_affected:                
Blockedby:                |              Blocking:                
--------------------------+-------------------------------------------------
 Right now, olpc-os-builder sd_card_image module initialises the disk with
 a random fill pattern, that fill pattern is later passed onto zhashfs and
 zhashfs uses it for detecting unused areas of the disk, which are then not
 written into the resultant zd disk image.

 This works but introduces a tiny risk that one day we produce a fill
 pattern identical to a real data block, and means that the resultant disk
 image files which olpc-os-builder can optionally publish lose their
 sparseness.

 A better approach would be to revert back to creating the initial disk
 image file as 100% sparse, then zhashfs would use the FIEMAP ioctl to
 identify which parts of the disk are unused. This is not a good option for
 today as there is some controversy around FIEMAP (it was broken on ext4
 and xfs until very recently) but would be fine for the future.

-- 
Ticket URL: <http://dev.laptop.org/ticket/10850>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list