linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared
@ 2012-12-10 22:02 kbuild test robot
  2012-12-11  2:25 ` Tao Ma
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2012-12-10 22:02 UTC (permalink / raw)
  To: Tao Ma; +Cc: linux-ext4, Theodore Ts'o

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head:   9a4c8019471386c6fb039ae9e30f5216b6b55a9e
commit: 67cf5b09a46f72e048501b84996f2f77bc42e947 [37/63] ext4: add the basic function for inline data support
config: make ARCH=sparc allyesconfig

All error/warnings:

fs/ext4/inline.c: In function 'ext4_create_inline_data':
fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared (first use in this function)
fs/ext4/inline.c:268:19: note: each undeclared identifier is reported only once for each function it appears in
fs/ext4/inline.c: At top level:
fs/ext4/inline.c:164:12: warning: 'ext4_read_inline_data' defined but not used [-Wunused-function]

vim +268 +/empty_zero_page fs/ext4/inline.c

67cf5b09 Tao Ma 2012-12-10  262  
67cf5b09 Tao Ma 2012-12-10  263  	error = ext4_journal_get_write_access(handle, is.iloc.bh);
67cf5b09 Tao Ma 2012-12-10  264  	if (error)
67cf5b09 Tao Ma 2012-12-10  265  		goto out;
67cf5b09 Tao Ma 2012-12-10  266  
67cf5b09 Tao Ma 2012-12-10  267  	if (len > EXT4_MIN_INLINE_DATA_SIZE) {
67cf5b09 Tao Ma 2012-12-10 @268  		value = (void *)empty_zero_page;
67cf5b09 Tao Ma 2012-12-10  269  		len -= EXT4_MIN_INLINE_DATA_SIZE;
67cf5b09 Tao Ma 2012-12-10  270  	} else {
67cf5b09 Tao Ma 2012-12-10  271  		value = "";

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared
  2012-12-10 22:02 [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared kbuild test robot
@ 2012-12-11  2:25 ` Tao Ma
  2012-12-11  5:12   ` Theodore Ts'o
  0 siblings, 1 reply; 4+ messages in thread
From: Tao Ma @ 2012-12-11  2:25 UTC (permalink / raw)
  To: kbuild test robot; +Cc: Tao Ma, linux-ext4, Theodore Ts'o

On 12/11/2012 06:02 AM, kbuild test robot wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
> head:   9a4c8019471386c6fb039ae9e30f5216b6b55a9e
> commit: 67cf5b09a46f72e048501b84996f2f77bc42e947 [37/63] ext4: add the basic function for inline data support
> config: make ARCH=sparc allyesconfig
> 
> All error/warnings:
> 
> fs/ext4/inline.c: In function 'ext4_create_inline_data':
> fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared (first use in this function)
> fs/ext4/inline.c:268:19: note: each undeclared identifier is reported only once for each function it appears in
> fs/ext4/inline.c: At top level:
> fs/ext4/inline.c:164:12: warning: 'ext4_read_inline_data' defined but not used [-Wunused-function]
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. :(

Thanks
Tao
> 
> vim +268 +/empty_zero_page fs/ext4/inline.c
> 
> 67cf5b09 Tao Ma 2012-12-10  262  
> 67cf5b09 Tao Ma 2012-12-10  263  	error = ext4_journal_get_write_access(handle, is.iloc.bh);
> 67cf5b09 Tao Ma 2012-12-10  264  	if (error)
> 67cf5b09 Tao Ma 2012-12-10  265  		goto out;
> 67cf5b09 Tao Ma 2012-12-10  266  
> 67cf5b09 Tao Ma 2012-12-10  267  	if (len > EXT4_MIN_INLINE_DATA_SIZE) {
> 67cf5b09 Tao Ma 2012-12-10 @268  		value = (void *)empty_zero_page;
> 67cf5b09 Tao Ma 2012-12-10  269  		len -= EXT4_MIN_INLINE_DATA_SIZE;
> 67cf5b09 Tao Ma 2012-12-10  270  	} else {
> 67cf5b09 Tao Ma 2012-12-10  271  		value = "";
> 
> ---
> 0-DAY kernel build testing backend         Open Source Technology Center
> Fengguang Wu, Yuanhan Liu                              Intel Corporation
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared
  2012-12-11  2:25 ` Tao Ma
@ 2012-12-11  5:12   ` Theodore Ts'o
  2012-12-11  5:17     ` Tao Ma
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2012-12-11  5:12 UTC (permalink / raw)
  To: Tao Ma; +Cc: kbuild test robot, Tao Ma, linux-ext4

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.

     			    	   	    	- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared
  2012-12-11  5:12   ` Theodore Ts'o
@ 2012-12-11  5:17     ` Tao Ma
  0 siblings, 0 replies; 4+ messages in thread
From: Tao Ma @ 2012-12-11  5:17 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: kbuild test robot, Tao Ma, linux-ext4

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-11  5:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 22:02 [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared kbuild test robot
2012-12-11  2:25 ` Tao Ma
2012-12-11  5:12   ` Theodore Ts'o
2012-12-11  5:17     ` Tao Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).