GFS2: Extract quota data from reservations structure (revert 5407e24)

This patch basically reverts the majority of patch 5407e24.
That patch eliminated the gfs2_qadata structure in favor of just
using the reservations structure. The problem with doing that is that
it increases the size of the reservations structure. That is not an
issue until it comes time to fold the reservations structure into the
inode in memory so we know it's always there. By separating out the
quota structure again, we aren't punishing the non-quota users by
making all the inodes bigger, requiring more slab space. This patch
creates a new slab area to allocate the quota stuff so it's managed
a little more sanely.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
This commit is contained in:
Bob Peterson
2015-10-26 10:40:28 -05:00
parent 39b0555f7a
commit b54e9a0b92
13 changed files with 125 additions and 63 deletions

View File

@@ -401,7 +401,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
if (ret)
goto out;
ret = gfs2_rs_alloc(ip);
ret = gfs2_rsqa_alloc(ip);
if (ret)
goto out_write_access;
@@ -623,7 +623,7 @@ static int gfs2_release(struct inode *inode, struct file *file)
if (!(file->f_mode & FMODE_WRITE))
return 0;
gfs2_rs_delete(ip, &inode->i_writecount);
gfs2_rsqa_delete(ip, &inode->i_writecount);
return 0;
}
@@ -703,7 +703,7 @@ static ssize_t gfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
struct gfs2_inode *ip = GFS2_I(file_inode(file));
int ret;
ret = gfs2_rs_alloc(ip);
ret = gfs2_rsqa_alloc(ip);
if (ret)
return ret;
@@ -938,7 +938,7 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t le
if (ret)
goto out_unlock;
ret = gfs2_rs_alloc(ip);
ret = gfs2_rsqa_alloc(ip);
if (ret)
goto out_putw;
@@ -962,7 +962,7 @@ static ssize_t gfs2_file_splice_write(struct pipe_inode_info *pipe,
int error;
struct gfs2_inode *ip = GFS2_I(out->f_mapping->host);
error = gfs2_rs_alloc(ip);
error = gfs2_rsqa_alloc(ip);
if (error)
return (ssize_t)error;