Re: [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared

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

 



On 12/11/2012 01:12 PM, Theodore Ts'o wrote:
> On Tue, Dec 11, 2012 at 10:25:37AM +0800, Tao Ma wrote:
>> uh, in sparc, we don't have empty_zero_page? I just want to create an
>> inline data file without allocating a buffer with the specified length.
>> So maybe I have to do the kzalloc thing then. :(
> 
> Yeah, sparc64 apparently doesn't have empty_zero_page.  All
> architectures have ZERO_PAGE(0), which is what the DIO code uses, but
> you can't count on it being mapped.
> 
> What we could do instead is pass in a value of "(void *) -1", and then
> in ext4_xattr_set_entry(), if i->value is -1, use memset to zero out
> the value instead of memcpy.  This will be safe for all architectures,
> since we already use casts of negative values for ERR_PTR.
> 
> In fact, we could just use "i.value = ERR_PTR(-1)" and
> "IS_ERR_VALUE(i->value)", but it would be clearer to explicitly define
> EXT4_ZERO_XATTR_VALUE to be "((void *) -1)", and use that to indicate
> that ext4_xattr_set_entry() should zero out the page in question.
yeah, that should saves us a lot in case of inline data creation and
updating. I will change it. Thanks for the good advice.

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