debugfs Question

Andreas Dilger adilger at clusterfs.com
Tue Apr 24 19:12:55 UTC 2007


On Apr 19, 2007  23:19 -0700, Aravindan Raghuveer wrote:
> My goal is to be able to read files on a ext3
> filesystem through the scsi generic (sg) driver. 
> I first use debugfs to extract the block addresses for
> every file. I then multiply the block address by 8
> [4K/ 512] to obtain the LBAs. I then use a progam
> sg_dd in the sg toolkit to read the data stored in the
> LBA obtained above. 

This is completely unsafe.  There is no reason why the data on disk
matches what is in memory due to many layers of indirection (RAM,
buffer cache, journal, etc).

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.




More information about the Ext3-users mailing list