From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: avoid direct write if we fall back to buffered v2
Date: Fri, 16 Apr 2010 03:07:36 -0700 [thread overview]
Message-ID: <20100416100735.GA25091@mail.oracle.com> (raw)
In-Reply-To: <201004152101.56289.lidongyang@novell.com>
On Thu, Apr 15, 2010 at 09:01:56PM +0800, Li Dongyang wrote:
> - if (direct_io) {
> - ret = generic_segment_checks(iov, &nr_segs, &ocount,
> - VERIFY_READ);
> - if (ret)
> - goto out_dio;
> + ret = generic_segment_checks(iov, &nr_segs, &ocount,
> + VERIFY_READ);
> + if (ret)
> + goto out_dio;
>
> - count = ocount;
> - ret = generic_write_checks(file, ppos, &count,
> - S_ISBLK(inode->i_mode));
> - if (ret)
> - goto out_dio;
> + count = ocount;
> + ret = generic_write_checks(file, ppos, &count,
> + S_ISBLK(inode->i_mode));
> + if (ret)
> + goto out_dio;
Make sure you add the management of current->backing_dev_info
just like __generic_file_aio_write() does. We want to ensure that page
writeback works OK.
Joel
--
"If the human brain were so simple we could understand it, we would
be so simple that we could not."
- W. A. Clouston
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
prev parent reply other threads:[~2010-04-16 10:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-15 13:01 [Ocfs2-devel] [PATCH] ocfs2: avoid direct write if we fall back to buffered v2 Li Dongyang
2010-04-16 10:07 ` Joel Becker [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=20100416100735.GA25091@mail.oracle.com \
--to=joel.becker@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.