Re: max file size for ext3

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

 



This is what i have now . But still i am not able to map the magic number

#include <stdio.h>
main()
{
	unsigned long long upper_limit;
	int meta_blocks;
	int bits = 12;

	/* total blocks in 512 bytes */
	upper_limit = (1LL << 32) -1;
	/* total blocks in file system block size */
	upper_limit >>= (bits - 9);


	/* indirect blocks */
	meta_blocks = 1;
	/* double indirect blocks */
	meta_blocks += 1 + (1LL << (bits-2));
	/* tripple indirect blocks */
	meta_blocks += 1 + (1LL << (bits-2)) + (1LL << (2*(bits-2)));

	upper_limit -= meta_blocks;
	upper_limit <<= bits;

	printf("expected %llx %llx\n",0x1ff7fffd000LL, upper_limit);
}

expected 1ff7fffd000 1feff7fc000
-
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