[Ocfs2-tools-devel] debugfs.ocfs2 bmap command

GONG Jie jie.gong at oracle.com
Mon Aug 28 01:44:45 PDT 2006


Hi,

On Monday 28 August 2006 15:45, tao.ma wrote:
> Hi,
>     I have seen the code. And write some comments.
>     Please Mark, Joel & Sunil rectify it if there is something wrong. :)

> >
> >+/*
> >+ * dump_logical_blkno()
> >+ *
> >+ */
> >+static errcode_t dump_logical_blkno(ocfs2_filesys *fs, struct
> > ocfs2_extent_list *el, +	uint64_t loglblkno, FILE *out)
>
> As far as I know, for a file's extent record, it is stored in numbers of
> cluster, not of block.  So rec->e_clusters is the size of clusters and
> you can't just use loglblkno -= rec->e_clusters. See
> ocfs2_clusters_to_blocks or ocfs2_blocks_to_clusters for how to transfer
> between them.
> So you may first find the start blkno of the cluster which your logical
> blkno belongs to and then add the offset of this blkno in that cluster
> for the real blkno.
>

I've fixed the cluster number to block number transfer error.

-- 
Regards,

GONG Jie (¹¨ò¡)
Linux Engineering, Emerging Technology & Solution Development
Oracle Software Research and Development Center
Tel:    +86-10-82786289
Mobile: +86-13011102030
Email:  jie.gong at oracle.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugfs-bmap.patch
Type: text/x-diff
Size: 3784 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20060828/98718075/debugfs-bmap.bin


More information about the Ocfs2-tools-devel mailing list