diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2012-10-31 06:37:10 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-11-07 08:33:17 -0500 |
commit | 9dbe9610b9df4efe0946299804ed46bb8f91dec2 (patch) | |
tree | 8d54797420ed9d0aef1c6bdd8f3b8dd5e9938d0a /fs/gfs2/file.c | |
parent | c9aecf73717f55e41ac11682a50bef8594547025 (diff) |
GFS2: Add Orlov allocator
Just like ext3, this works on the root directory and any directory
with the +T flag set. Also, just like ext3, any subdirectory created
in one of the just mentioned cases will be allocated to a random
resource group (GFS2 equivalent of a block group).
If you are creating a set of directories, each of which will contain a
job running on a different node, then by setting +T on the parent
directory before creating the subdirectories, each will land up in a
different resource group, and thus resource group contention between
nodes will be kept to a minimum.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index e056b4ce4877..dfe2d8cb9b2c 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -432,7 +432,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
432 | if (ret) | 432 | if (ret) |
433 | goto out_unlock; | 433 | goto out_unlock; |
434 | gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks); | 434 | gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks); |
435 | ret = gfs2_inplace_reserve(ip, data_blocks + ind_blocks); | 435 | ret = gfs2_inplace_reserve(ip, data_blocks + ind_blocks, 0); |
436 | if (ret) | 436 | if (ret) |
437 | goto out_quota_unlock; | 437 | goto out_quota_unlock; |
438 | 438 | ||
@@ -825,7 +825,7 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset, | |||
825 | retry: | 825 | retry: |
826 | gfs2_write_calc_reserv(ip, bytes, &data_blocks, &ind_blocks); | 826 | gfs2_write_calc_reserv(ip, bytes, &data_blocks, &ind_blocks); |
827 | 827 | ||
828 | error = gfs2_inplace_reserve(ip, data_blocks + ind_blocks); | 828 | error = gfs2_inplace_reserve(ip, data_blocks + ind_blocks, 0); |
829 | if (error) { | 829 | if (error) { |
830 | if (error == -ENOSPC && bytes > sdp->sd_sb.sb_bsize) { | 830 | if (error == -ENOSPC && bytes > sdp->sd_sb.sb_bsize) { |
831 | bytes >>= 1; | 831 | bytes >>= 1; |