From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Wed, 4 Sep 2013 09:24:59 -0400 (EDT) Subject: [Cluster-devel] [PATCH] GFS2: dirty inode correctly in gfs2_write_end In-Reply-To: <20130903215942.GM2113@dhcp80-209.msp.redhat.com> References: <20130903215942.GM2113@dhcp80-209.msp.redhat.com> Message-ID: <1853209014.8349754.1378301099929.JavaMail.root@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- | GFS2 was only setting I_DIRTY_DATASYNC on files that it wrote to, when | it actually increased the file size. If gfs2_fsync was called without | I_DIRTY_DATASYNC set, it didn't flush the incore data to the log before | returning, so any metadata or journaled data changes were not getting | fsynced. This meant that writes to the middle of files were not always | getting fsynced properly. | | This patch makes gfs2 set I_DIRTY_DATASYNC whenever metadata has been | updated during a write. It also make gfs2_sync flush the incore log | if I_DIRTY_PAGES is set, and the file is using data journalling. This | will make sure that all incore logged data gets written to disk before | returning from a fsync. | | Signed-off-by: Benjamin Marzinski Hi, ACK Bob Peterson Red Hat File Systems