[Cluster-devel] [GFS2 PATCH 2/4] GFS2: Make block reservations more persistent
Steven Whitehouse
swhiteho at redhat.com
Tue Oct 21 09:24:08 UTC 2014
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;
> }
>
More information about the Cluster-devel
mailing list