All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] Why do we read the blocks in __ocfs2_xxattr_set_value_outside()?
Date: Wed, 12 Aug 2009 09:40:41 +0800	[thread overview]
Message-ID: <4A821D99.8030102@oracle.com> (raw)
In-Reply-To: <20090811220915.GF28478@mail.oracle.com>



Joel Becker wrote:
> 	In __ocfs2_xattr_set_value_outside(), we walk each block of the
> xattr value and read it before we copy the new data on top and dirty it.
> Why are we reading the block from disk if we're just overwriting it?
> Would't "sb_getblk(); ocfs2_set_buffer_uptodate()" work better?
You made it. yeah, we can do like it.

I remembered that when I first try sb_getblk, I used 
ocfs2_set_new_buffer_uptodate and get a BUG_ON(sorry for it, at the time 
I wrote this piece of code, I don't know much about ocfs2 buffer cache :( ).

Regards,
Tao

      reply	other threads:[~2009-08-12  1:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 22:09 [Ocfs2-devel] Why do we read the blocks in __ocfs2_xxattr_set_value_outside()? Joel Becker
2009-08-12  1:40 ` 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=4A821D99.8030102@oracle.com \
    --to=tao.ma@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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.