[Ocfs2-tools-devel] [PATCH 2/5] Add "list-sparse" option in
tunefs.ocfs2, take 2
Mark Fasheh
mark.fasheh at oracle.com
Tue Oct 30 23:16:05 PDT 2007
On Wed, Oct 31, 2007 at 02:07:23PM +0800, tao.ma wrote:
>>> Does it really happen? Even if it happens, I think clusters - v_cluster
>>> really works since clusters come out of i_size and i_size should exists
>>> in the last allocated clusters, otherwise, the file is corrupted.
>>> But you are somewhat right. The comment is a little confusing that lead
>>> to that situation. ;)
>>> so I will modify it as you suggested below.
>>>
>>
>> I was mostly thinking of the code below that which added num_clusters to
>> v_cluster to get the next lookup. In that case, we'd do multiple lookups
>> in
>> the same extent, which is more of an efficiency problem than anything
>> else.
>>
> Sorry, but I don't know clearly about what you said. In which situation do
> you think we will do multiple lookups in the same extents.
> You mean a very large file which have allocated clusters and v_cluster +
> num_clusters > UINT32_MAX?
Yeah, that's the case I was worried about. You have a file, whose last
extent is the largest it could ever get. The conditional would catch, and
we'd shrink num_clusters and then increment v_clusters by a smaller amount
below... However, I just realized that it might not make a difference at all
- in theory, 'clusters' there for such a file should already be UINT32_MAX
in which case num_clusters would just be re-set to the same value. It's
getting late over here, my math abilities are getting worse by the minute ;)
Still though, I think it'd be easier to read if we just flag that whole part
in !p_clusters.
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh at oracle.com
More information about the Ocfs2-tools-devel
mailing list