From: Christoph Hellwig Date: Tue, 7 Jan 2014 07:52:15 -0800 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Increase i_writecount during gfs2_setattr_chown In-Reply-To: <892095916.49469226.1389046561115.JavaMail.root@redhat.com> References: <1027021866.49462200.1389046460522.JavaMail.root@redhat.com> <892095916.49469226.1389046561115.JavaMail.root@redhat.com> Message-ID: <20140107155215.GA21723@infradead.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Jan 06, 2014 at 05:16:01PM -0500, Bob Peterson wrote: > Hi, > > This patch calls get_write_access in function gfs2_setattr_chown, > which merely increases inode->i_writecount for the duration of the > function. That will ensure that any file closes won't delete the > inode's multi-block reservation while the function is running. > It also ensures that a multi-block reservation exists when needed > for quota change operations during the chown. Can you explain how gfs2 (ab-)uses i_writecount in the allocator? i_writecunt has very complicated semantics including negative values to deal with mappings for executables, and I can't really see how these high-level semantics interact well with a block allocator.