]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-quota-Make-global-quota-files-blocksize-aligned.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-quota-Make-global-quota-files-blocksize-aligned.patch
1 From 96e8cc43fbecaee5a2b9eee4ec27a765474e7671 Mon Sep 17 00:00:00 2001
2 From: Jan Kara <jack@suse.cz>
3 Date: Wed, 17 Jun 2009 17:35:07 +0200
4 Subject: [PATCH 1/6] ocfs2: Make global quota files blocksize aligned
5
6 Change i_size of global quota files so that it always remains aligned to block
7 size. This is mainly because the end of quota block may contain checksum (if
8 checksumming is enabled) and it's a bit awkward for it to be "outside" of quota
9 file (and it makes life harder for ocfs2-tools).
10
11 Signed-off-by: Jan Kara <jack@suse.cz>
12 ---
13 fs/ocfs2/quota_global.c | 6 ++++--
14 1 files changed, 4 insertions(+), 2 deletions(-)
15
16 Index: 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 }