]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-quota-Make-global-quota-files-blocksize-aligned.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-quota-Make-global-quota-files-blocksize-aligned.patch
CommitLineData
00e5a55c
BS
1From 96e8cc43fbecaee5a2b9eee4ec27a765474e7671 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Wed, 17 Jun 2009 17:35:07 +0200
4Subject: [PATCH 1/6] ocfs2: Make global quota files blocksize aligned
5
6Change i_size of global quota files so that it always remains aligned to block
7size. This is mainly because the end of quota block may contain checksum (if
8checksumming is enabled) and it's a bit awkward for it to be "outside" of quota
9file (and it makes life harder for ocfs2-tools).
10
11Signed-off-by: Jan Kara <jack@suse.cz>
12---
13 fs/ocfs2/quota_global.c | 6 ++++--
14 1 files changed, 4 insertions(+), 2 deletions(-)
15
16Index: linux-2.6.27-SLE11_BRANCH/fs/ocfs2/quota_global.c
17===================================================================
18--- linux-2.6.27-SLE11_BRANCH.orig/fs/ocfs2/quota_global.c 2009-07-16 13:21:13.000000000 +0200
19+++ linux-2.6.27-SLE11_BRANCH/fs/ocfs2/quota_global.c 2009-07-16 13:25:41.000000000 +0200
20@@ -145,14 +145,16 @@
21 }
22 mutex_lock_nested(&gqinode->i_mutex, I_MUTEX_QUOTA);
23 if (gqinode->i_size < off + len) {
24+ loff_t rounded_end = ALIGN(off + len, sb->s_blocksize);
25+
26 down_write(&OCFS2_I(gqinode)->ip_alloc_sem);
27- err = ocfs2_extend_no_holes(gqinode, off + len, off);
28+ err = ocfs2_extend_no_holes(gqinode, rounded_end, off);
29 up_write(&OCFS2_I(gqinode)->ip_alloc_sem);
30 if (err < 0)
31 goto out;
32 err = ocfs2_simple_size_update(gqinode,
33 oinfo->dqi_gqi_bh,
34- off + len);
35+ rounded_end);
36 if (err < 0)
37 goto out;
38 }