All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Dongyang <lidongyang@novell.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: avoid direct write if we fall back to buffered
Date: Wed, 14 Apr 2010 15:42:31 +0800	[thread overview]
Message-ID: <201004141542.31733.lidongyang@novell.com> (raw)
In-Reply-To: <20100414015819.GE5530@mail.oracle.com>

On Wednesday 14 April 2010 09:58:19 Joel Becker wrote:
> On Thu, Apr 08, 2010 at 03:47:24PM +0800, Li Dongyang wrote:
> > when we fall back to buffered write from direct write, we call
> > __generic_file_aio_write but that will end up doing direct write
> > even we are only prepared to do buffered write because the file
> > has O_DIRECT flag set. This is a fix for
> > https://bugzilla.novell.com/show_bug.cgi?id=591039
> 
> 	We need to evaluate what __g_f_a_w() is doing and make sure
> we're matching it appropriately for ocfs2.
> 
Thanks for reviewing, that's just the two uncertain points to me with the patch.
> > +	ret = file_remove_suid(file);
> > +	if (ret)
> > +		goto out_dio;
> 
> 	NAK.  We do suid checks in ocfs2_prepare_inode_for_write().
> Calling file_remove_suid() is outside of ocfs2's locking.  It calls
> ->setattr() which has its own rules in ocfs2.
you are right, I did that because we are calling __g_f_a_w() in o_f_a_w()
which will call file_remove_suid() before.
> 
> > +	file_update_time(file);
> 
> 	We have special behaviors regarding time updates for ocfs2
> direct I/O.  This might want to live right next to the call to
> generic_file_buffered_write().  But maybe not.  It needs to be checked.
I don't think we need that, as we will update the time in ocfs2_write_end_nolock()
called by ocfs2_write_end().
and could I have more details on how we handle time updates for ocfs2 direct io?
Br,
Li Dongyang
> 
> Joel
> 

  reply	other threads:[~2010-04-14  7:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08  7:47 [Ocfs2-devel] [PATCH] ocfs2: avoid direct write if we fall back to buffered Li Dongyang
2010-04-08 18:41 ` Sunil Mushran
2010-04-09  2:27   ` Li Dongyang
2010-04-09  2:38     ` Tao Ma
2010-04-09  3:00       ` Li Dongyang
2010-04-09  3:32         ` Tao Ma
2010-04-09  9:20           ` Li Dongyang
2010-04-09 17:36             ` Sunil Mushran
2010-04-09  7:58   ` Coly Li
2010-04-09  7:56     ` Tao Ma
2010-04-14  1:58 ` Joel Becker
2010-04-14  7:42   ` Li Dongyang [this message]
2010-04-10  7:37 Dong Yang Li
2010-04-10  9:37 ` Joel Becker
2010-04-10  9:48   ` Li Dongyang
2010-04-12  5:16 ` Tao Ma
2010-04-12  5:31   ` Li Dongyang
2010-04-12  6:24     ` Tao Ma
2010-04-14  2:44       ` Tao Ma
2010-04-14  5:47         ` Li Dongyang
2010-04-14  6:08           ` Tao Ma
2010-04-13 23:54   ` Joel Becker
2010-04-14  0:13     ` Tao Ma
2010-04-14  5:58     ` Li Dongyang
2010-04-14 19:20       ` Joel Becker
2010-04-22 14:13         ` Li Dongyang
2010-04-23 20:06           ` Joel Becker

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=201004141542.31733.lidongyang@novell.com \
    --to=lidongyang@novell.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.