All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Tao Ma <tm@tao.ma>
Cc: kbuild test robot <fengguang.wu@intel.com>,
	Tao Ma <boyu.mt@taobao.com>,
	linux-ext4@vger.kernel.org
Subject: Re: [ext4:dev 37/63] fs/ext4/inline.c:268:19: error: 'empty_zero_page' undeclared
Date: Tue, 11 Dec 2012 00:12:05 -0500	[thread overview]
Message-ID: <20121211051205.GA23653@thunk.org> (raw)
In-Reply-To: <50C699A1.10502@tao.ma>

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

  reply	other threads:[~2012-12-11  5:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-12-11  5:17     ` Tao Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121211051205.GA23653@thunk.org \
    --to=tytso@mit.edu \
    --cc=boyu.mt@taobao.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tm@tao.ma \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.