Re: [PATCH V7 03/23] ext4: Add the basic function for inline data support.

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

 



On 12/03/2012 09:48 AM, Theodore Ts'o wrote:
> On Wed, Oct 24, 2012 at 10:55:18AM +0800, Tao Ma wrote:
>> +	EXT4_STATE_MAY_INLINE_DATA,	/* may have in-inode data */
> 
> Can you write a paragraph or two about exactly what the semantics are
> of this state flag --- what it means, when it should be set, and when
> it should be cleared, etc.?
> 
> I'm not entirely sure I understand why you test
> EXT4_STATE_MAY_INLINE_DATA versus simply calling
> ext4_has_inline_data() in various places.
OK, so in general, EXT4_STATE_MAY_INLINE_DATA is a flag that show that
the file has a potential to be inlined, but there is no guarantee it is
inlined.

So when the inode is created and the volume has inline-data support,
this flag is set. And when the write_begin comes, we have no idea
whether it is OK or not to create an inline file, so if this flag is
set, we just try to call the inline-data stuff to see whether it works.
If it succeeds, that is cool. But if not, this flag is cleared and we
will not trap to inline-data stuff for the future write_begin. The
reason why ext4_has_inline_data() doesn't work here is that a new file
has no inline data but has the potential to be inlined.

Thanks
Tao
--
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