From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 21 Oct 2014 10:24:08 +0100 Subject: [Cluster-devel] [GFS2 PATCH 2/4] GFS2: Make block reservations more persistent In-Reply-To: <0850cbcb008c3510be212b2bf6c1ebff320dbb58.1413820606.git.rpeterso@redhat.com> References: <0850cbcb008c3510be212b2bf6c1ebff320dbb58.1413820606.git.rpeterso@redhat.com> Message-ID: <54462638.20602@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On 20/10/14 17:37, Bob Peterson wrote: > Before this patch, whenever a struct file (opened to allow writes) was > closed, the multi-block reservation structure associated with the inode > was deleted. That's a problem, especially when there are multiple writers. > Applications that do open-write-close will suffer from greater levels > of fragmentation and need to re-do work to perform write operations. > This patch removes the reservation delete from the file close code so > that they're more persistent until the inode is deleted. > --- > fs/gfs2/file.c | 7 ------- > 1 file changed, 7 deletions(-) This doesn't seem like a good plan. If you run something like untar, does that now leave gaps in the allocations? If there are applications which are going open/write/close in a loop, then it seems like it is the application that needs to be changed, rather than the filesystem, Steve. > diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c > index 7f4ed3d..2976019 100644 > --- a/fs/gfs2/file.c > +++ b/fs/gfs2/file.c > @@ -616,15 +616,8 @@ static int gfs2_open(struct inode *inode, struct file *file) > > static int gfs2_release(struct inode *inode, struct file *file) > { > - struct gfs2_inode *ip = GFS2_I(inode); > - > kfree(file->private_data); > file->private_data = NULL; > - > - if (!(file->f_mode & FMODE_WRITE)) > - return 0; > - > - gfs2_rs_delete(ip, &inode->i_writecount); > return 0; > } >