All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tm@tao.ma>
To: Theodore Ts'o <tytso@mit.edu>
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 13:17:49 +0800	[thread overview]
Message-ID: <50C6C1FD.2020904@tao.ma> (raw)
In-Reply-To: <20121211051205.GA23653@thunk.org>

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

      reply	other threads:[~2012-12-11  5:17 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
2012-12-11  5:17     ` Tao Ma [this message]

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=50C6C1FD.2020904@tao.ma \
    --to=tm@tao.ma \
    --cc=boyu.mt@taobao.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.