Re: [zfs-discuss] Algorithm of block size estimation

2010-09-02 Thread Zhu Han
Thank you! Here is my understanding, leave it here as reference for others. If it's not correct, please point it out. ZFS estimates the size of block only when the file only has single block and it is extended. This is because dmu_object_set_blocksize() only set the block size when the object co

Re: [zfs-discuss] Algorithm of block size estimation

2010-09-02 Thread Darren J Moffat
On 02/09/2010 11:18, Zhu Han wrote: Can anybody help me give the link on the code snippet of block size estimation? See the zfs_write() function. -- Darren J Moffat ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/

[zfs-discuss] Algorithm of block size estimation

2010-09-02 Thread Zhu Han
Hi, Can anybody help me give the link on the code snippet of block size estimation? I want to know when ZFS makes a decision on the block size used for a file. Does ZFS estimate it based on the length of file when the create event of file is committed to disk during txg commit? If so, is the bl