From: wcheng@sourceware.org <wcheng@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs-kernel/src/gfs ops_file.c
Date: 17 Nov 2006 16:15:32 -0000 [thread overview]
Message-ID: <20061117161532.17462.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: wcheng at sourceware.org 2006-11-17 16:15:32
Modified files:
gfs-kernel/src/gfs: ops_file.c
Log message:
Bugzilla 214274: Oops... only directIO has this issue - buffer IO should be
fine. Revert buffer io changes.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&r1=1.29&r2=1.30
--- cluster/gfs-kernel/src/gfs/ops_file.c 2006/11/17 05:00:57 1.29
+++ cluster/gfs-kernel/src/gfs/ops_file.c 2006/11/17 16:15:31 1.30
@@ -700,15 +700,18 @@
if (alloc_required) {
set_bit(GFF_DID_DIRECT_ALLOC, &fp->f_flags);
+ /* for asynchronous IO, the buffer can not be splitted */
+ if (iocb) {
+ count = do_write_direct_alloc(file, buf, size, offset, iocb);
+ goto out_iocb_write;
+ }
+
/* split large writes into smaller atomic transactions */
while (size) {
- if (iocb)
+ s = gfs_tune_get(sdp, gt_max_atomic_write);
+ if (s > size)
s = size;
- else {
- s = gfs_tune_get(sdp, gt_max_atomic_write);
- if (s > size)
- s = size;
- }
+
error = do_write_direct_alloc(file, buf, s, offset, iocb);
if (error < 0)
goto out_gunlock;
@@ -740,6 +743,7 @@
gfs_glock_dq_uninit(&t_gh);
}
+out_iocb_write:
error = 0;
out_gunlock:
@@ -977,13 +981,9 @@
/* split large writes into smaller atomic transactions */
while (size) {
- if (iocb)
+ s = gfs_tune_get(sdp, gt_max_atomic_write);
+ if (s > size)
s = size;
- else {
- s = gfs_tune_get(sdp, gt_max_atomic_write);
- if (s > size)
- s = size;
- }
error = do_do_write_buf(file, buf, s, offset, iocb);
if (error < 0)
next reply other threads:[~2006-11-17 16:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 16:15 wcheng [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-30 9:05 [Cluster-devel] cluster/gfs-kernel/src/gfs ops_file.c fabbione
2008-01-28 6:36 fabbione
2007-06-17 3:35 wcheng
2007-06-17 2:56 wcheng
2007-05-24 22:34 wcheng
2007-05-04 14:49 wcheng
2007-01-17 22:30 wcheng
2006-11-17 20:39 wcheng
2006-11-17 20:33 wcheng
2006-11-17 20:26 wcheng
2006-11-17 19:49 wcheng
2006-11-17 5:00 wcheng
2006-10-27 16:22 wcheng
2006-10-24 3:35 wcheng
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=20061117161532.17462.qmail@sourceware.org \
--to=wcheng@sourceware.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).