Re: [PATCH 13/47] libext2fs: add a way to check the theoretical maximum extent tree depth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 13, 2014 at 07:11:11PM -0800, Darrick J. Wong wrote:
> > But if you look at the above code, there is nothing which is inode or
> > handle specific.  The value is only dependent on fs->blocksize.  But
> > to calculate this value the function calls ul_log2 three times, which
> > is implemented using a looping construct.  So we will be recalculating
> > what is effectively a constant value every single inode in an ext4
> > file system, which seems very unfortunate.
> 
> How about I save the last fs->blocksize and the last result, and return the
> cached last result if fs->blocksize == lastblocksize?

That sounds like a plan.  BTW, it looks like I had accidentally
included this in the next branch, but adding a cache won't disturb the
API, so that's fine.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux