cluster/gfs-kernel/src/gfs ops_file.c
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: wcheng at sourceware.org 2006-11-17 05:00:57
Modified files:
gfs-kernel/src/gfs: ops_file.c
Log message:
Bugzilla 214274: GFS has been splitting large writes into smaller atomic transactions. This would generate multiple aio completion calls (one for each transaction) that falsely notify application about data completion. Problem is reported by QA team as data corruption.
gfs-kernel/src/gfs/ops_file.c +12 -5
@@ -702,10 +702,13 @@/* split large writes into smaller atomic transactions */ while (size) { - s =gfs_tune_get (sdp, gt_max_atomic_write); -if (s > size) +if (iocb) 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;
@@ -974,9 +977,13 @@/* split large writes into smaller atomic transactions */ while (size) { - s =gfs_tune_get (sdp, gt_max_atomic_write); -if (s > size) +if (iocb) 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 )